1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-12-01 12:24:14 +01:00

Added HTTPS proxy properties

This commit is contained in:
Federico Fissore 2015-03-18 11:31:34 +01:00
parent b32dc93506
commit 323458c8d8

View File

@ -125,6 +125,8 @@ public class FileDownloader extends Observable {
if (PreferencesData.has("proxy.server") && PreferencesData.get("proxy.server") != null && !PreferencesData.get("proxy.server").equals("")) {
System.getProperties().put("http.proxyHost", PreferencesData.get("proxy.server"));
System.getProperties().put("http.proxyPort", PreferencesData.get("proxy.port"));
System.getProperties().put("https.proxyHost", PreferencesData.get("proxy.server"));
System.getProperties().put("https.proxyPort", PreferencesData.get("proxy.port"));
if (PreferencesData.has("proxy.user")) {
System.getProperties().put("http.proxyUser", PreferencesData.get("proxy.user"));
System.getProperties().put("http.proxyPassword", PreferencesData.get("proxy.password"));
@ -132,6 +134,8 @@ public class FileDownloader extends Observable {
} else {
System.getProperties().remove("http.proxyHost");
System.getProperties().remove("http.proxyPort");
System.getProperties().remove("https.proxyHost");
System.getProperties().remove("https.proxyPort");
System.getProperties().remove("http.proxyUser");
System.getProperties().remove("http.proxyPassword");
}