[9] RFR: 8129444: "socksProxyVersion" system property is ignored if Socket(Proxy) constructor is used

Chris Hegarty chris.hegarty at oracle.com
Fri Jul 3 07:02:22 UTC 2015


On 2 Jul 2015, at 16:36, Chris Hegarty <chris.hegarty at oracle.com> wrote:

> 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.

Pushed:
  http://hg.openjdk.java.net/jdk9/dev/jdk/rev/cce0dee6d995

-Chris.

> -Chris.
> 
> On 26 Jun 2015, at 18:22, Artem Smotrakov <artem.smotrakov at 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
> 



More information about the net-dev mailing list