mirror of
https://gitee.com/wujiawei1207537021/wu-lazy-cloud-network.git
synced 2025-06-06 13:27:55 +08:00
【fix】error
This commit is contained in:
parent
68f4c92366
commit
32c757ef5e
@ -42,9 +42,6 @@ public class ClientHandleSocksDistributeServerProxyClientConnectionInitTypeAdvan
|
|||||||
String targetIp = nettyProxyMsg.getTargetIpString();
|
String targetIp = nettyProxyMsg.getTargetIpString();
|
||||||
Integer targetPort = Integer.parseInt(nettyProxyMsg.getTargetPortString());
|
Integer targetPort = Integer.parseInt(nettyProxyMsg.getTargetPortString());
|
||||||
|
|
||||||
byte[] data = nettyProxyMsg.getData();
|
|
||||||
byte socks5AddressType = data[0];
|
|
||||||
|
|
||||||
|
|
||||||
List<HandleChannelTypeAdvanced> handleChannelTypeAdvancedList = new ArrayList<>(SpringContextHolder.getApplicationContext().getBeansOfType(HandleChannelTypeAdvanced.class).values());
|
List<HandleChannelTypeAdvanced> handleChannelTypeAdvancedList = new ArrayList<>(SpringContextHolder.getApplicationContext().getBeansOfType(HandleChannelTypeAdvanced.class).values());
|
||||||
NettyClientProperties nettyClientProperties = SpringContextHolder.getBean(NettyClientProperties.class);
|
NettyClientProperties nettyClientProperties = SpringContextHolder.getBean(NettyClientProperties.class);
|
||||||
@ -57,7 +54,6 @@ public class ClientHandleSocksDistributeServerProxyClientConnectionInitTypeAdvan
|
|||||||
nettySocksClientProxyClient.setTargetPort(targetPort);
|
nettySocksClientProxyClient.setTargetPort(targetPort);
|
||||||
|
|
||||||
ChannelAttributeKeyUtils.buildVisitorId(channel, visitorId);
|
ChannelAttributeKeyUtils.buildVisitorId(channel, visitorId);
|
||||||
ChannelAttributeKeyUtils.buildSocks5AddressType(channel,socks5AddressType);
|
|
||||||
|
|
||||||
// 创建真实通道
|
// 创建真实通道
|
||||||
NettySocksServerProxyClientRealSocket.buildRealServer(
|
NettySocksServerProxyClientRealSocket.buildRealServer(
|
||||||
|
@ -8,6 +8,7 @@ import org.framework.lazy.cloud.network.heartbeat.common.ChannelContext;
|
|||||||
import org.framework.lazy.cloud.network.heartbeat.common.NettyTransferChannelContext;
|
import org.framework.lazy.cloud.network.heartbeat.common.NettyTransferChannelContext;
|
||||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyChannelContext;
|
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.payload.NettyProxyMsg;
|
||||||
|
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettySocketChannelContext;
|
||||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.proxy.socks.server.AbstractHandleSocksReportServerProxyClientTypeAdvanced;
|
import org.framework.lazy.cloud.network.heartbeat.common.advanced.proxy.socks.server.AbstractHandleSocksReportServerProxyClientTypeAdvanced;
|
||||||
import org.framework.lazy.cloud.network.heartbeat.common.constant.ProxyMessageType;
|
import org.framework.lazy.cloud.network.heartbeat.common.constant.ProxyMessageType;
|
||||||
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
|
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
|
||||||
@ -32,16 +33,15 @@ public class ServerHandleSocksReportServerProxyClientTypeAdvanced
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void doHandler(NettyChannelContext nettyChannelContext, NettyProxyMsg nettyProxyMsg) {
|
public void doHandler(NettyChannelContext nettyChannelContext, NettyProxyMsg nettyProxyMsg) {
|
||||||
Channel visitorrChannel = nettyChannelContext.channel();
|
NettySocketChannelContext nettySocketChannelContext = (NettySocketChannelContext) nettyChannelContext;
|
||||||
|
Channel visitorrChannel = nettySocketChannelContext.channel();
|
||||||
String host = nettyProxyMsg.getTargetIpString();
|
String host = nettyProxyMsg.getTargetIpString();
|
||||||
Integer port = Integer.parseInt(nettyProxyMsg.getTargetPortString());
|
Integer port = Integer.parseInt(nettyProxyMsg.getTargetPortString());
|
||||||
byte[] data = nettyProxyMsg.getData();
|
|
||||||
byte[] visitorId = nettyProxyMsg.getVisitorId();
|
byte[] visitorId = nettyProxyMsg.getVisitorId();
|
||||||
byte[] targetClientId = nettyProxyMsg.getClientId();
|
byte[] targetClientId = nettyProxyMsg.getClientId();
|
||||||
|
Socks5AddressType socks5AddressType = nettySocketChannelContext.getSocks5AddressType();
|
||||||
byte socks5AddressTypeByte = data[0];
|
byte socks5AddressTypeByte = socks5AddressType.byteValue();
|
||||||
|
|
||||||
|
|
||||||
String msgVisitorId = new String(visitorId);
|
String msgVisitorId = new String(visitorId);
|
||||||
ChannelAttributeKeyUtils.buildVisitorId(visitorrChannel, msgVisitorId);
|
ChannelAttributeKeyUtils.buildVisitorId(visitorrChannel, msgVisitorId);
|
||||||
@ -54,7 +54,6 @@ public class ServerHandleSocksReportServerProxyClientTypeAdvanced
|
|||||||
// 下发创建新链接指令
|
// 下发创建新链接指令
|
||||||
NettyProxyMsg otherClientConnectServer = new NettyProxyMsg();
|
NettyProxyMsg otherClientConnectServer = new NettyProxyMsg();
|
||||||
// data ---》Socks5AddressType
|
// data ---》Socks5AddressType
|
||||||
otherClientConnectServer.setData(data);
|
|
||||||
otherClientConnectServer.setClientTargetIp(host);
|
otherClientConnectServer.setClientTargetIp(host);
|
||||||
otherClientConnectServer.setClientTargetPort(port);
|
otherClientConnectServer.setClientTargetPort(port);
|
||||||
otherClientConnectServer.setVisitorId(visitorId);
|
otherClientConnectServer.setVisitorId(visitorId);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user