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)

      Creates a new instance with the given SOCKS5 proxy host and port.

      Parameters:
      host - the SOCKS5 proxy host name
      port - the SOCKS5 proxy port
    • Socks5Proxy

      public Socks5Proxy(Origin.Address address, boolean secure)

      Creates a new instance with the given SOCKS5 proxy address.

      When secure=true the communication between the client and the proxy will be encrypted (using this proxy ProxyConfiguration.Proxy.getSslContextFactory() which typically defaults to that of HttpClient.

      Parameters:
      address - the SOCKS5 proxy address (host and port)
      secure - whether the communication between the client and the SOCKS5 proxy should be secure
  • Method Details