Hello,
I have run into problems, trying to use a SOCKS proxy with authentication.
I keep getting "java.net.SocketException: SOCKS : authentication failed"
regardless of wether I set the username and password or not.
I have tested the SOCKS server with Proxifier and it works correctly, so
it's not a server issue.
Here is a code snippet, I am getting the Exception on:
HttpClient client = new HttpClient();
client.getHostConfiguration().setHost("www.google.com", 80);
System.setProperty("socksProxyHost", "1.1.1.1");
System.setProperty("socksProxyPort", "1234");
Credentials cred = new UsernamePasswordCredentials("username",
"password");
client.getState().setProxyCredentials(AuthScope.ANY, cred);
GetMethod get = new GetMethod("/");
client.executeMethod(get);
I have also tried setting java.net.socks.username and
java.net.socks.password
system properties, without luck.
Any help would be greatly appreciated.
Thanks in advance!
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]