mirror of
https://gitee.com/wujiawei1207537021/wu-lazy-cloud-network.git
synced 2026-02-04 15:05:54 +08:00
[update] 显式指定注解处理器,4.x
This commit is contained in:
@@ -15,8 +15,8 @@ import org.springframework.stereotype.Component;
|
||||
@Component
|
||||
public class NettyTcpServerSocketApplicationListener implements SocketApplicationListener {
|
||||
|
||||
private final EventLoopGroup bossGroup = new NioEventLoopGroup();
|
||||
private final EventLoopGroup workerGroup = new NioEventLoopGroup();
|
||||
private final EventLoopGroup bossGroup = new MultiThreadIoEventLoopGroup(NioIoHandler.newFactory());
|
||||
private final EventLoopGroup workerGroup = new MultiThreadIoEventLoopGroup(NioIoHandler.newFactory());
|
||||
private final NettyTcpServerFilter nettyTcpServerFilter;// 通道业务处理
|
||||
private final ServerNodeProperties serverNodeProperties;
|
||||
private ChannelFuture channelFuture;
|
||||
|
||||
@@ -18,7 +18,7 @@ import org.springframework.stereotype.Component;
|
||||
//@Component
|
||||
public class NettyUdpServerSocketApplicationListener implements SocketApplicationListener {
|
||||
|
||||
private final EventLoopGroup bossGroup = "linux".equalsIgnoreCase(SystemPropertyUtil.get("os.name")) ? new EpollEventLoopGroup() : new NioEventLoopGroup();
|
||||
private final EventLoopGroup bossGroup = "linux".equalsIgnoreCase(SystemPropertyUtil.get("os.name")) ? new EpollEventLoopGroup() : new MultiThreadIoEventLoopGroup(NioIoHandler.newFactory());
|
||||
private final NettyUdpServerFilter nettyUdpServerFilter;// 通道业务处理
|
||||
private final ServerNodeProperties serverNodeProperties;
|
||||
private ChannelFuture channelFuture;
|
||||
|
||||
@@ -14,8 +14,8 @@ import org.framework.lazy.cloud.network.heartbeat.server.netty.permeate.tcp.filt
|
||||
*/
|
||||
@Deprecated
|
||||
public class NettyOnCloudNettyServerSocket {
|
||||
private final EventLoopGroup bossGroup = new NioEventLoopGroup();
|
||||
private final EventLoopGroup workerGroup = new NioEventLoopGroup();
|
||||
private final EventLoopGroup bossGroup = new MultiThreadIoEventLoopGroup(NioIoHandler.newFactory());
|
||||
private final EventLoopGroup workerGroup = new MultiThreadIoEventLoopGroup(NioIoHandler.newFactory());
|
||||
private final NettyTcpServerFilter nettyTcpServerFilter;// 通道业务处理
|
||||
private ChannelFuture channelFuture;
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ import java.util.concurrent.TimeUnit;
|
||||
*/
|
||||
@Slf4j
|
||||
public class NettyTcpClientPermeateServerConnectRealSocket {
|
||||
private static final EventLoopGroup eventLoopGroup = new NioEventLoopGroup();
|
||||
private static final EventLoopGroup eventLoopGroup = new MultiThreadIoEventLoopGroup(NioIoHandler.newFactory());
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -17,7 +17,7 @@ import java.util.concurrent.TimeUnit;
|
||||
*/
|
||||
@Slf4j
|
||||
public class NettyTcpServerPermeateServerConnectRealSocket {
|
||||
private static final EventLoopGroup eventLoopGroup = new NioEventLoopGroup();
|
||||
private static final EventLoopGroup eventLoopGroup = new MultiThreadIoEventLoopGroup(NioIoHandler.newFactory());
|
||||
|
||||
/**
|
||||
* 连接真实服务
|
||||
|
||||
@@ -18,7 +18,7 @@ import java.util.concurrent.TimeUnit;
|
||||
*/
|
||||
@Slf4j
|
||||
public class NettyUdpClientPermeateServerConnectRealSocket {
|
||||
private static final EventLoopGroup eventLoopGroup = new NioEventLoopGroup();
|
||||
private static final EventLoopGroup eventLoopGroup = new MultiThreadIoEventLoopGroup(NioIoHandler.newFactory());
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -17,7 +17,7 @@ import java.util.concurrent.TimeUnit;
|
||||
*/
|
||||
@Slf4j
|
||||
public class NettyUdpServerPermeateServerConnectRealSocket {
|
||||
private static final EventLoopGroup eventLoopGroup = new NioEventLoopGroup();
|
||||
private static final EventLoopGroup eventLoopGroup = new MultiThreadIoEventLoopGroup(NioIoHandler.newFactory());
|
||||
|
||||
/**
|
||||
* 连接真实服务
|
||||
|
||||
@@ -18,7 +18,7 @@ import java.util.concurrent.TimeUnit;
|
||||
*/
|
||||
@Slf4j
|
||||
public class NettyHttpClientProxyServerRealSocket {
|
||||
private static final EventLoopGroup eventLoopGroup = new NioEventLoopGroup();
|
||||
private static final EventLoopGroup eventLoopGroup = new MultiThreadIoEventLoopGroup(NioIoHandler.newFactory());
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -15,6 +15,7 @@ import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyP
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.proxy.socks.server.AbstractHandleSocksReportServerProxyClientConnectionSuccessTypeAdvanced;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.decoder.TransferDecoder;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelUtils;
|
||||
import org.framework.lazy.cloud.network.heartbeat.protocol.handler.NettySocks5CommandRequestHandler;
|
||||
import org.framework.lazy.cloud.network.heartbeat.server.netty.proxy.socks.filter.NettySocksServerProxyClientVisitorFilter;
|
||||
import org.framework.lazy.cloud.network.heartbeat.server.netty.proxy.socks.handler.NettySocksClientProxyServerRealHandler;
|
||||
@@ -74,8 +75,8 @@ public class ServerHandleSocksReportServerProxyClientConnectionSuccessTypeAdvanc
|
||||
|
||||
nextChannel.pipeline().addLast(new NettySocksServerProxyClientVisitorFilter());
|
||||
|
||||
nextChannel.pipeline().remove(NettySocks5CommandRequestHandler.class);
|
||||
nextChannel.pipeline().remove(Socks5CommandRequestDecoder.class);
|
||||
ChannelUtils.safeRemoveHandler(nextChannel,NettySocks5CommandRequestHandler.class);
|
||||
ChannelUtils.safeRemoveHandler(nextChannel,Socks5CommandRequestDecoder.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user