public class DefaultHttpProxyServer extends Object implements HttpProxyServer
| Constructor and Description |
|---|
DefaultHttpProxyServer(int port)
Creates a new proxy server.
|
DefaultHttpProxyServer(int port,
HttpRequestFilter requestFilter)
Creates a new proxy server.
|
DefaultHttpProxyServer(int port,
HttpRequestFilter requestFilter,
org.jboss.netty.channel.socket.ClientSocketChannelFactory clientChannelFactory,
org.jboss.netty.util.Timer timer,
org.jboss.netty.channel.socket.ServerSocketChannelFactory serverChannelFactory) |
DefaultHttpProxyServer(int port,
HttpRequestFilter requestFilter,
HttpResponseFilters responseFilters)
Creates a new proxy server.
|
DefaultHttpProxyServer(int port,
HttpResponseFilters responseFilters)
Creates a new proxy server.
|
DefaultHttpProxyServer(int port,
HttpResponseFilters responseFilters,
ChainProxyManager chainProxyManager,
HandshakeHandlerFactory handshakeHandlerFactory,
HttpRequestFilter requestFilter)
Creates a new proxy server.
|
DefaultHttpProxyServer(int port,
HttpResponseFilters responseFilters,
ChainProxyManager chainProxyManager,
HandshakeHandlerFactory handshakeHandlerFactory,
HttpRequestFilter requestFilter,
org.jboss.netty.channel.socket.ClientSocketChannelFactory clientChannelFactory,
org.jboss.netty.util.Timer timer,
org.jboss.netty.channel.socket.ServerSocketChannelFactory serverChannelFactory)
Creates a new proxy server.
|
DefaultHttpProxyServer(int port,
HttpResponseFilters responseFilters,
ChainProxyManager chainProxyManager,
HandshakeHandlerFactory handshakeHandlerFactory,
HttpRequestFilter requestFilter,
org.jboss.netty.channel.socket.ClientSocketChannelFactory clientChannelFactory,
org.jboss.netty.util.Timer timer,
org.jboss.netty.channel.socket.ServerSocketChannelFactory serverChannelFactory,
ProxyCacheManager cacheManager)
Creates a new proxy server.
|
DefaultHttpProxyServer(int port,
HttpResponseFilters responseFilters,
ProxyCacheManager cacheManager)
Creates a new proxy server.
|
DefaultHttpProxyServer(int port,
ProxyCacheManager cacheManager)
Creates a new proxy server.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addProxyAuthenticationHandler(ProxyAuthorizationHandler pah)
Adds a new handler for proxy authentication.
|
void |
start()
Starts the server.
|
void |
start(boolean localOnly,
boolean anyAddress)
Starts the server.
|
void |
stop()
Stops the server.
|
public DefaultHttpProxyServer(int port)
port - The port the server should run on.public DefaultHttpProxyServer(int port,
HttpResponseFilters responseFilters)
port - The port the server should run on.responseFilters - The Map of request domains to match
with associated HttpFilters for filtering responses to
those requests.public DefaultHttpProxyServer(int port,
HttpResponseFilters responseFilters,
ProxyCacheManager cacheManager)
port - The port the server should run on.responseFilters - The Map of request domains to match
with associated HttpFilters for filtering responses to
those requests.public DefaultHttpProxyServer(int port,
HttpRequestFilter requestFilter)
port - The port the server should run on.requestFilter - The filter for HTTP requests.public DefaultHttpProxyServer(int port,
ProxyCacheManager cacheManager)
port - The port the server should run on.requestFilter - The filter for HTTP requests.public DefaultHttpProxyServer(int port,
HttpRequestFilter requestFilter,
HttpResponseFilters responseFilters)
port - The port the server should run on.requestFilter - The filter for HTTP requests.responseFilters - HTTP filters to apply.public DefaultHttpProxyServer(int port,
HttpRequestFilter requestFilter,
org.jboss.netty.channel.socket.ClientSocketChannelFactory clientChannelFactory,
org.jboss.netty.util.Timer timer,
org.jboss.netty.channel.socket.ServerSocketChannelFactory serverChannelFactory)
port - The port the server should run on.requestFilter - Optional filter for modifying incoming requests.
Often null.clientChannelFactory - The factory for creating outgoing channels
to external sites.timer - The global timer for timing out idle connections.serverChannelFactory - The factory for creating listening channels
for incoming connections.public DefaultHttpProxyServer(int port,
HttpResponseFilters responseFilters,
ChainProxyManager chainProxyManager,
HandshakeHandlerFactory handshakeHandlerFactory,
HttpRequestFilter requestFilter)
port - The port the server should run on.responseFilters - The Map of request domains to match
with associated HttpFilters for filtering responses to
those requests.chainProxyManager - The proxy to send requests to if chaining
proxies. Typically null.ksm - The key manager if running the proxy over SSL.requestFilter - Optional filter for modifying incoming requests.
Often null.public DefaultHttpProxyServer(int port,
HttpResponseFilters responseFilters,
ChainProxyManager chainProxyManager,
HandshakeHandlerFactory handshakeHandlerFactory,
HttpRequestFilter requestFilter,
org.jboss.netty.channel.socket.ClientSocketChannelFactory clientChannelFactory,
org.jboss.netty.util.Timer timer,
org.jboss.netty.channel.socket.ServerSocketChannelFactory serverChannelFactory)
port - The port the server should run on.responseFilters - The Map of request domains to match
with associated HttpFilters for filtering responses to
those requests.chainProxyManager - The proxy to send requests to if chaining
proxies. Typically null.ksm - The key manager if running the proxy over SSL.requestFilter - Optional filter for modifying incoming requests.
Often null.clientChannelFactory - The factory for creating outgoing channels
to external sites.timer - The global timer for timing out idle connections.serverChannelFactory - The factory for creating listening channels
for incoming connections.public DefaultHttpProxyServer(int port,
HttpResponseFilters responseFilters,
ChainProxyManager chainProxyManager,
HandshakeHandlerFactory handshakeHandlerFactory,
HttpRequestFilter requestFilter,
org.jboss.netty.channel.socket.ClientSocketChannelFactory clientChannelFactory,
org.jboss.netty.util.Timer timer,
org.jboss.netty.channel.socket.ServerSocketChannelFactory serverChannelFactory,
ProxyCacheManager cacheManager)
port - The port the server should run on.responseFilters - The Map of request domains to match
with associated HttpFilters for filtering responses to
those requests.chainProxyManager - The proxy to send requests to if chaining
proxies. Typically null.ksm - The key manager if running the proxy over SSL.requestFilter - Optional filter for modifying incoming requests.
Often null.clientChannelFactory - The factory for creating outgoing channels
to external sites.timer - The global timer for timing out idle connections.serverChannelFactory - The factory for creating listening channels
for incoming connections.public void start()
HttpProxyServerstart in interface HttpProxyServerpublic void start(boolean localOnly,
boolean anyAddress)
HttpProxyServerstart in interface HttpProxyServerlocalOnly - If true, the server will only allow connections from
the local computer. This can significantly improve security in some
cases.anyAddress - Whether or not to bind to "any" address - 0.0.0.0.
This is the default.public void stop()
HttpProxyServerstop in interface HttpProxyServerpublic void addProxyAuthenticationHandler(ProxyAuthorizationHandler pah)
HttpProxyServeraddProxyAuthenticationHandler in interface HttpProxyServerpah - The new authentication handler.Copyright © 2009-2013 LittleShoot. All Rights Reserved.