This change looks good to me Artem, and completes the ( incomplete ) work I done on this a few years back. Though why anyone is still using SOCKS v4 I’ll never know!
I can sponsor this change for you. -Chris. On 26 Jun 2015, at 18:22, Artem Smotrakov <artem.smotra...@oracle.com> wrote: > 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