Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6195850

Proxy IP routing is inconsistent when FTP, HTTP, and SOCKS proxies are all enabled in JDK1.4.2_07


    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Not an Issue
    • Affects Version/s: 1.4.1_07, 1.4.2_07
    • Fix Version/s: 1.4.2_07
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • CPU:
    • OS:


      A fix for bug 5019401 was introduced in JDK1.4.2_07; that bug concerned incorrect usage of the SOCKS protocol. Since that bug fix was introduced, the behaviour of the JVM when all of SOCKS, FTP, and HTTP proxies are specified as system properties has changed. In 1.4.2_06, if an application specified all these types of proxy, then FTP and HTTP operations would be directed to the specified FTP and HTTP proxy. All other operations would be directed to the SOCKS proxy.

      However, since the bug fix, when a SOCKS proxy is specified, the FTP proxy setting is ignored. Instead, FTP operations go to the SOCKS proxy. HTTP operations, however, go to the HTTP proxy as specified.

      It would be irritating for this particular customer if specifying a SOCKS proxy negated the settings of both FTP and HTTP proxies. However, such behaviour would at least be logically consistent. What argues in favour of the current behaviour been defective is that FTP and HTTP proxy settings are treated differently, when there is no obvious reason for it.

      How to reproduce the problem...

      Here is a snippet of code:

      URL u1 = new URL("ftp://myserver//something");
      URL u2 = new URL("http://myserver/something");
      InputStream is1 = u1.openInputStream();
      InputStream is2 = u2.openInputStream();

      Then run this code with the JVM settings

      -DsocksProxyHost=xxx -Dftp.proxyHost=yyy -Dhttp.proxyHost=zzz

      and monitor the network for IP packets. We see that opening the FTP URL appears to direct a packet to the specified SOCKS proxy, not to the FTP proxy. However, opening the HTTP URL directs a packet to the specified HTTP proxy. There is no obvious logical reason why FTP and HTTP should be treated differently. In addition, if specifying a SOCKS proxy invalidates the settings of FTP and HTTP proxies, this should be documented.

      ###@###.### 2004-11-16 11:57:43 GMT


          Issue Links



              • Assignee:
                jccollet Jean-Christophe Collet (Inactive)
                kboone Kevin Boone (Inactive)
              • Votes:
                0 Vote for this issue
                0 Start watching this issue


                • Created: