mirror of
https://gitee.com/wujiawei1207537021/wu-lazy-cloud-network.git
synced 2025-06-16 18:35:05 +08:00
【fix】init route ip
This commit is contained in:
@ -6,12 +6,10 @@ import io.netty.handler.codec.socksx.v5.Socks5AddressType;
|
||||
import io.netty.handler.codec.socksx.v5.Socks5CommandRequestDecoder;
|
||||
import io.netty.handler.codec.socksx.v5.Socks5CommandStatus;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.framework.lazy.cloud.network.heartbeat.client.netty.proxy.socks.handler.NettyClientProxyClientVisitorInboundHandler;
|
||||
import org.framework.lazy.cloud.network.heartbeat.client.netty.proxy.socks.handler.NettyClientProxyServerVisitorInboundHandler;
|
||||
import org.framework.lazy.cloud.network.heartbeat.client.netty.proxy.socks.handler.NettySocksClientProxyClientVisitorInboundHandler;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyChannelContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.proxy.socks.client.AbstractHandleSocksDistributeClientProxyClientConnectionTransferSuccessTypeAdvanced;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.proxy.socks.client.AbstractHandleSocksDistributeClientProxyServerConnectionTransferSuccessTypeAdvanced;
|
||||
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.protocol.handler.NettySocks5CommandRequestHandler;
|
||||
@ -45,7 +43,7 @@ public class ClientHandleDistributeSocksClientProxyClientConnectionTransferSucce
|
||||
// TODO bug fix
|
||||
nextChannel.pipeline().addLast(new TransferDecoder(Integer.MAX_VALUE, 1024 * 1024*10));
|
||||
// 请求数据开始上报
|
||||
nextChannel.pipeline().addLast(new NettyClientProxyClientVisitorInboundHandler());
|
||||
nextChannel.pipeline().addLast(new NettySocksClientProxyClientVisitorInboundHandler());
|
||||
DefaultSocks5CommandResponse commandResponse =
|
||||
new DefaultSocks5CommandResponse(Socks5CommandStatus.SUCCESS, socks5AddressType);
|
||||
nextChannel.writeAndFlush(commandResponse);
|
||||
|
@ -6,7 +6,7 @@ import io.netty.handler.codec.socksx.v5.Socks5AddressType;
|
||||
import io.netty.handler.codec.socksx.v5.Socks5CommandRequestDecoder;
|
||||
import io.netty.handler.codec.socksx.v5.Socks5CommandStatus;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.framework.lazy.cloud.network.heartbeat.client.netty.proxy.socks.handler.NettyClientProxyServerVisitorInboundHandler;
|
||||
import org.framework.lazy.cloud.network.heartbeat.client.netty.proxy.socks.handler.NettySocksClientProxyServerVisitorInboundHandler;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyChannelContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.proxy.socks.client.AbstractHandleSocksDistributeClientProxyServerConnectionTransferSuccessTypeAdvanced;
|
||||
@ -43,7 +43,7 @@ public class ClientHandleDistributeSocksClientProxyServerConnectionTransferSucce
|
||||
// TODO bug fix
|
||||
nextChannel.pipeline().addLast(new TransferDecoder(Integer.MAX_VALUE, 1024 * 1024*10));
|
||||
// 请求数据开始上报
|
||||
nextChannel.pipeline().addLast(new NettyClientProxyServerVisitorInboundHandler(transferChannel));
|
||||
nextChannel.pipeline().addLast(new NettySocksClientProxyServerVisitorInboundHandler(transferChannel));
|
||||
DefaultSocks5CommandResponse commandResponse =
|
||||
new DefaultSocks5CommandResponse(Socks5CommandStatus.SUCCESS, socks5AddressType);
|
||||
nextChannel.writeAndFlush(commandResponse);
|
||||
|
@ -15,7 +15,7 @@ import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeK
|
||||
|
||||
|
||||
@Slf4j
|
||||
public class NettyClientProxyClientVisitorInboundHandler extends SimpleChannelInboundHandler<NettyByteBuf> {
|
||||
public class NettySocksClientProxyClientVisitorInboundHandler extends SimpleChannelInboundHandler<NettyByteBuf> {
|
||||
|
||||
|
||||
|
||||
@ -66,7 +66,7 @@ public class NettyClientProxyClientVisitorInboundHandler extends SimpleChannelIn
|
||||
|
||||
@Override
|
||||
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
|
||||
log.error("【socks】NettyClientProxyServerVisitorInboundHandler exception", cause);
|
||||
log.error("【socks】NettySocksClientProxyServerVisitorInboundHandler exception", cause);
|
||||
ctx.close();
|
||||
}
|
||||
}
|
@ -12,11 +12,11 @@ import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeK
|
||||
|
||||
|
||||
@Slf4j
|
||||
public class NettyClientProxyServerVisitorInboundHandler extends SimpleChannelInboundHandler<NettyByteBuf> {
|
||||
public class NettySocksClientProxyServerVisitorInboundHandler extends SimpleChannelInboundHandler<NettyByteBuf> {
|
||||
|
||||
private final Channel transferChannel;
|
||||
|
||||
public NettyClientProxyServerVisitorInboundHandler(Channel transferChannel) {
|
||||
public NettySocksClientProxyServerVisitorInboundHandler(Channel transferChannel) {
|
||||
this.transferChannel = transferChannel;
|
||||
}
|
||||
|
||||
@ -67,7 +67,7 @@ public class NettyClientProxyServerVisitorInboundHandler extends SimpleChannelIn
|
||||
|
||||
@Override
|
||||
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
|
||||
log.error("【socks】NettyClientProxyServerVisitorInboundHandler exception", cause);
|
||||
log.error("【socks】NettySocksClientProxyServerVisitorInboundHandler exception", cause);
|
||||
ctx.close();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user