java.lang.Object
net.i2p.i2ptunnel.socks.SOCKSServerFactory
Factory class for creating SOCKS forwarders through I2P.
Field Summary
FieldsConstructor Summary
ConstructorsConstructorDescriptioncreateSOCKSServer(I2PAppContext, Socket, Properties)is static and the only field is the HTTP-rejection text, so an instance carries nothing.Method Summary
All MethodsModifier and TypeMethodDescriptionstatic SOCKSServercreateSOCKSServer(I2PAppContext ctx, Socket s, Properties props) Create a new SOCKS server, using the provided socket (that must be connected to a client) to select the proper SOCKS protocol version.
Field Details
ERR_REQUEST_DENIED
SOCKS5 reply refusing the request.- See Also:
Constructor Details
SOCKSServerFactory
SOCKSServerFactory()createSOCKSServer(I2PAppContext, Socket, Properties)is static and the only field is the HTTP-rejection text, so an instance carries nothing.
Method Details
createSOCKSServer
public static SOCKSServer createSOCKSServer(I2PAppContext ctx, Socket s, Properties props) throws SOCKSException Create a new SOCKS server, using the provided socket (that must be connected to a client) to select the proper SOCKS protocol version. This method wil strip the SOCKS VER field from the provided sockets's input stream.- Parameters:
ctx- the application context handed to the chosen SOCKS servers- a Socket used to choose the SOCKS server typeprops- non-null- Returns:
- a server speaking the version named in the socket's VER field
- Throws:
SOCKSException- if the version is unsupported, authorization is required for SOCKS 4, an HTTP request arrived, or the socket failed