Hello,
Please review this fix for 9.
If a socket was created with Socket(Proxy) constructor [1], then it
doesn't take into account "socksProxyVersion" system property. As a
result, it is not possible to use SOCKS v4 (v5 is used by default [2]).
Currently the property is checked only in SocksSocketImpl.connect() method.
This fix updates SocksSocketImpl class to check "socksProxyVersion"
system property when an instance is created, and in
SocksSocketImpl.socksBind() method.
Bug: https://bugs.openjdk.java.net/browse/JDK-8129444
Webrev: http://cr.openjdk.java.net/~asmotrak/socks4/webrev.01/
[1]
http://docs.oracle.com/javase/8/docs/api/java/net/Socket.html#Socket-java.net.Proxy-
[2]
http://docs.oracle.com/javase/8/docs/api/java/net/doc-files/net-properties.html
Artem