Created
September 29, 2015 10:39
-
-
Save grational/7b70c82198c3d57774f6 to your computer and use it in GitHub Desktop.
Java HTTPS Connection with HTTP Proxy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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