mirror of
https://gitee.com/wujiawei1207537021/wu-lazy-cloud-network.git
synced 2025-06-06 21:37:56 +08:00
【fix】修复客户端渗透客户端问题 通道关闭错误
This commit is contained in:
parent
69e761e46f
commit
bc1c2b008b
@ -78,14 +78,6 @@ public class NettyClientPermeateServerVisitorHandler extends SimpleChannelInboun
|
|||||||
nettyProxyMsg.setData(bytes);
|
nettyProxyMsg.setData(bytes);
|
||||||
nextChannel.writeAndFlush(nettyProxyMsg);
|
nextChannel.writeAndFlush(nettyProxyMsg);
|
||||||
// 处理访客流量
|
// 处理访客流量
|
||||||
// ServerChannelFlow serverChannelFlow = ServerChannelFlow
|
|
||||||
// .builder()
|
|
||||||
// .channelFlowEnum(ChannelFlowEnum.IN_FLOW)
|
|
||||||
// .port(visitorPort)
|
|
||||||
// .clientId(clientId)
|
|
||||||
// .flow(bytes.length)
|
|
||||||
// .build();
|
|
||||||
// channelFlowAdapter.asyncHandler(visitorChannel, serverChannelFlow);
|
|
||||||
log.debug("【客户端渗透服务端】访客端口成功发送数据了");
|
log.debug("【客户端渗透服务端】访客端口成功发送数据了");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,10 +48,10 @@ public class ServerHandleReportClientPermeateServerTransferTypeAdvanced extends
|
|||||||
ChannelFuture channelFuture = nextChannel.writeAndFlush(buf);
|
ChannelFuture channelFuture = nextChannel.writeAndFlush(buf);
|
||||||
boolean success = channelFuture.isSuccess();
|
boolean success = channelFuture.isSuccess();
|
||||||
log.debug("visitor writerAndFlush status: {}", success);
|
log.debug("visitor writerAndFlush status: {}", success);
|
||||||
// 记录出口数据
|
// 记录进口数据
|
||||||
ServerChannelFlow serverChannelFlow = ServerChannelFlow
|
ServerChannelFlow serverChannelFlow = ServerChannelFlow
|
||||||
.builder()
|
.builder()
|
||||||
.channelFlowEnum(ChannelFlowEnum.OUT_FLOW)
|
.channelFlowEnum(ChannelFlowEnum.IN_FLOW)
|
||||||
.port(visitorPort)
|
.port(visitorPort)
|
||||||
.clientId(clientId)
|
.clientId(clientId)
|
||||||
.flow(msg.getData().length)
|
.flow(msg.getData().length)
|
||||||
|
@ -35,7 +35,7 @@ public class NettyClientPermeateServerRealHandler extends SimpleChannelInboundHa
|
|||||||
Channel channel = ctx.channel();
|
Channel channel = ctx.channel();
|
||||||
byte[] bytes = nettyByteBuf.getData();
|
byte[] bytes = nettyByteBuf.getData();
|
||||||
log.debug("bytes.length:{}",bytes.length);
|
log.debug("bytes.length:{}",bytes.length);
|
||||||
log.debug("接收客户端真实服务数据:{}", new String(bytes));
|
log.debug("【客户端渗透服务端】服务端真实服务数据:{}", new String(bytes));
|
||||||
Channel nextChannel = ChannelAttributeKeyUtils.getNextChannel(channel);
|
Channel nextChannel = ChannelAttributeKeyUtils.getNextChannel(channel);
|
||||||
// 消息下发到客户端
|
// 消息下发到客户端
|
||||||
|
|
||||||
@ -44,6 +44,15 @@ public class NettyClientPermeateServerRealHandler extends SimpleChannelInboundHa
|
|||||||
nettyMsg.setData(bytes);
|
nettyMsg.setData(bytes);
|
||||||
|
|
||||||
nextChannel.writeAndFlush(nettyMsg);
|
nextChannel.writeAndFlush(nettyMsg);
|
||||||
|
// 记录出口数据
|
||||||
|
// ServerChannelFlow serverChannelFlow = ServerChannelFlow
|
||||||
|
// .builder()
|
||||||
|
// .channelFlowEnum(ChannelFlowEnum.OUT_FLOW)
|
||||||
|
// .port(visitorPort)
|
||||||
|
// .clientId(clientId)
|
||||||
|
// .flow(msg.getData().length)
|
||||||
|
// .build();
|
||||||
|
// channelFlowAdapter.asyncHandler(channel, serverChannelFlow);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user