java.lang.Object
net.i2p.i2ptunnel.socks.SOCKSServerFactory

class SOCKSServerFactoryextends Object
Factory class for creating SOCKS forwarders through I2P.
  • Field Details

  • Constructor Details

  • 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 server
      s - a Socket used to choose the SOCKS server type
      props - 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