public final class Socks4ProxyHandler extends ProxyHandler
ChannelHandler.Sharable| Constructor and Description |
|---|
Socks4ProxyHandler(SocketAddress proxyAddress) |
Socks4ProxyHandler(SocketAddress proxyAddress,
String username) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addCodec(ChannelHandlerContext ctx)
Adds the codec handlers required to communicate with the proxy server.
|
String |
authScheme()
Returns the name of the authentication scheme in use.
|
protected boolean |
handleResponse(ChannelHandlerContext ctx,
Object response)
Handles the message received from the proxy server.
|
protected Object |
newInitialMessage(ChannelHandlerContext ctx)
Returns a new message that is sent at first time when the connection to the proxy server has been established.
|
String |
protocol()
Returns the name of the proxy protocol in use.
|
protected void |
removeDecoder(ChannelHandlerContext ctx)
Removes the decoders added in
ProxyHandler.addCodec(ChannelHandlerContext). |
protected void |
removeEncoder(ChannelHandlerContext ctx)
Removes the encoders added in
ProxyHandler.addCodec(ChannelHandlerContext). |
String |
username() |
channelActive, channelInactive, channelRead, channelReadComplete, connect, connectFuture, connectTimeoutMillis, destinationAddress, exceptionCaught, exceptionMessage, flush, handlerAdded, isConnected, proxyAddress, sendToProxyServer, setConnectTimeoutMillis, writebind, close, deregister, disconnect, readchannelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggeredensureNotSharable, handlerRemoved, isSharableclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithandlerRemovedpublic Socks4ProxyHandler(SocketAddress proxyAddress)
public Socks4ProxyHandler(SocketAddress proxyAddress, String username)
public String protocol()
ProxyHandlerprotocol in class ProxyHandlerpublic String authScheme()
ProxyHandlerauthScheme in class ProxyHandlerpublic String username()
protected void addCodec(ChannelHandlerContext ctx) throws Exception
ProxyHandleraddCodec in class ProxyHandlerExceptionprotected void removeEncoder(ChannelHandlerContext ctx) throws Exception
ProxyHandlerProxyHandler.addCodec(ChannelHandlerContext).removeEncoder in class ProxyHandlerExceptionprotected void removeDecoder(ChannelHandlerContext ctx) throws Exception
ProxyHandlerProxyHandler.addCodec(ChannelHandlerContext).removeDecoder in class ProxyHandlerExceptionprotected Object newInitialMessage(ChannelHandlerContext ctx) throws Exception
ProxyHandlernewInitialMessage in class ProxyHandlernull if the proxy server is expected to send the first message insteadExceptionprotected boolean handleResponse(ChannelHandlerContext ctx, Object response) throws Exception
ProxyHandlerhandleResponse in class ProxyHandlertrue 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 serverExceptionCopyright © 2008–2025 The Netty Project. All rights reserved.