Class Socks4Proxy


public class Socks4Proxy extends ProxyConfiguration.Proxy

Client-side proxy configuration for SOCKS4, a de-facto standard.

Consider using SOCK5 instead, a protocol that has been standardized by IETF.

See Also:
  • Constructor Details

    • Socks4Proxy

      public Socks4Proxy(String host, int port)

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

      Parameters:
      host - the SOCKS4 proxy host name
      port - the SOCKS4 proxy port
    • Socks4Proxy

      public Socks4Proxy(Origin.Address address, boolean secure)

      Creates a new instance with the given SOCKS4 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 SOCKS4 proxy address (host and port)
      secure - whether the communication between the client and the SOCKS4 proxy should be secure
  • Method Details

    • 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