Skip to content

Commit

Permalink
use proxy configuration also for HTTPS connections - fixes #2249
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasgeiger committed Dec 21, 2016
1 parent 599e21d commit e65fbaa
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/java/net/sf/jabref/logic/net/ProxyRegisterer.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,16 @@ public static void register(ProxyPreferences proxyPrefs) {
System.setProperty("http.proxyHost", proxyPrefs.getHostname());
System.setProperty("http.proxyPort", proxyPrefs.getPort());

System.setProperty("https.proxyHost", proxyPrefs.getHostname());
System.setProperty("https.proxyPort", proxyPrefs.getPort());

// NetworkTab.java ensures that proxyUsername and proxyPassword are neither null nor empty
if (proxyPrefs.isUseAuthentication()) {
System.setProperty("http.proxyUser", proxyPrefs.getUsername());
System.setProperty("http.proxyPassword", proxyPrefs.getPassword());

System.setProperty("https.proxyUser", proxyPrefs.getUsername());
System.setProperty("https.proxyPassword", proxyPrefs.getPassword());
}
} else {
// The following two lines signal that the system proxy settings
Expand Down

0 comments on commit e65fbaa

Please sign in to comment.