sockslib icon indicating copy to clipboard operation
sockslib copied to clipboard

Support for turning off proxy when making connections to target server

Open detyo opened this issue 7 years ago • 0 comments

Hi, I'm using latest beta release of fucksocks in JUnit test and starting/stopping the server for each test. I'm configuring the proxy using Java system properties, however this prevents the socks proxy from working, since it attempts to connect to itself when making connection to destination server (Socks5Handler.doConnect(..)). I have been able to workaround this by providing my own implementation of Socks5Handler which turns off proxy usage in doConnect:

socket = new Socket(Proxy.NO_PROXY);
socket.connect(new InetSocketAddress(commandMessage.getInetAddress(), commandMessage.getPort()));

I saw that in latest code there is an option to specify a socks proxy when making connection to destination server, but it does not look like it is possible to turn off proxy usage, do you think that adding such support makes sense?

By the way, are there any plans to release a new sockslib version anytime soon.

Thanks, Detelin

detyo avatar May 12 '17 07:05 detyo