Package net.i2p.i2ptunnel.socks
Class SOCKS4aServer
- java.lang.Object
-
- net.i2p.i2ptunnel.socks.SOCKSServer
-
- net.i2p.i2ptunnel.socks.SOCKS4aServer
-
class SOCKS4aServer extends SOCKSServer
-
-
Field Summary
-
Fields inherited from class net.i2p.i2ptunnel.socks.SOCKSServer
_context, _log, addressType, clientSock, connHostName, connPort, props
-
-
Constructor Summary
Constructors Constructor Description SOCKS4aServer(I2PAppContext ctx, Socket clientSock, Properties props)
Create a SOCKS4a server that communicates with the client using the specified socket.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
confirmConnection()
Confirm to the client that the connection has succeededSocket
getClientSocket()
Get a socket that can be used to send/receive 8-bit clean data to/from the client.I2PSocket
getDestinationI2PSocket(I2PSOCKSTunnel t)
Get an I2PSocket that can be used to send/receive 8-bit clean data to/from the destination of the SOCKS connection.protected void
setupServer()
Perform server initialization (expecially regarding protected variables).-
Methods inherited from class net.i2p.i2ptunnel.socks.SOCKSServer
getMappedDomainNameForIP, getOutproxyPlugin
-
-
-
-
Constructor Detail
-
SOCKS4aServer
public SOCKS4aServer(I2PAppContext ctx, Socket clientSock, Properties props)
Create a SOCKS4a server that communicates with the client using the specified socket. This method should not be invoked directly: new SOCKS4aServer objects should be created by using SOCKSServerFactory.createSOCSKServer(). It is assumed that the SOCKS VER field has been stripped from the input stream of the client socket.- Parameters:
clientSock
- client socketprops
- non-null
-
-
Method Detail
-
getClientSocket
public Socket getClientSocket() throws SOCKSException
Description copied from class:SOCKSServer
Get a socket that can be used to send/receive 8-bit clean data to/from the client.- Specified by:
getClientSocket
in classSOCKSServer
- Returns:
- a Socket connected with the client
- Throws:
SOCKSException
-
setupServer
protected void setupServer() throws SOCKSException
Description copied from class:SOCKSServer
Perform server initialization (expecially regarding protected variables).- Specified by:
setupServer
in classSOCKSServer
- Throws:
SOCKSException
-
confirmConnection
protected void confirmConnection() throws SOCKSException
Description copied from class:SOCKSServer
Confirm to the client that the connection has succeeded- Specified by:
confirmConnection
in classSOCKSServer
- Throws:
SOCKSException
-
getDestinationI2PSocket
public I2PSocket getDestinationI2PSocket(I2PSOCKSTunnel t) throws SOCKSException
Get an I2PSocket that can be used to send/receive 8-bit clean data to/from the destination of the SOCKS connection.- Specified by:
getDestinationI2PSocket
in classSOCKSServer
- Returns:
- an I2PSocket connected with the destination
- Throws:
SOCKSException
-
-