Class Socks5ProxyHandler

  • All Implemented Interfaces:
    io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler, io.netty.channel.ChannelOutboundHandler

    public final class Socks5ProxyHandler
    extends ProxyHandler
    Handler that establishes a blind forwarding proxy tunnel using SOCKS Protocol Version 5.
    • Constructor Detail

      • Socks5ProxyHandler

        public Socks5ProxyHandler​(SocketAddress proxyAddress)
      • Socks5ProxyHandler

        public Socks5ProxyHandler​(SocketAddress proxyAddress,
                                  byte privateAuthMethod,
                                  byte[] privateToken,
                                  io.netty.handler.codec.socksx.v5.Socks5ClientEncoder customEncoder)
        Creates a new SOCKS5 proxy handler with a custom private authentication method.
        Parameters:
        proxyAddress - The address of the SOCKS5 proxy server
        privateAuthMethod - The private authentication method code (must be in range 0x80-0xFE)
        privateToken - The token to use for private authentication
        customEncoder - The custom encoder to use for encoding SOCKS5 messages, if null the Socks5ClientEncoder.DEFAULT will be used
        Throws:
        IllegalArgumentException - If privateAuthMethod is not in the valid range