I set the the socksProxyPort, socksProxyHost and even socksProxySet to the proper value, but my client app still tries to connect to the server directly instead of the proxy.
it happens after we upgrade the jre from 1.4.2 to 1.5.0.
There is no way to find out why such stuff happens even when i read the jdk source. ......make me insane......
Would you please tell me where or by which tool, i can find out the root cause? Thx in advance
Re: Where to debug the reason why the app bypasses the socks proxy
Aug 7, 2006 8:55 PM
(reply 2
of 12) (In reply to
#1 )
Thanks for your response. But unfortunately, the client connects the server through a CORBA channel, a kind of lib stuff, which initialize the socket and can not be updated by us....... :-(........
Re: Where to debug the reason why the app bypasses the socks proxy
Aug 7, 2006 10:41 PM
(reply 7
of 12) (In reply to
#6 )
It's broken in 1.5, I told you that, so you won't find it at all there. You'll only find it in java.net.Proxy or somewhere leading from that, and you'll find it tricky to recognize because it's all broken up.
As far as I can work out, what they did was to break socksProxyHost for plain Sockets unless you use java.net.Proxy. It still works for URLs.
Re: Where to debug the reason why the app bypasses the socks proxy
Aug 8, 2006 2:54 AM
(reply 8
of 12) (In reply to
#7 )
Thing goes uglier here....
I find out that the two ENV works in the app. If i make a new socket(host, port), it will go to the socks tunnel as i expect. But even after it, the corba still can not see the SOCKS server when i initial it.......
Re: Where to debug the reason why the app bypasses the socks proxy
Jun 24, 2007 6:16 PM
(reply 12
of 12) (In reply to
#11 )
Well, this is an old thread, but I case anyone is looking it up in the archive, I've been struggling
with the same problem. SocketChannel does not appear to use proxies, though Socket still does.
The solution is to initialize the ORB like this:
Properties props = new Properties();
props.setProperty("com.sun.CORBA.transport.ORBConnectionSocketType", "Socket");
ORB orb = ORB.init(new String[0], props);
Then it will use good old Sockets, which do obey the proxy.
But this is not a complete solution. My app still seems to occaisionally use SocketChannels, and
there seems to be a deadlock problem is a CORBA call hangs or fails.