public class DefaultHttpProxyServer extends Object implements HttpProxyServer
Constructor and Description |
---|
DefaultHttpProxyServer(int port)
Creates a new proxy server.
|
DefaultHttpProxyServer(int port,
HttpRequestFilter requestFilter,
Map<String,HttpFilter> responseFilters)
Creates a new proxy server.
|
DefaultHttpProxyServer(int port,
Map<String,HttpFilter> filters) |
DefaultHttpProxyServer(int port,
Map<String,HttpFilter> filters,
String chainProxyHostAndPort,
KeyStoreManager ksm,
HttpRequestFilter requestFilter)
Creates a new proxy server.
|
Modifier and Type | Method and Description |
---|---|
void |
addProxyAuthenticationHandler(ProxyAuthorizationHandler pah)
Adds a new handler for proxy authentication.
|
KeyStoreManager |
getKeyStoreManager() |
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, Map<String,HttpFilter> filters)
public DefaultHttpProxyServer(int port, HttpRequestFilter requestFilter, Map<String,HttpFilter> responseFilters)
port
- The port the server should run on.requestFilter
- The filter for HTTP requests.responseFilters
- HTTP filters to apply.public DefaultHttpProxyServer(int port, Map<String,HttpFilter> filters, String chainProxyHostAndPort, KeyStoreManager ksm, HttpRequestFilter requestFilter)
port
- The port the server should run on.filters
- HTTP filters to apply.public void start()
HttpProxyServer
start
in interface HttpProxyServer
public void start(boolean localOnly, boolean anyAddress)
HttpProxyServer
start
in interface HttpProxyServer
localOnly
- 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()
HttpProxyServer
stop
in interface HttpProxyServer
public void addProxyAuthenticationHandler(ProxyAuthorizationHandler pah)
HttpProxyServer
addProxyAuthenticationHandler
in interface HttpProxyServer
pah
- The new authentication handler.public KeyStoreManager getKeyStoreManager()
Copyright © 2009-2013 LittleShoot. All Rights Reserved.