Class Socks5ProxyHandler

    • Constructor Detail

      • Socks5ProxyHandler

        public Socks5ProxyHandler​(java.net.SocketAddress proxyAddress)
      • Socks5ProxyHandler

        public Socks5ProxyHandler​(java.net.SocketAddress proxyAddress,
                                  java.lang.String username,
                                  java.lang.String password)
    • Method Detail

      • protocol

        public java.lang.String protocol()
        Description copied from class: ProxyHandler
        Returns the name of the proxy protocol in use.
        Specified by:
        protocol in class ProxyHandler
      • authScheme

        public java.lang.String authScheme()
        Description copied from class: ProxyHandler
        Returns the name of the authentication scheme in use.
        Specified by:
        authScheme in class ProxyHandler
      • username

        public java.lang.String username()
      • password

        public java.lang.String password()
      • addCodec

        protected void addCodec​(ChannelHandlerContext ctx)
                         throws java.lang.Exception
        Description copied from class: ProxyHandler
        Adds the codec handlers required to communicate with the proxy server.
        Specified by:
        addCodec in class ProxyHandler
        Throws:
        java.lang.Exception
      • newInitialMessage

        protected java.lang.Object newInitialMessage​(ChannelHandlerContext ctx)
                                              throws java.lang.Exception
        Description copied from class: ProxyHandler
        Returns a new message that is sent at first time when the connection to the proxy server has been established.
        Specified by:
        newInitialMessage in class ProxyHandler
        Returns:
        the initial message, or null if the proxy server is expected to send the first message instead
        Throws:
        java.lang.Exception
      • handleResponse

        protected boolean handleResponse​(ChannelHandlerContext ctx,
                                         java.lang.Object response)
                                  throws java.lang.Exception
        Description copied from class: ProxyHandler
        Handles the message received from the proxy server.
        Specified by:
        handleResponse in class ProxyHandler
        Returns:
        true if the connection to the destination has been established, false if the connection to the destination has not been established and more messages are expected from the proxy server
        Throws:
        java.lang.Exception