mirror of
https://gitee.com/wujiawei1207537021/wu-lazy-cloud-network.git
synced 2025-06-07 05:47:57 +08:00
【fix】修复流量计费bug
This commit is contained in:
parent
a5a832aa1d
commit
4f58a675d0
@ -75,9 +75,11 @@ public class NettyClientPermeateClientVisitorHandler extends SimpleChannelInboun
|
|||||||
|
|
||||||
// 使用访客的通信通道
|
// 使用访客的通信通道
|
||||||
Integer visitorPort = internalNetworkClientPermeateClientVisitor.getVisitorPort();
|
Integer visitorPort = internalNetworkClientPermeateClientVisitor.getVisitorPort();
|
||||||
|
String clientId = internalNetworkClientPermeateClientVisitor.getNettyClientProperties().getClientId();
|
||||||
NettyProxyMsg nettyProxyMsg = new NettyProxyMsg();
|
NettyProxyMsg nettyProxyMsg = new NettyProxyMsg();
|
||||||
nettyProxyMsg.setType(MessageType.REPORT_CLIENT_TRANSFER_CLIENT_REQUEST);
|
nettyProxyMsg.setType(MessageType.REPORT_CLIENT_TRANSFER_CLIENT_REQUEST);
|
||||||
nettyProxyMsg.setVisitorId(visitorId);
|
nettyProxyMsg.setVisitorId(visitorId);
|
||||||
|
nettyProxyMsg.setClientId(clientId);
|
||||||
nettyProxyMsg.setVisitorPort(visitorPort);
|
nettyProxyMsg.setVisitorPort(visitorPort);
|
||||||
nettyProxyMsg.setData(bytes);
|
nettyProxyMsg.setData(bytes);
|
||||||
nextChannel.writeAndFlush(nettyProxyMsg);
|
nextChannel.writeAndFlush(nettyProxyMsg);
|
||||||
|
@ -74,9 +74,11 @@ public class NettyClientPermeateServerVisitorHandler extends SimpleChannelInboun
|
|||||||
|
|
||||||
// 使用访客的通信通道
|
// 使用访客的通信通道
|
||||||
Integer visitorPort = internalNetworkPermeateServerVisitor.getVisitorPort();
|
Integer visitorPort = internalNetworkPermeateServerVisitor.getVisitorPort();
|
||||||
|
String clientId = internalNetworkPermeateServerVisitor.getNettyClientProperties().getClientId();
|
||||||
NettyProxyMsg nettyProxyMsg = new NettyProxyMsg();
|
NettyProxyMsg nettyProxyMsg = new NettyProxyMsg();
|
||||||
nettyProxyMsg.setType(MessageType.REPORT_CLIENT_TRANSFER);
|
nettyProxyMsg.setType(MessageType.REPORT_CLIENT_TRANSFER);
|
||||||
nettyProxyMsg.setVisitorId(visitorId);
|
nettyProxyMsg.setVisitorId(visitorId);
|
||||||
|
nettyProxyMsg.setClientId(clientId);
|
||||||
nettyProxyMsg.setVisitorPort(visitorPort);
|
nettyProxyMsg.setVisitorPort(visitorPort);
|
||||||
nettyProxyMsg.setData(bytes);
|
nettyProxyMsg.setData(bytes);
|
||||||
nextChannel.writeAndFlush(nettyProxyMsg);
|
nextChannel.writeAndFlush(nettyProxyMsg);
|
||||||
|
@ -101,11 +101,7 @@ public class NettyClientPermeateServerVisitorTransferSocket {
|
|||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
log.info("每隔2s重连....");
|
log.info("客户端渗透服务端通信通道中断....");
|
||||||
// 离线
|
|
||||||
channel.eventLoop().schedule(() -> {
|
|
||||||
newTransferConnect2Server(internalNetworkPermeateServerVisitor);
|
|
||||||
}, 2, TimeUnit.SECONDS);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user