public class ChainedProxyAdapter extends Object implements ChainedProxy
ChainedProxy.| Modifier and Type | Field and Description |
|---|---|
static ChainedProxy |
FALLBACK_TO_DIRECT_CONNECTION
ChainedProxy that simply has the upstream proxy make a direct
connection to the server. |
| Constructor and Description |
|---|
ChainedProxyAdapter() |
| Modifier and Type | Method and Description |
|---|---|
void |
connectionFailed(Throwable cause)
Called to let us know that connecting to this proxy failed.
|
void |
connectionSucceeded()
Called to let us know that connecting to this proxy succeeded.
|
void |
disconnected()
Called to let us know that we were disconnected.
|
void |
filterRequest(io.netty.handler.codec.http.HttpObject httpObject)
Filters requests on their way to the chained proxy.
|
InetSocketAddress |
getChainedProxyAddress()
Return the
InetSocketAddress for connecting to the chained proxy. |
InetSocketAddress |
getLocalAddress()
(Optional) ensure that the connection is opened from a specific local
address (useful when doing NAT traversal).
|
TransportProtocol |
getTransportProtocol()
Tell LittleProxy what kind of TransportProtocol to use to communicate
with the chained proxy.
|
SSLEngine |
newSslEngine() |
boolean |
requiresEncryption()
Implement this method to tell LittleProxy whether or not to encrypt
connections to the chained proxy for the given request.
|
public static ChainedProxy FALLBACK_TO_DIRECT_CONNECTION
ChainedProxy that simply has the upstream proxy make a direct
connection to the server.public InetSocketAddress getChainedProxyAddress()
ChainedProxyInetSocketAddress for connecting to the chained proxy.
Returning null indicates that we won't chain.getChainedProxyAddress in interface ChainedProxypublic InetSocketAddress getLocalAddress()
ChainedProxygetLocalAddress in interface ChainedProxypublic TransportProtocol getTransportProtocol()
ChainedProxygetTransportProtocol in interface ChainedProxypublic boolean requiresEncryption()
ChainedProxySslEngineSource.newSslEngine() to obtain an
SSLContext used by the upstream proxy.requiresEncryption in interface ChainedProxypublic SSLEngine newSslEngine()
newSslEngine in interface SslEngineSourcepublic void filterRequest(io.netty.handler.codec.http.HttpObject httpObject)
ChainedProxyfilterRequest in interface ChainedProxypublic void connectionSucceeded()
ChainedProxyconnectionSucceeded in interface ChainedProxypublic void connectionFailed(Throwable cause)
ChainedProxyconnectionFailed in interface ChainedProxycause - exception that caused this failure (may be null)public void disconnected()
ChainedProxydisconnected in interface ChainedProxyCopyright © 2009-2013 LittleShoot. All Rights Reserved.