Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for turning off proxy when making connections to target server #3

Open
detyo opened this issue May 12, 2017 · 0 comments
Open

Comments

@detyo
Copy link

detyo commented May 12, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant