public final class io.netty.handler.proxy.Socks4ProxyHandler extends io.netty.handler.proxy.ProxyHandler
{
private static final java.lang.String PROTOCOL;
private static final java.lang.String AUTH_USERNAME;
private final java.lang.String username;
private java.lang.String decoderName;
private java.lang.String encoderName;
public void <init>(java.net.SocketAddress)
{
io.netty.handler.proxy.Socks4ProxyHandler v;
java.net.SocketAddress v;
v := @this: io.netty.handler.proxy.Socks4ProxyHandler;
v := @parameter: java.net.SocketAddress;
specialinvoke v.<io.netty.handler.proxy.Socks4ProxyHandler: void <init>(java.net.SocketAddress,java.lang.String)>(v, null);
return;
}
public void <init>(java.net.SocketAddress, java.lang.String)
{
java.net.SocketAddress v;
io.netty.handler.proxy.Socks4ProxyHandler v;
java.lang.String v;
boolean v;
v := @this: io.netty.handler.proxy.Socks4ProxyHandler;
v := @parameter: java.net.SocketAddress;
v := @parameter: java.lang.String;
specialinvoke v.<io.netty.handler.proxy.ProxyHandler: void <init>(java.net.SocketAddress)>(v);
if v == null goto label;
v = virtualinvoke v.<java.lang.String: boolean isEmpty()>();
if v == 0 goto label;
v = null;
label:
v.<io.netty.handler.proxy.Socks4ProxyHandler: java.lang.String username> = v;
return;
}
public java.lang.String protocol()
{
io.netty.handler.proxy.Socks4ProxyHandler v;
v := @this: io.netty.handler.proxy.Socks4ProxyHandler;
return "socks4";
}
public java.lang.String authScheme()
{
io.netty.handler.proxy.Socks4ProxyHandler v;
java.lang.String v, v;
v := @this: io.netty.handler.proxy.Socks4ProxyHandler;
v = v.<io.netty.handler.proxy.Socks4ProxyHandler: java.lang.String username>;
if v == null goto label;
v = "username";
goto label;
label:
v = "none";
label:
return v;
}
public java.lang.String username()
{
io.netty.handler.proxy.Socks4ProxyHandler v;
java.lang.String v;
v := @this: io.netty.handler.proxy.Socks4ProxyHandler;
v = v.<io.netty.handler.proxy.Socks4ProxyHandler: java.lang.String username>;
return v;
}
protected void addCodec(io.netty.channel.ChannelHandlerContext) throws java.lang.Exception
{
io.netty.channel.ChannelPipeline v;
io.netty.channel.ChannelHandlerContext v, v;
io.netty.handler.codec.socksx.v.Socks4ClientDecoder v;
io.netty.handler.proxy.Socks4ProxyHandler v;
io.netty.handler.codec.socksx.v.Socks4ClientEncoder v;
java.lang.String v, v, v, v, v;
v := @this: io.netty.handler.proxy.Socks4ProxyHandler;
v := @parameter: io.netty.channel.ChannelHandlerContext;
v = interfaceinvoke v.<io.netty.channel.ChannelHandlerContext: io.netty.channel.ChannelPipeline pipeline()>();
v = interfaceinvoke v.<io.netty.channel.ChannelHandlerContext: java.lang.String name()>();
v = new io.netty.handler.codec.socksx.v.Socks4ClientDecoder;
specialinvoke v.<io.netty.handler.codec.socksx.v.Socks4ClientDecoder: void <init>()>();
interfaceinvoke v.<io.netty.channel.ChannelPipeline: io.netty.channel.ChannelPipeline addBefore(java.lang.String,java.lang.String,io.netty.channel.ChannelHandler)>(v, null, v);
v = interfaceinvoke v.<io.netty.channel.ChannelPipeline: io.netty.channel.ChannelHandlerContext context(io.netty.channel.ChannelHandler)>(v);
v = interfaceinvoke v.<io.netty.channel.ChannelHandlerContext: java.lang.String name()>();
v.<io.netty.handler.proxy.Socks4ProxyHandler: java.lang.String decoderName> = v;
v = v.<io.netty.handler.proxy.Socks4ProxyHandler: java.lang.String decoderName>;
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (java.lang.String)>(v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("\u.encoder");
v.<io.netty.handler.proxy.Socks4ProxyHandler: java.lang.String encoderName> = v;
v = v.<io.netty.handler.proxy.Socks4ProxyHandler: java.lang.String encoderName>;
v = <io.netty.handler.codec.socksx.v.Socks4ClientEncoder: io.netty.handler.codec.socksx.v.Socks4ClientEncoder INSTANCE>;
interfaceinvoke v.<io.netty.channel.ChannelPipeline: io.netty.channel.ChannelPipeline addBefore(java.lang.String,java.lang.String,io.netty.channel.ChannelHandler)>(v, v, v);
return;
}
protected void removeEncoder(io.netty.channel.ChannelHandlerContext) throws java.lang.Exception
{
io.netty.channel.ChannelHandlerContext v;
io.netty.handler.proxy.Socks4ProxyHandler v;
io.netty.channel.ChannelPipeline v;
java.lang.String v;
v := @this: io.netty.handler.proxy.Socks4ProxyHandler;
v := @parameter: io.netty.channel.ChannelHandlerContext;
v = interfaceinvoke v.<io.netty.channel.ChannelHandlerContext: io.netty.channel.ChannelPipeline pipeline()>();
v = v.<io.netty.handler.proxy.Socks4ProxyHandler: java.lang.String encoderName>;
interfaceinvoke v.<io.netty.channel.ChannelPipeline: io.netty.channel.ChannelHandler remove(java.lang.String)>(v);
return;
}
protected void removeDecoder(io.netty.channel.ChannelHandlerContext) throws java.lang.Exception
{
io.netty.channel.ChannelHandlerContext v;
io.netty.handler.proxy.Socks4ProxyHandler v;
io.netty.channel.ChannelPipeline v;
java.lang.String v;
v := @this: io.netty.handler.proxy.Socks4ProxyHandler;
v := @parameter: io.netty.channel.ChannelHandlerContext;
v = interfaceinvoke v.<io.netty.channel.ChannelHandlerContext: io.netty.channel.ChannelPipeline pipeline()>();
v = v.<io.netty.handler.proxy.Socks4ProxyHandler: java.lang.String decoderName>;
interfaceinvoke v.<io.netty.channel.ChannelPipeline: io.netty.channel.ChannelHandler remove(java.lang.String)>(v);
return;
}
protected java.lang.Object newInitialMessage(io.netty.channel.ChannelHandlerContext) throws java.lang.Exception
{
java.net.SocketAddress v;
io.netty.handler.codec.socksx.v.Socks4CommandType v;
java.net.InetAddress v;
io.netty.channel.ChannelHandlerContext v;
int v;
io.netty.handler.proxy.Socks4ProxyHandler v;
io.netty.handler.codec.socksx.v.DefaultSocks4CommandRequest v;
java.lang.String v, v, v, v;
boolean v;
v := @this: io.netty.handler.proxy.Socks4ProxyHandler;
v := @parameter: io.netty.channel.ChannelHandlerContext;
v = virtualinvoke v.<io.netty.handler.proxy.Socks4ProxyHandler: java.net.SocketAddress destinationAddress()>();
v = virtualinvoke v.<java.net.InetSocketAddress: boolean isUnresolved()>();
if v == 0 goto label;
v = virtualinvoke v.<java.net.InetSocketAddress: java.lang.String getHostString()>();
goto label;
label:
v = virtualinvoke v.<java.net.InetSocketAddress: java.net.InetAddress getAddress()>();
v = virtualinvoke v.<java.net.InetAddress: java.lang.String getHostAddress()>();
label:
v = new io.netty.handler.codec.socksx.v.DefaultSocks4CommandRequest;
v = <io.netty.handler.codec.socksx.v.Socks4CommandType: io.netty.handler.codec.socksx.v.Socks4CommandType CONNECT>;
v = v;
v = virtualinvoke v.<java.net.InetSocketAddress: int getPort()>();
v = v.<io.netty.handler.proxy.Socks4ProxyHandler: java.lang.String username>;
if v == null goto label;
v = v.<io.netty.handler.proxy.Socks4ProxyHandler: java.lang.String username>;
goto label;
label:
v = "";
label:
specialinvoke v.<io.netty.handler.codec.socksx.v.DefaultSocks4CommandRequest: void <init>(io.netty.handler.codec.socksx.v.Socks4CommandType,java.lang.String,int,java.lang.String)>(v, v, v, v);
return v;
}
protected boolean handleResponse(io.netty.channel.ChannelHandlerContext, java.lang.Object) throws java.lang.Exception
{
io.netty.handler.proxy.ProxyConnectException v;
io.netty.handler.codec.socksx.v.Socks4CommandStatus v, v;
io.netty.channel.ChannelHandlerContext v;
io.netty.handler.proxy.Socks4ProxyHandler v;
java.lang.Object v;
java.lang.String v, v;
v := @this: io.netty.handler.proxy.Socks4ProxyHandler;
v := @parameter: io.netty.channel.ChannelHandlerContext;
v := @parameter: java.lang.Object;
v = interfaceinvoke v.<io.netty.handler.codec.socksx.v.Socks4CommandResponse: io.netty.handler.codec.socksx.v.Socks4CommandStatus status()>();
v = <io.netty.handler.codec.socksx.v.Socks4CommandStatus: io.netty.handler.codec.socksx.v.Socks4CommandStatus SUCCESS>;
if v != v goto label;
return 1;
label:
v = new io.netty.handler.proxy.ProxyConnectException;
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (io.netty.handler.codec.socksx.v.Socks4CommandStatus)>(v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("status: \u0001");
v = virtualinvoke v.<io.netty.handler.proxy.Socks4ProxyHandler: java.lang.String exceptionMessage(java.lang.String)>(v);
specialinvoke v.<io.netty.handler.proxy.ProxyConnectException: void <init>(java.lang.String)>(v);
throw v;
}
}