Class Socks5Proxy


public class Socks5Proxy extends ProxyConfiguration.Proxy

Client-side proxy configuration for SOCKS5, defined by RFC 1928.

Multiple authentication methods are supported via putAuthenticationFactory(Socks5.Authentication.Factory). By default only the NO AUTH authentication method is configured. The USERNAME/PASSWORD is available to applications but must be explicitly configured and added.

  • Constructor Details

    • Socks5Proxy

      public Socks5Proxy(String host, int port)
    • Socks5Proxy

      public Socks5Proxy(Origin.Address address, boolean secure)
  • Method Details

    • putAuthenticationFactory

      public Socks5.Authentication.Factory putAuthenticationFactory(Socks5.Authentication.Factory authenticationFactory)

      Provides this class with the given SOCKS5 authentication method.

      Parameters:
      authenticationFactory - the SOCKS5 authentication factory
      Returns:
      the previous authentication method of the same type, or null if there was none of that type already present
    • removeAuthenticationFactory

      public Socks5.Authentication.Factory removeAuthenticationFactory(byte method)

      Removes the authentication of the given method.

      Parameters:
      method - the authentication method to remove
    • newClientConnectionFactory

      public org.eclipse.jetty.io.ClientConnectionFactory newClientConnectionFactory(org.eclipse.jetty.io.ClientConnectionFactory connectionFactory)
      Specified by:
      newClientConnectionFactory in class ProxyConfiguration.Proxy
      Parameters:
      connectionFactory - the nested ClientConnectionFactory
      Returns:
      a new ClientConnectionFactory for this Proxy