mirror of
https://gitee.com/wujiawei1207537021/wu-lazy-cloud-network.git
synced 2026-02-04 15:05:54 +08:00
【fix】授权调整
This commit is contained in:
@@ -45,8 +45,13 @@ public class NettyTcpProxyFilter extends DebugChannelInitializer<SocketChannel>
|
||||
pipeline.addLast(Socks5ServerEncoder.DEFAULT);
|
||||
// 初始化连接
|
||||
pipeline.addLast(new Socks5InitialRequestDecoder());
|
||||
pipeline.addLast(new NettySocks5InitialRequestHandler(protocolProxyProperties,nettyPasswordAuth));
|
||||
pipeline.addLast(new NettySocks5InitialRequestHandler(protocolProxyProperties, nettyPasswordAuth));
|
||||
|
||||
if (protocolProxyProperties.getAuthentication()) {
|
||||
// 认证
|
||||
pipeline.addLast(new Socks5PasswordAuthRequestDecoder());
|
||||
pipeline.addLast(new NettySocks5PasswordAuthRequestInboundHandler(nettyPasswordAuth));
|
||||
}
|
||||
|
||||
// 连接请求
|
||||
pipeline.addLast(new Socks5CommandRequestDecoder());
|
||||
|
||||
@@ -34,11 +34,6 @@ public class NettySocks5InitialRequestHandler extends SimpleChannelInboundHandle
|
||||
Socks5InitialResponse socks5InitialResponse =
|
||||
new DefaultSocks5InitialResponse(Socks5AuthMethod.PASSWORD);
|
||||
ctx.writeAndFlush(socks5InitialResponse);
|
||||
// 认证
|
||||
ctx.pipeline().addLast(new Socks5PasswordAuthRequestDecoder());
|
||||
ctx.pipeline().addLast(new NettySocks5PasswordAuthRequestInboundHandler(nettyPasswordAuth));
|
||||
|
||||
|
||||
}else {
|
||||
// 不验证账号密码
|
||||
Socks5InitialResponse socks5InitialResponse =
|
||||
|
||||
Reference in New Issue
Block a user