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

SOCKS 5 Sockets in JDK 1.4.0 Beta Need Username/Password Auth Added

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.4.0
    • 1.4.0
    • core-libs
    • beta2
    • generic
    • generic



      Name: boT120536 Date: 06/03/2001


      java version "1.4.0-beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta-b65)
      Java HotSpot(TM) Client VM (build 1.4.0-beta-b65, mixed mode)

      The java.net.SocksSocketImpl.java file sends USER_PASSW as a supported
      authorization type, but then does not do a UserName/Password handshake if the
      SOCKS 5 server responds with that auth. type.

      Also, since 1.4 supports Kerberos 5 and GSS-API, you should also be sending
      GSSAPI as a supported auth type as well. I admit adding this may be non-
      trivial, and most SOCKS 5 clients and servers only support NONE or
      USER/PASSWORD as auth. types. But, at least really support USER/PASSWORD since
      your SOCKS 5 request says you do.

      The connectv4() method in SocksSocketImpl also expects a 0 back as the first
      byte of the response, which is according to the spec, but some SOCKS 4 servers
      respond with a 4 as the first byte. This would be a very simple "or" check.

      Lastly, shouldn't we have 2 new properties, socks4proxyHost, and
      socks5ProxyPort, instead of using the existing socksProxyHost and
      socksProxyPort properties for both SOCKS 4 and 5, then then attempting to guess
      which one we are connecting to, as SocksSocketImplFactor.guessVersion() does.
      This would also be a very simple code change.
      (Review ID: 125444)
      ======================================================================

            jccollet Jean-Christophe Collet (Inactive)
            bonealsunw Bret O'neal (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: