Package org.eclipse.jetty.client
Class Socks5Proxy
java.lang.Object
org.eclipse.jetty.client.ProxyConfiguration.Proxy
org.eclipse.jetty.client.Socks5Proxy
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 Summary
ConstructorDescriptionSocks5Proxy
(String host, int port) Socks5Proxy
(Origin.Address address, boolean secure) -
Method Summary
Modifier and TypeMethodDescriptionnewClientConnectionFactory
(ClientConnectionFactory connectionFactory) putAuthenticationFactory
(Socks5.Authentication.Factory authenticationFactory) Provides this class with the given SOCKS5 authentication method.removeAuthenticationFactory
(byte method) Removes the authentication of the givenmethod
.Methods inherited from class org.eclipse.jetty.client.ProxyConfiguration.Proxy
getAddress, getExcludedAddresses, getIncludedAddresses, getOrigin, getProtocol, getSslContextFactory, getURI, isSecure, matches, toString
-
Constructor Details
-
Socks5Proxy
-
Socks5Proxy
-
-
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
Removes the authentication of the given
method
.- Parameters:
method
- the authentication method to remove
-
newClientConnectionFactory
public ClientConnectionFactory newClientConnectionFactory(ClientConnectionFactory connectionFactory) - Specified by:
newClientConnectionFactory
in classProxyConfiguration.Proxy
- Parameters:
connectionFactory
- the nestedClientConnectionFactory
- Returns:
- a new
ClientConnectionFactory
for this Proxy
-