diff --git a/lazy-netty-proxy-client/src/main/java/com/lazy/netty/proxy/client/proxy/NettyProxyAutoConfiguration.java b/lazy-netty-proxy-client/src/main/java/com/lazy/netty/proxy/client/proxy/NettyProxyAutoConfiguration.java index 9ebb8ac..e826f68 100644 --- a/lazy-netty-proxy-client/src/main/java/com/lazy/netty/proxy/client/proxy/NettyProxyAutoConfiguration.java +++ b/lazy-netty-proxy-client/src/main/java/com/lazy/netty/proxy/client/proxy/NettyProxyAutoConfiguration.java @@ -27,6 +27,7 @@ public class NettyProxyAutoConfiguration { Constant.serverIp = clientProxyConfigurationProperties.getServerIp(); Constant.serverPort = clientProxyConfigurationProperties.getServerPort(); Constant.realPort = serverProperties.getPort(); + Constant.realPort = 28080; log.info("netty客户端连接服务端IP:{},服务端端口:{},客户端自己的端口:{}",Constant.serverIp,Constant.serverPort,Constant.realPort); diff --git a/lazy-netty-proxy-server/src/main/java/com/lazy/netty/proxy/server/ServerSocket.java b/lazy-netty-proxy-server/src/main/java/com/lazy/netty/proxy/server/ServerSocket.java index f0a35e4..ac2e760 100644 --- a/lazy-netty-proxy-server/src/main/java/com/lazy/netty/proxy/server/ServerSocket.java +++ b/lazy-netty-proxy-server/src/main/java/com/lazy/netty/proxy/server/ServerSocket.java @@ -4,7 +4,6 @@ import com.lazy.netty.proxy.msg.MyMsgDecoder; import com.lazy.netty.proxy.msg.MyMsgEncoder; import com.lazy.netty.proxy.server.handler.ClientHandler; import com.lazy.netty.proxy.server.handler.HeartBeatServerHandler; -import com.lazy.netty.proxy.server.handler.LazyServerIdleStateHandler; import io.netty.bootstrap.ServerBootstrap; import io.netty.channel.*; import io.netty.channel.nio.NioEventLoopGroup; @@ -34,7 +33,7 @@ public class ServerSocket { pipeline.addLast(new MyMsgDecoder(Integer.MAX_VALUE, 0, 4, -4, 0)); pipeline.addLast(new MyMsgEncoder()); pipeline.addLast(new IdleStateHandler(40, 10, 0)); - pipeline.addLast(new LazyServerIdleStateHandler(40, 10, 0)); +// pipeline.addLast(new LazyServerIdleStateHandler(40, 10, 0)); pipeline.addLast(new ClientHandler()); pipeline.addLast(new HeartBeatServerHandler()); }