Posted By:
Andrew_Cuthbertson
Posted On:
Friday, November 30, 2001 07:09 AM
Depending upon the type of firewall there a several things that you can do.
for a masquerading firewall:
This is used transparently at the OS level and java needs no extra code to use this.
for a socks4 compatible firewall:
The JDK currently supports socks4. This is a protocol where the client software only opens a port to the firewall. Once this port is opened then the client can request the firewall to open ports elsewhere in the internet.
All you need to do is set some system properties to achieve this:
//SOCKS proxy host
System.setProperty("socksProxyHost",);
//SOCKS proxy port number
System.setProperty("socksProxyPort",);
Java will then use socks transparently.
for a web proxy firewall:
This is slightly more difficult. You will need to use port 80 for the communication through the firewall. Some even parse the html content. HTTP/1.1 supports a tunneling feature which you may be able to use.
Here is a useful read.
http://www.mokabyte.it/2000/06/firewallutil.htm