public class DefaultHttpProxyServer extends Object implements HttpProxyServer
Primary implementation of an HttpProxyServer.
DefaultHttpProxyServer is bootstrapped by calling
bootstrap() or bootstrapFromFile(String), and then calling
DefaultHttpProxyServerBootstrap#start(). For example:
DefaultHttpProxyServer server =
DefaultHttpProxyServer
.bootstrap()
.withPort(8090)
.start();
| Modifier and Type | Method and Description |
|---|---|
static HttpProxyServerBootstrap |
bootstrap()
Bootstrap a new
DefaultHttpProxyServer starting from scratch. |
static HttpProxyServerBootstrap |
bootstrapFromFile(String path)
Bootstrap a new
DefaultHttpProxyServer using defaults from the
given file. |
HttpProxyServerBootstrap |
clone()
Clone the existing server, with a port 1 higher and everything else the
same.
|
protected Collection<ActivityTracker> |
getActivityTrackers() |
protected ChainedProxyManager |
getChainProxyManager() |
HttpFiltersSource |
getFiltersSource() |
int |
getIdleConnectionTimeout() |
InetSocketAddress |
getListenAddress()
Return the address on which this proxy is listening.
|
protected MitmManager |
getMitmManager() |
protected ProxyAuthenticator |
getProxyAuthenticator() |
protected io.netty.channel.EventLoopGroup |
getProxyToServerWorkerFor(TransportProtocol transportProtocol) |
protected SslEngineSource |
getSslEngineSource() |
protected void |
registerChannel(io.netty.channel.Channel channel)
Register a new
Channel with this server, for later closing. |
void |
setIdleConnectionTimeout(int idleConnectionTimeout) |
void |
stop()
Stops the server and all related clones.
|
public static HttpProxyServerBootstrap bootstrap()
DefaultHttpProxyServer starting from scratch.public static HttpProxyServerBootstrap bootstrapFromFile(String path)
DefaultHttpProxyServer using defaults from the
given file.path - public int getIdleConnectionTimeout()
getIdleConnectionTimeout in interface HttpProxyServerpublic void setIdleConnectionTimeout(int idleConnectionTimeout)
setIdleConnectionTimeout in interface HttpProxyServerpublic InetSocketAddress getListenAddress()
HttpProxyServergetListenAddress in interface HttpProxyServerpublic HttpProxyServerBootstrap clone()
HttpProxyServerClone the existing server, with a port 1 higher and everything else the same.
The new server will share event loops with the original server. The event loops will use whatever name was given to the first server in the clone group.
clone in interface HttpProxyServerclone in class Objectpublic void stop()
HttpProxyServerstop in interface HttpProxyServerprotected void registerChannel(io.netty.channel.Channel channel)
Channel with this server, for later closing.channel - protected ChainedProxyManager getChainProxyManager()
protected MitmManager getMitmManager()
protected SslEngineSource getSslEngineSource()
protected ProxyAuthenticator getProxyAuthenticator()
public HttpFiltersSource getFiltersSource()
protected Collection<ActivityTracker> getActivityTrackers()
protected io.netty.channel.EventLoopGroup getProxyToServerWorkerFor(TransportProtocol transportProtocol)
Copyright © 2009-2013 LittleShoot. All Rights Reserved.