java - Socks 5 with authentication JVM config -


i trying set connections go through socks 5. have following code:

system.setproperty("socksproxyhost" , "xx.xx.xx.xx"); system.setproperty("socksproxyport" , "yy")  ; system.setproperty("socksproxyversion" , "5"); system.setproperty("java.net.socks.username" , "username"); system.setproperty("java.net.socks.password" , "password");  

i thought enough, however, whenever attempt connection follows:

httpresponse response = httpclient.execute(httppost); 

i exception:

jun 14, 2015 11:44:01 org.apache.http.impl.client.defaulthttpclient tryconnect info: i/o exception (java.net.socketexception) caught when connecting {}->http://www.destination.com: socks : authentication failed jun 14, 2015 11:44:01 org.apache.http.impl.client.defaulthttpclient tryconnect info: retrying connect {}->http://www.www.destination.com jun 14, 2015 11:44:03 org.apache.http.impl.client.defaulthttpclient tryconnect info: i/o exception (java.net.socketexception) caught when connecting {}->http://www.www.destination.com: socks : authentication failed jun 14, 2015 11:44:03 org.apache.http.impl.client.defaulthttpclient tryconnect info: retrying connect {}->http://www.www.destination.com jun 14, 2015 11:44:05 org.apache.http.impl.client.defaulthttpclient tryconnect info: i/o exception (java.net.socketexception) caught when connecting {}->http://www.www.destination.com: socks : authentication failed jun 14, 2015 11:44:05 org.apache.http.impl.client.defaulthttpclient tryconnect info: retrying connect {}->http://www.www.destination.com jun 14, 2015 11:44:07 totalcontrol.totalcontrol main severe: null java.net.socketexception: socks : authentication failed     @ java.net.sockssocketimpl.connect(sockssocketimpl.java:474)     @ java.net.socket.connect(socket.java:589)     @     org.apache.http.conn.scheme.plainsocketfactory.connectsocket(plainsocketfactory.java:117) @ org.apache.http.impl.conn.defaultclientconnectionoperator.openconnection(defaultclientconnectionoperator.java:177) @ org.apache.http.impl.conn.managedclientconnectionimpl.open(managedclientconnectionimpl.java:304) @ org.apache.http.impl.client.defaultrequestdirector.tryconnect(defaultrequestdirector.java:611) @ org.apache.http.impl.client.defaultrequestdirector.execute(defaultrequestdirector.java:446) @ org.apache.http.impl.client.abstracthttpclient.doexecute(abstracthttpclient.java:863) @ org.apache.http.impl.client.closeablehttpclient.execute(closeablehttpclient.java:82) @ org.apache.http.impl.client.closeablehttpclient.execute(closeablehttpclient.java:106) @ org.apache.http.impl.client.closeablehttpclient.execute(closeablehttpclient.java:57) ... 

the same code works without socks 5 configuration. i'm sure user/password correct..

what missing make work?


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -