JDK-5019401 : ServerSocket(Proxy) and Socket(Proxy) do not work with sun one proxy server
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 1.0,1.4.2_06,5.0
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic,solaris_8
  • CPU: generic,unknown,sparc
  • Submitted: 2004-03-24
  • Updated: 2004-10-13
  • Resolved: 2004-04-06
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.4.2_07 b01Fixed
Related Reports
Duplicate :  
Duplicate :  
Description
The new feature of creating ServerSockets and Sockets by specifying the proxy server does not work with the sun one proxy server. When trying to bind to a local port or during Socket.connect(), a SocketException is thrown. The feature works when tried against a reference socks5 proxy server downloaded from www.socks.nec.com.

STEPS TO REPRODUCE THE PROBLEM:
1. Copy the attached files into the same directory.
2. Compile the java file using source 1.5
3. Setup a sun one proxy server (version 3.6) on a machine. Currently, the server has been setup on xanadu.india.sun.com. Give full permissions to the socks proxy server (see attached socks5.conf file)
4. Edit the proxy.properties and replace xanadu.india.sun.com with the name of the proxy server. Currently the server on xanadu is running but may be brought down in the future.
5. Run the code. The code fails with an exception. The stack trace is present in the attached file output.txt.


CURRENT BEHAVIOUR:
Code throws an exception during ServerSocket.bind() and Socket.connect() calls


EXPECTED BEHAVIOUR:
The client and server communication takes place successfully and the tests pass.

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: 1.4.2_07 tiger-beta2 FIXED IN: 1.4.2_07 tiger-beta2 INTEGRATED IN: 1.4.2_07 tiger-b46 tiger-beta2 VERIFIED IN: tiger-beta2
02-10-2004

WORK AROUND
02-10-2004

SUGGESTED FIX
02-10-2004

PUBLIC COMMENTS
02-10-2004

EVALUATION It seems that S1 proxy server can't deal with fragmented packets even though this is supposed to be on top of TCP. We need to change the code to make sure that our SOCKS implementation sends the SOCKS commands (CONNECT, BIND, etc..) in an atomic way (i.e.: a single write per command). Will try to fix for tiger-beta2 as this is a rather simple a low risk fix. ###@###.### 2004-03-24
24-03-2004