Class ProxyConfig
java.lang.Object
com.linecorp.armeria.client.proxy.ProxyConfig
- Direct Known Subclasses:
ConnectProxyConfig
,DirectProxyConfig
,Socks4ProxyConfig
,Socks5ProxyConfig
public abstract class ProxyConfig extends Object
Base configuration for proxy settings used by
ClientFactory
.-
Method Summary
Modifier and Type Method Description static ConnectProxyConfig
connect(InetSocketAddress proxyAddress)
Creates aProxyConfig
configuration for CONNECT protocol.static ConnectProxyConfig
connect(InetSocketAddress proxyAddress, boolean useTls)
Creates aProxyConfig
configuration for CONNECT protocol.static ConnectProxyConfig
connect(InetSocketAddress proxyAddress, String username, String password, boolean useTls)
Creates aProxyConfig
configuration for CONNECT protocol.static ProxyConfig
direct()
Returns aProxyConfig
which signifies that a proxy is absent.abstract ProxyType
proxyType()
Returns the proxy type.static Socks4ProxyConfig
socks4(InetSocketAddress proxyAddress)
Creates aProxyConfig
configuration for SOCKS4 protocol.static Socks4ProxyConfig
socks4(InetSocketAddress proxyAddress, String username)
Creates aProxyConfig
configuration for SOCKS4 protocol.static Socks5ProxyConfig
socks5(InetSocketAddress proxyAddress)
Creates aProxyConfig
configuration for SOCKS5 protocol.static Socks5ProxyConfig
socks5(InetSocketAddress proxyAddress, String username, String password)
Creates aProxyConfig
configuration for SOCKS5 protocol.
-
Method Details
-
socks4
Creates aProxyConfig
configuration for SOCKS4 protocol.- Parameters:
proxyAddress
- the proxy address
-
socks4
Creates aProxyConfig
configuration for SOCKS4 protocol.- Parameters:
proxyAddress
- the proxy addressusername
- the username
-
socks5
Creates aProxyConfig
configuration for SOCKS5 protocol.- Parameters:
proxyAddress
- the proxy address
-
socks5
public static Socks5ProxyConfig socks5(InetSocketAddress proxyAddress, String username, String password)Creates aProxyConfig
configuration for SOCKS5 protocol.- Parameters:
proxyAddress
- the proxy addressusername
- the usernamepassword
- the password
-
connect
Creates aProxyConfig
configuration for CONNECT protocol.- Parameters:
proxyAddress
- the proxy address
-
connect
Creates aProxyConfig
configuration for CONNECT protocol.- Parameters:
proxyAddress
- the proxy addressuseTls
- whether to use TLS to connect to the proxy
-
connect
public static ConnectProxyConfig connect(InetSocketAddress proxyAddress, String username, String password, boolean useTls)Creates aProxyConfig
configuration for CONNECT protocol.- Parameters:
proxyAddress
- the proxy addressusername
- the usernamepassword
- the passworduseTls
- whether to use TLS to connect to the proxy
-
direct
Returns aProxyConfig
which signifies that a proxy is absent. -
proxyType
Returns the proxy type.
-