[fix] 修复客户端渗透服务端流量计算错误问题

This commit is contained in:
wujiawei 2024-11-09 20:18:27 +08:00
parent 8952d2277f
commit 1c6f56d31e
2 changed files with 4 additions and 0 deletions

View File

@ -56,6 +56,7 @@ public class ServerHandleReportClientTransferClientResponseTypeAdvanced extends
.clientId(clientId) .clientId(clientId)
.flow(clientConnectTagetNettyProxyMsg.getData().length) .flow(clientConnectTagetNettyProxyMsg.getData().length)
.build(); .build();
channelFlowAdapter.asyncHandler(channel, serverChannelFlow); channelFlowAdapter.asyncHandler(channel, serverChannelFlow);
}else { }else {
log.error("can not find the client:【{}】 channel",clientId); log.error("can not find the client:【{}】 channel",clientId);

View File

@ -59,6 +59,9 @@ public class NettyClientPermeateServerConnectRealSocket {
ChannelAttributeKeyUtils.buildVisitorId(realChannel, visitorId); ChannelAttributeKeyUtils.buildVisitorId(realChannel, visitorId);
String clientId = ChannelAttributeKeyUtils.getClientId(transferChannel);
ChannelAttributeKeyUtils.buildClientId(realChannel, clientId);
NettyProxyMsg myMsg = new NettyProxyMsg(); NettyProxyMsg myMsg = new NettyProxyMsg();
myMsg.setType(MessageType.DISTRIBUTE_CLIENT_TRANSFER_SERVER_PERMEATE_CHANNEL_CONNECTION_SUCCESSFUL); myMsg.setType(MessageType.DISTRIBUTE_CLIENT_TRANSFER_SERVER_PERMEATE_CHANNEL_CONNECTION_SUCCESSFUL);
myMsg.setVisitorId(visitorId); myMsg.setVisitorId(visitorId);