Skip to content

Instantly share code, notes, and snippets.

@barlog-m
Last active December 8, 2015 09:27
Show Gist options
  • Save barlog-m/ae41a62fa54f3b6f7e64 to your computer and use it in GitHub Desktop.
Save barlog-m/ae41a62fa54f3b6f7e64 to your computer and use it in GitHub Desktop.
Enable Proxy for all connections
private void enableProxy() {
System.setProperty("http.proxySet", "true");
System.setProperty("http.proxy", "localhost"); // JavaFX WebView
System.setProperty("http.proxyHost", "localhost");
System.setProperty("http.proxyPort", "8080");
System.setProperty("https.proxySet", "true");
System.setProperty("https.proxy", "localhost"); // JavaFX WebView
System.setProperty("https.proxyHost", "localhost");
System.setProperty("https.proxyPort", "8080");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment