I need to tunnel through a tcp proxy. Within Java, the proxy types are only socks, direct or HTTP. So in the example below a socket is being created then the proxy object is being created from the socketAddress
and the type is socks.
How can I specify the proxy is TCP?
SocketAddress addr = new InetSocketAddress("socks.example.com", 1080);
Proxy proxy = new Proxy(Proxy.Type.SOCKS, addr);
Socket socket = new Socket(proxy);
InetSocketAddress dest = new InetSocketAddress("server.example.org", 1234);
try {
socket.connect(dest);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return isValidated;