added support for https proxies

This commit is contained in:
Stefan Endrullis
2015-12-16 13:27:55 +01:00
parent 256b048fce
commit 28cad72291
2 changed files with 4 additions and 0 deletions
@@ -918,6 +918,8 @@ public class Application
if ((proxyHost = System.getProperty("http.proxyHost")) != null) { if ((proxyHost = System.getProperty("http.proxyHost")) != null) {
args.add("-Dhttp.proxyHost=" + proxyHost); args.add("-Dhttp.proxyHost=" + proxyHost);
args.add("-Dhttp.proxyPort=" + System.getProperty("http.proxyPort")); args.add("-Dhttp.proxyPort=" + System.getProperty("http.proxyPort"));
args.add("-Dhttps.proxyHost=" + proxyHost);
args.add("-Dhttps.proxyPort=" + System.getProperty("http.proxyPort"));
} }
// add the marker indicating the app is running in getdown // add the marker indicating the app is running in getdown
@@ -344,8 +344,10 @@ public abstract class Getdown extends Thread
{ {
if (!StringUtil.isBlank(host)) { if (!StringUtil.isBlank(host)) {
System.setProperty("http.proxyHost", host); System.setProperty("http.proxyHost", host);
System.setProperty("https.proxyHost", host);
if (!StringUtil.isBlank(port)) { if (!StringUtil.isBlank(port)) {
System.setProperty("http.proxyPort", port); System.setProperty("http.proxyPort", port);
System.setProperty("https.proxyPort", port);
} }
log.info("Using proxy", "host", host, "port", port); log.info("Using proxy", "host", host, "port", port);
} }