Skip to content

Instantly share code, notes, and snippets.

@grational
Created September 29, 2015 10:39
Show Gist options
  • Save grational/7b70c82198c3d57774f6 to your computer and use it in GitHub Desktop.
Save grational/7b70c82198c3d57774f6 to your computer and use it in GitHub Desktop.
Java HTTPS Connection with HTTP Proxy
String proxyIpAddress = "192.168.0.1";
String proxyPort = "80";
HttpsURLConnection conn = (HttpsURLConnection) url.openConnection(
new Proxy( Proxy.Type.HTTP,
new InetSocketAddress(proxyIpAddress, proxyPort) ) //close new Proxy
); //close url.openConnection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment