Proxy Problem

My computer is behind a firewall, how do I write a Java program to access (http, ftp etc) the "outside world" through a proxy? (We have a proxy server with port number 1080.)
regina081698Asked:
Who is Participating?
 
yorenConnect With a Mentor Commented:
You can set both HTTP and SOCKS proxies:

Properties sysprops = System.getProperties();

sysprops.put("socksProxySet", "true");
sysprops.put("socksProxyHost", "socks.whitehouse.gov");
sysprops.put("socksProxyPort", "1080");

sysprops.put("proxySet", "true");
sysprops.put("proxyHost", "httpproxy.server.com");
sysprops.put("proxyPort", "80");

0
 
regina081698Author Commented:
thanks!!! :-)
0
All Courses

From novice to tech pro — start learning today.