-
Enhancement
-
Resolution: Unresolved
-
P3
-
None
-
None
The Socket(Proxy) constructor can be used to create a Socket that uses a SOCKS or HTTP proxy. The constructor creates an unconnected socket so it's possible to bind the socket to a local address/port or set socket options prior to connecting the socket. Binding or setting socket options prior to connect is a hazard as the underlying SocketImpl is replaced once the connection is established to the SOCKS or HTTP proxy. Minimally the javadoc for this constructor should include a warning or API note to make it clear that the local address or socket options may be lost when the connection is established to the proxy.