Nov 22

The Proxy class can be used specify proxy details at the connection level.

SocketAddress addr = new InetSocketAddress("", 88);
Proxy proxy = new Proxy(Proxy.Type.SOCKS, addr);
URL url = new URL("");
URConnection conn = url.openConnection(proxy);

written by objects \\ tags: , ,

Nov 02

You can use the system properties socksProxyHost and socksProxyPort to specify a SOCKS proxy to use for all connections. eg.

java -DsocksProxyPort=88 MyApp

written by objects \\ tags: ,