public interface SocksProxyServer
SocksProxyServer
represents a SOCKS server.Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_SOCKS_PORT
SOCKS server default port.
|
Modifier and Type | Method and Description |
---|---|
void |
addSessionFilter(SessionFilter sessionFilter)
Adds
SessionFilter . |
void |
addSocksCommandFilter(SocksCommandFilter socksCommandFilter)
Adds a
SocksCommandFilter . |
SocksHandler |
createSocksHandler()
Create an instance
SocksHandler . |
int |
getBindPort() |
int |
getBufferSize()
Returns buffer size.
|
Map<Long,Session> |
getManagedSessions()
Gets all sessions that SOKCS server managed.
|
SocksProxy |
getProxy() |
int |
getTimeout()
Returns timeout.
|
void |
initializeSocksHandler(SocksHandler socksHandler)
Initializes
SocksHandler . |
void |
removeSessionFilter(SessionFilter sessionFilter)
Removes
SessionFilter . |
void |
removeSocksCommandFilter(SocksCommandFilter socksCommandFilter)
Removes a
SocksCommandFilter . |
void |
setBindPort(int bindPort) |
void |
setBufferSize(int bufferSize)
Sets buffer size.
|
void |
setProxy(SocksProxy proxy) |
void |
setSupportMethods(SocksMethod... methods)
Sets the methods that socks server supports.
|
void |
setTimeout(int timeout)
Sets timeout.
|
void |
shutdown()
Shutdown a SOCKS server.
|
void |
start()
Starts a SOCKS server.
|
void |
start(int bindPort)
Starts a SOCKS server and binds a port.
|
static final int DEFAULT_SOCKS_PORT
void start() throws IOException
IOException
- If any I/O error occurs.void start(int bindPort) throws IOException
bindPort
- The port that SOCKS server listened..IOException
- If any I/O error occurs.void shutdown()
SocksHandler createSocksHandler()
SocksHandler
.SocksHandler
.void initializeSocksHandler(SocksHandler socksHandler)
SocksHandler
.socksHandler
- The instance of SocksHandler
.void setSupportMethods(SocksMethod... methods)
methods
- The methods that SOCKS server sports.Map<Long,Session> getManagedSessions()
void setBufferSize(int bufferSize)
bufferSize
- Buffer size.int getBufferSize()
int getTimeout()
void setTimeout(int timeout)
timeout
- timeout.void addSocksCommandFilter(SocksCommandFilter socksCommandFilter)
SocksCommandFilter
.socksCommandFilter
- Instance of SocksCommandFilter
.void removeSocksCommandFilter(SocksCommandFilter socksCommandFilter)
SocksCommandFilter
.socksCommandFilter
- Instance of SocksCommandFilter
.void addSessionFilter(SessionFilter sessionFilter)
SessionFilter
.sessionFilter
- Instance of SessionFilter
.void removeSessionFilter(SessionFilter sessionFilter)
SessionFilter
.sessionFilter
- Instance of SessionFilter
.SocksProxy getProxy()
void setProxy(SocksProxy proxy)
int getBindPort()
void setBindPort(int bindPort)
Copyright © 2015. All rights reserved.