Package org.asynchttpclient.proxy
Class ProxyServer.Builder
- java.lang.Object
-
- org.asynchttpclient.proxy.ProxyServer.Builder
-
- Enclosing class:
- ProxyServer
public static class ProxyServer.Builder extends Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProxyServerbuild()ProxyServer.BuildersetCustomHeaders(Function<Request,io.netty.handler.codec.http.HttpHeaders> customHeaders)Headers for the proxy itself, sent only on a request the proxy reads: an absolute-form request or a CONNECT.ProxyServer.BuildersetNonProxyHost(String nonProxyHost)ProxyServer.BuildersetNonProxyHosts(List<String> nonProxyHosts)ProxyServer.BuildersetProxyType(ProxyType proxyType)ProxyServer.BuildersetRealm(@Nullable Realm realm)ProxyServer.BuildersetRealm(Realm.Builder realm)ProxyServer.BuildersetSecuredPort(int securedPort)
-
-
-
Constructor Detail
-
Builder
public Builder(String host, int port)
-
-
Method Detail
-
setSecuredPort
public ProxyServer.Builder setSecuredPort(int securedPort)
-
setRealm
public ProxyServer.Builder setRealm(@Nullable @Nullable Realm realm)
-
setRealm
public ProxyServer.Builder setRealm(Realm.Builder realm)
-
setNonProxyHost
public ProxyServer.Builder setNonProxyHost(String nonProxyHost)
-
setNonProxyHosts
public ProxyServer.Builder setNonProxyHosts(List<String> nonProxyHosts)
-
setProxyType
public ProxyServer.Builder setProxyType(ProxyType proxyType)
-
setCustomHeaders
public ProxyServer.Builder setCustomHeaders(Function<Request,io.netty.handler.codec.http.HttpHeaders> customHeaders)
Headers for the proxy itself, sent only on a request the proxy reads: an absolute-form request or a CONNECT. A SOCKS proxy never parses the HTTP it carries, so it gets none.An HTTP proxy forwards what it does not recognise, so to keep one of these off the origin, name it in a
Connectionheader of the same set.Called once per request built for the proxy, on an I/O thread.
-
build
public ProxyServer build()
-
-