public final class Socks4ProxyHandler extends ProxyHandler
ChannelHandler.Sharable| 构造器和说明 |
|---|
Socks4ProxyHandler(java.net.SocketAddress proxyAddress) |
Socks4ProxyHandler(java.net.SocketAddress proxyAddress,
java.lang.String username) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected void |
addCodec(ChannelHandlerContext ctx)
Adds the codec handlers required to communicate with the proxy server.
|
java.lang.String |
authScheme()
Returns the name of the authentication scheme in use.
|
protected boolean |
handleResponse(ChannelHandlerContext ctx,
java.lang.Object response)
Handles the message received from the proxy server.
|
protected java.lang.Object |
newInitialMessage(ChannelHandlerContext ctx)
Returns a new message that is sent at first time when the connection to the proxy server has been established.
|
java.lang.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). |
java.lang.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(java.net.SocketAddress proxyAddress)
public Socks4ProxyHandler(java.net.SocketAddress proxyAddress,
java.lang.String username)
public java.lang.String protocol()
ProxyHandlerprotocol 在类中 ProxyHandlerpublic java.lang.String authScheme()
ProxyHandlerauthScheme 在类中 ProxyHandlerpublic java.lang.String username()
protected void addCodec(ChannelHandlerContext ctx) throws java.lang.Exception
ProxyHandleraddCodec 在类中 ProxyHandlerjava.lang.Exceptionprotected void removeEncoder(ChannelHandlerContext ctx) throws java.lang.Exception
ProxyHandlerProxyHandler.addCodec(ChannelHandlerContext).removeEncoder 在类中 ProxyHandlerjava.lang.Exceptionprotected void removeDecoder(ChannelHandlerContext ctx) throws java.lang.Exception
ProxyHandlerProxyHandler.addCodec(ChannelHandlerContext).removeDecoder 在类中 ProxyHandlerjava.lang.Exceptionprotected java.lang.Object newInitialMessage(ChannelHandlerContext ctx) throws java.lang.Exception
ProxyHandlernewInitialMessage 在类中 ProxyHandlernull if the proxy server is expected to send the first message insteadjava.lang.Exceptionprotected boolean handleResponse(ChannelHandlerContext ctx, java.lang.Object response) throws java.lang.Exception
ProxyHandlerhandleResponse 在类中 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 serverjava.lang.Exception