【fix】init route ip

This commit is contained in:
wujiawei
2025-05-13 11:15:21 +08:00
parent a3c88ffa9f
commit 32a641ce99
8 changed files with 119 additions and 14 deletions

View File

@ -26,7 +26,7 @@ public class NettyProxy2RealInboundHandler extends ChannelInboundHandlerAdapter
@Override
public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
log.info("转发客户端的请求到代理服务器");
log.info("本地转发客户端的请求到代理服务器");
if (dstChannelFuture.channel().isActive()) {
dstChannelFuture.channel().writeAndFlush(msg);
} else {

View File

@ -25,6 +25,7 @@ public class RouteContext {
String virtualPort = route.getVirtualPort();
String key = virtualIp + ":" + virtualPort + "_" + routeType;
if (m.containsKey(key)) {
m.put(key, route);
return;
}
// TODO 验证ip、端口、类型