[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: Error in the Java Standard Library while using Tor sock proxy



On Thu, Dec 02, 2004 at 12:52:35PM -0500, Myers Carpenter wrote:
> I'm using a Java program as a network client on TOR.  It uses the 
> standard Java support for SOCKS.  I'm currently using the SOCKS4 
> protocol, but I've gotten the same error while using 4, 4a, and 5.  The 
> stack trace looks something like this:
> 
> Caused by: java.net.SocketException: Reply from SOCKS server contains 
> wrong code
>          at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:401)

According to the url you posted, this message means you're using socks5
in this case. But in any case, it "ought" to be working. We send a 1 in
byte 3 of the reply, which means IPv4. In
http://www.cs.umb.edu/~bill/java/jdk1.4/src/java/net/InetAddress.java
it defines IPv4 to be 1.

Which version of Tor are you using? Do you have this problem with both
0.0.8.1 and 0.0.9rc5?

Are you certain that the java you're using is the source you pointed to?

--Roger