new Socket(myIpAddress, myPortNumber)
I get this exception:
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(Unknown Source)
at java.net.SocksSocketImpl.readSocksReply(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
This happens with IE configured to use the SOCKS server, regardless of
whether I add any code to attempt to use the SOCKS server. In my test
case the server is available directly to the applet, so it seems that
the JVM is trying to use the SOCKS server.
I'm using Java 1.5.0_11 under Win XP.
Any advice or suggestions would be appreciated.
John
Packet-sniffing the transaction, I can see that IE's own requests are
being made through SOCKS v5. However, the applet requests are being
made through SOCKS v4. Is there a way to force a SOCKS request to be
a SOCKS v4 request?
John
What is your socksProxyHost system property
setting?
Some additional info:
* Packet-sniffing with Ethereal shows that IE is making Socks v4
connections; the applet is trying to make Socks v5 connections.
* Perusing JVM code, the "java.net.SocksSocketImpl" class has a setV4
method, but nothing in the JVM ever calls it. Since this works with
Socks v5 servers, but not Socks v4 servers, I suspect this is the
problem.
* The logical thing to do would be to simply call that setV4()
method. But a class has to be within the "java.net" namespace in
order to do so; the method is not public. And trying to creating my
own "java.net.*" class results in a SecurityException, even from a
PrivilegedAction.run() method. I don't believe you can have
"endorsed" classes from within the applet.
Thanks.
John
Suggest trying Web Start to launch your applet.
<http://www.physci.org/jws/#jtest>
HTH
--
Andrew Thompson
http://www.athompson.info/andrew/
Message posted via JavaKB.com
http://www.javakb.com/Uwe/Forums.aspx/java-setup/200704/1