[add] 客户端渗透优化

This commit is contained in:
wujiawei
2025-06-15 16:11:17 +08:00
parent 5616abafd0
commit ffdd593113
50 changed files with 306 additions and 309 deletions

View File

@@ -19,7 +19,7 @@ docker run -d -it --privileged --name my-home-client --restart=always -e spring.
``` ```
#### 操作步骤:配置端口 #### 操作步骤:配置端口
![client_permeate_port_pool.png](client_permeate_port_pool.png) ![client_permeate_port_pool.png](client_permeate_port_pool.png)
#### 操作步骤:打开页面配置菜单看到如下界面(from客户端ID你老家网络中的电脑to客户端ID #### 操作步骤:打开页面配置菜单看到如下界面(客户端ID你老家网络中的电脑目标客户端ID
![client_permeate_client_mapping.png](client_permeate_client_mapping.png) ![client_permeate_client_mapping.png](client_permeate_client_mapping.png)
#### 连接使用在你老家使用my-home这个客户端所在机器上的ip+13306 即可访问杭州机房内的数据库的服务3306 #### 连接使用在你老家使用my-home这个客户端所在机器上的ip+13306 即可访问杭州机房内的数据库的服务3306

View File

@@ -20,11 +20,11 @@ public class NettyClientPermeateClientVisitor implements InternalNetworkPermeate
/** /**
* 当前客户端ID * 当前客户端ID
*/ */
private String fromClientId; private String originClientId;
/** /**
* 目标客户端ID * 目标客户端ID
*/ */
private String toClientId; private String targetClientId;
/** /**
* 目标地址 * 目标地址
*/ */

View File

@@ -37,14 +37,14 @@ public class ClientHandleTcpDistributeClientPermeateClientInitTypeAdvanced
public void doHandler(NettyChannelContext nettyChannelContext, NettyProxyMsg nettyProxyMsg) { public void doHandler(NettyChannelContext nettyChannelContext, NettyProxyMsg nettyProxyMsg) {
// 初始化 客户端渗透服务端socket // 初始化 客户端渗透服务端socket
String namespace = nettyProxyMsg.namespace(); String namespace = nettyProxyMsg.namespace();
byte[] fromClientIdBytes = nettyProxyMsg.getClientId(); byte[] originClientIdBytes = nettyProxyMsg.getClientId();
byte[] visitorPortBytes = nettyProxyMsg.getVisitorPort(); byte[] visitorPortBytes = nettyProxyMsg.getVisitorPort();
byte[] clientTargetIpBytes = nettyProxyMsg.getTargetIp(); byte[] clientTargetIpBytes = nettyProxyMsg.getTargetIp();
byte[] clientTargetPortBytes = nettyProxyMsg.getTargetPort(); byte[] clientTargetPortBytes = nettyProxyMsg.getTargetPort();
byte[] toClientIdBytes = nettyProxyMsg.getData(); byte[] targetClientIdBytes = nettyProxyMsg.getData();
String fromClientId = new String(fromClientIdBytes); String originClientId = new String(originClientIdBytes);
String toClientId = new String(toClientIdBytes); String targetClientId = new String(targetClientIdBytes);
Integer visitorPort = Integer.parseInt(new String(visitorPortBytes)); Integer visitorPort = Integer.parseInt(new String(visitorPortBytes));
String clientTargetIp = new String(clientTargetIpBytes); String clientTargetIp = new String(clientTargetIpBytes);
Integer clientTargetPort = Integer.parseInt(new String(clientTargetPortBytes)); Integer clientTargetPort = Integer.parseInt(new String(clientTargetPortBytes));
@@ -52,18 +52,18 @@ public class ClientHandleTcpDistributeClientPermeateClientInitTypeAdvanced
List<HandleChannelTypeAdvanced> handleChannelTypeAdvancedList = new ArrayList<>(SpringContextHolder.getApplicationContext().getBeansOfType(HandleChannelTypeAdvanced.class).values()); List<HandleChannelTypeAdvanced> handleChannelTypeAdvancedList = new ArrayList<>(SpringContextHolder.getApplicationContext().getBeansOfType(HandleChannelTypeAdvanced.class).values());
// ChannelFlowAdapter channelFlowAdapter = SpringContextHolder.getBean(ChannelFlowAdapter.class); // ChannelFlowAdapter channelFlowAdapter = SpringContextHolder.getBean(ChannelFlowAdapter.class);
NettyClientProperties nettyClientProperties = SpringContextHolder.getBean(NettyClientProperties.class); NettyClientProperties nettyClientProperties = SpringContextHolder.getBean(NettyClientProperties.class);
log.info("client permeate client from client_id:【{}】 to_client_id【{}】with visitor_port【{}】, clientTargetIp:【{}】clientTargetPort:【{}】", log.info("client permeate client from client_id:【{}】 target_client_id【{}】with visitor_port【{}】, clientTargetIp:【{}】clientTargetPort:【{}】",
fromClientId, toClientId, visitorPort, clientTargetIp, clientTargetPort); originClientId, targetClientId, visitorPort, clientTargetIp, clientTargetPort);
NettyTcpClientPermeateClientVisitorSocket nettyTcpClientPermeateClientVisitorSocket = NettyTcpClientPermeateClientVisitorSocket nettyTcpClientPermeateClientVisitorSocket =
NettyTcpClientPermeateClientVisitorSocket.NettyClientPermeateClientVisitorSocketBuilder.builder() NettyTcpClientPermeateClientVisitorSocket.NettyClientPermeateClientVisitorSocketBuilder.builder()
.builderNamespace(namespace) .builderNamespace(namespace)
.builderClientId(fromClientId) .builderClientId(originClientId)
.builderClientTargetIp(clientTargetIp) .builderClientTargetIp(clientTargetIp)
.builderClientTargetPort(clientTargetPort) .builderClientTargetPort(clientTargetPort)
.builderVisitorPort(visitorPort) .builderVisitorPort(visitorPort)
.builderNettyClientProperties(nettyClientProperties) .builderNettyClientProperties(nettyClientProperties)
//.builderChannelFlowAdapter(channelFlowAdapter) //.builderChannelFlowAdapter(channelFlowAdapter)
.builderToClientId(toClientId) .builderToClientId(targetClientId)
.builderHandleChannelTypeAdvancedList(handleChannelTypeAdvancedList) .builderHandleChannelTypeAdvancedList(handleChannelTypeAdvancedList)
.build(); .build();

View File

@@ -145,7 +145,7 @@ public class NettyTcpClientPermeateClientVisitorSocket implements PermeateVisito
/** /**
* 目标客户端ID * 目标客户端ID
*/ */
private String toClientId; private String targetClientId;
/** /**
* 流量适配器 * 流量适配器
@@ -263,11 +263,11 @@ public class NettyTcpClientPermeateClientVisitorSocket implements PermeateVisito
/** /**
* 目标客户端ID * 目标客户端ID
* *
* @param toClientId 目标客户端ID * @param targetClientId 目标客户端ID
* @return 当前对象 * @return 当前对象
*/ */
public NettyClientPermeateClientVisitorSocketBuilder builderToClientId(String toClientId) { public NettyClientPermeateClientVisitorSocketBuilder builderToClientId(String targetClientId) {
this.toClientId = toClientId; this.targetClientId = targetClientId;
return this; return this;
} }
public NettyTcpClientPermeateClientVisitorSocket build() { public NettyTcpClientPermeateClientVisitorSocket build() {
@@ -286,8 +286,8 @@ public class NettyTcpClientPermeateClientVisitorSocket implements PermeateVisito
NettyClientPermeateClientVisitor nettyClientPermeateClientVisitor = new NettyClientPermeateClientVisitor(); NettyClientPermeateClientVisitor nettyClientPermeateClientVisitor = new NettyClientPermeateClientVisitor();
nettyClientPermeateClientVisitor.setNamespace(namespace); nettyClientPermeateClientVisitor.setNamespace(namespace);
nettyClientPermeateClientVisitor.setFromClientId(nettyClientProperties.getClientId()); nettyClientPermeateClientVisitor.setOriginClientId(nettyClientProperties.getClientId());
nettyClientPermeateClientVisitor.setToClientId(toClientId); nettyClientPermeateClientVisitor.setTargetClientId(targetClientId);
nettyClientPermeateClientVisitor.setTargetIp(clientTargetIp); nettyClientPermeateClientVisitor.setTargetIp(clientTargetIp);
nettyClientPermeateClientVisitor.setTargetPort(clientTargetPort); nettyClientPermeateClientVisitor.setTargetPort(clientTargetPort);
nettyClientPermeateClientVisitor.setVisitorPort(visitorPort); nettyClientPermeateClientVisitor.setVisitorPort(visitorPort);

View File

@@ -58,10 +58,10 @@ public class NettyTcpClientPermeateClientVisitorTransferSocket {
String visitorId = ChannelAttributeKeyUtils.getVisitorId(visitorChannel); String visitorId = ChannelAttributeKeyUtils.getVisitorId(visitorChannel);
Integer visitorPort = nettyClientPermeateClientVisitor.getVisitorPort(); Integer visitorPort = nettyClientPermeateClientVisitor.getVisitorPort();
String toClientId = nettyClientPermeateClientVisitor.getToClientId(); String targetClientId = nettyClientPermeateClientVisitor.getTargetClientId();
// 客户端新建访客通道 连接服务端IP:{},连接服务端端口:{} // 客户端新建访客通道 连接服务端IP:{},连接服务端端口:{}
log.info("Client creates a new visitor channel to connect to server IP: {}, connecting to server port: {} with clientId:【{}】 toClientId:【{}】 & visitorId:【{}】", inetHost, inetPort, clientId, toClientId, visitorId); log.info("Client creates a new visitor channel to connect to server IP: {}, connecting to server port: {} with clientId:【{}】 targetClientId:【{}】 & visitorId:【{}】", inetHost, inetPort, clientId, targetClientId, visitorId);
ChannelFuture future = bootstrap.connect(inetHost, inetPort); ChannelFuture future = bootstrap.connect(inetHost, inetPort);
// 使用的客户端ID:{} // 使用的客户端ID:{}
@@ -73,7 +73,7 @@ public class NettyTcpClientPermeateClientVisitorTransferSocket {
nettyProxyMsg.setType(TcpMessageType.TCP_REPORT_CLIENT_TRANSFER_CLIENT_PERMEATE_CHANNEL_CONNECTION_SUCCESSFUL); nettyProxyMsg.setType(TcpMessageType.TCP_REPORT_CLIENT_TRANSFER_CLIENT_PERMEATE_CHANNEL_CONNECTION_SUCCESSFUL);
nettyProxyMsg.setNamespace(namespace); nettyProxyMsg.setNamespace(namespace);
// other clientId // other clientId
nettyProxyMsg.setClientId(toClientId); nettyProxyMsg.setClientId(targetClientId);
nettyProxyMsg.setVisitorPort(visitorPort); nettyProxyMsg.setVisitorPort(visitorPort);
nettyProxyMsg.setTargetIp(targetIp); nettyProxyMsg.setTargetIp(targetIp);
nettyProxyMsg.setTargetPort(targetPort); nettyProxyMsg.setTargetPort(targetPort);

View File

@@ -35,14 +35,14 @@ public class ClientHandleUdpDistributeClientPermeateClientInitTypeAdvanced exten
@Override @Override
public void doHandler(NettyChannelContext nettyChannelContext, NettyProxyMsg nettyProxyMsg) { public void doHandler(NettyChannelContext nettyChannelContext, NettyProxyMsg nettyProxyMsg) {
// 初始化 客户端渗透服务端socket // 初始化 客户端渗透服务端socket
byte[] fromClientIdBytes = nettyProxyMsg.getClientId(); byte[] originClientIdBytes = nettyProxyMsg.getClientId();
byte[] visitorPortBytes = nettyProxyMsg.getVisitorPort(); byte[] visitorPortBytes = nettyProxyMsg.getVisitorPort();
byte[] clientTargetIpBytes = nettyProxyMsg.getTargetIp(); byte[] clientTargetIpBytes = nettyProxyMsg.getTargetIp();
byte[] clientTargetPortBytes = nettyProxyMsg.getTargetPort(); byte[] clientTargetPortBytes = nettyProxyMsg.getTargetPort();
byte[] toClientIdBytes = nettyProxyMsg.getData(); byte[] targetClientIdBytes = nettyProxyMsg.getData();
String fromClientId = new String(fromClientIdBytes); String originClientId = new String(originClientIdBytes);
String toClientId = new String(toClientIdBytes); String targetClientId = new String(targetClientIdBytes);
Integer visitorPort = Integer.parseInt(new String(visitorPortBytes)); Integer visitorPort = Integer.parseInt(new String(visitorPortBytes));
String clientTargetIp = new String(clientTargetIpBytes); String clientTargetIp = new String(clientTargetIpBytes);
Integer clientTargetPort = Integer.parseInt(new String(clientTargetPortBytes)); Integer clientTargetPort = Integer.parseInt(new String(clientTargetPortBytes));
@@ -50,17 +50,17 @@ public class ClientHandleUdpDistributeClientPermeateClientInitTypeAdvanced exten
List<HandleChannelTypeAdvanced> handleChannelTypeAdvancedList = new ArrayList<>(SpringContextHolder.getApplicationContext().getBeansOfType(HandleChannelTypeAdvanced.class).values()); List<HandleChannelTypeAdvanced> handleChannelTypeAdvancedList = new ArrayList<>(SpringContextHolder.getApplicationContext().getBeansOfType(HandleChannelTypeAdvanced.class).values());
// ChannelFlowAdapter channelFlowAdapter = SpringContextHolder.getBean(ChannelFlowAdapter.class); // ChannelFlowAdapter channelFlowAdapter = SpringContextHolder.getBean(ChannelFlowAdapter.class);
NettyClientProperties nettyClientProperties = SpringContextHolder.getBean(NettyClientProperties.class); NettyClientProperties nettyClientProperties = SpringContextHolder.getBean(NettyClientProperties.class);
log.info("client permeate client from client_id:【{}】 to_client_id【{}】with visitor_port【{}】, clientTargetIp:【{}】clientTargetPort:【{}】", log.info("client permeate client from client_id:【{}】 target_client_id【{}】with visitor_port【{}】, clientTargetIp:【{}】clientTargetPort:【{}】",
fromClientId, toClientId, visitorPort, clientTargetIp, clientTargetPort); originClientId, targetClientId, visitorPort, clientTargetIp, clientTargetPort);
NettyUdpClientPermeateClientVisitorSocket nettyTcpClientPermeateClientVisitorSocket = NettyUdpClientPermeateClientVisitorSocket nettyTcpClientPermeateClientVisitorSocket =
NettyUdpClientPermeateClientVisitorSocket.NettyClientPermeateClientVisitorSocketBuilder.builder() NettyUdpClientPermeateClientVisitorSocket.NettyClientPermeateClientVisitorSocketBuilder.builder()
.builderClientId(fromClientId) .builderClientId(originClientId)
.builderClientTargetIp(clientTargetIp) .builderClientTargetIp(clientTargetIp)
.builderClientTargetPort(clientTargetPort) .builderClientTargetPort(clientTargetPort)
.builderVisitorPort(visitorPort) .builderVisitorPort(visitorPort)
.builderNettyClientProperties(nettyClientProperties) .builderNettyClientProperties(nettyClientProperties)
// .builderChannelFlowAdapter(channelFlowAdapter) // .builderChannelFlowAdapter(channelFlowAdapter)
.builderToClientId(toClientId) .builderToClientId(targetClientId)
.builderHandleChannelTypeAdvancedList(handleChannelTypeAdvancedList) .builderHandleChannelTypeAdvancedList(handleChannelTypeAdvancedList)
.build(); .build();

View File

@@ -140,7 +140,7 @@ public class NettyUdpClientPermeateClientVisitorSocket implements PermeateVisito
/** /**
* 目标客户端ID * 目标客户端ID
*/ */
private String toClientId; private String targetClientId;
/** /**
* 流量适配器 * 流量适配器
@@ -248,11 +248,11 @@ public class NettyUdpClientPermeateClientVisitorSocket implements PermeateVisito
/** /**
* 目标客户端ID * 目标客户端ID
* *
* @param toClientId 目标客户端ID * @param targetClientId 目标客户端ID
* @return 当前对象 * @return 当前对象
*/ */
public NettyClientPermeateClientVisitorSocketBuilder builderToClientId(String toClientId) { public NettyClientPermeateClientVisitorSocketBuilder builderToClientId(String targetClientId) {
this.toClientId = toClientId; this.targetClientId = targetClientId;
return this; return this;
} }
public NettyUdpClientPermeateClientVisitorSocket build() { public NettyUdpClientPermeateClientVisitorSocket build() {
@@ -267,8 +267,8 @@ public class NettyUdpClientPermeateClientVisitorSocket implements PermeateVisito
} }
NettyClientPermeateClientVisitor nettyClientPermeateClientVisitor = new NettyClientPermeateClientVisitor(); NettyClientPermeateClientVisitor nettyClientPermeateClientVisitor = new NettyClientPermeateClientVisitor();
nettyClientPermeateClientVisitor.setFromClientId(nettyClientProperties.getClientId()); nettyClientPermeateClientVisitor.setOriginClientId(nettyClientProperties.getClientId());
nettyClientPermeateClientVisitor.setToClientId(toClientId); nettyClientPermeateClientVisitor.setTargetClientId(targetClientId);
nettyClientPermeateClientVisitor.setTargetIp(clientTargetIp); nettyClientPermeateClientVisitor.setTargetIp(clientTargetIp);
nettyClientPermeateClientVisitor.setTargetPort(clientTargetPort); nettyClientPermeateClientVisitor.setTargetPort(clientTargetPort);
nettyClientPermeateClientVisitor.setVisitorPort(visitorPort); nettyClientPermeateClientVisitor.setVisitorPort(visitorPort);

View File

@@ -58,10 +58,10 @@ public class NettyUdpClientPermeateClientVisitorTransferSocket {
String visitorId = ChannelAttributeKeyUtils.getVisitorId(visitorChannel); String visitorId = ChannelAttributeKeyUtils.getVisitorId(visitorChannel);
Integer visitorPort = nettyClientPermeateClientVisitor.getVisitorPort(); Integer visitorPort = nettyClientPermeateClientVisitor.getVisitorPort();
String toClientId = nettyClientPermeateClientVisitor.getToClientId(); String targetClientId = nettyClientPermeateClientVisitor.getTargetClientId();
// 客户端新建访客通道 连接服务端IP:{},连接服务端端口:{} // 客户端新建访客通道 连接服务端IP:{},连接服务端端口:{}
log.info("Client creates a new visitor channel to connect to server IP: {}, connecting to server port: {} with clientId:【{}】 toClientId:【{}】 & visitorId:【{}】", inetHost, inetPort, clientId, toClientId, visitorId); log.info("Client creates a new visitor channel to connect to server IP: {}, connecting to server port: {} with clientId:【{}】 targetClientId:【{}】 & visitorId:【{}】", inetHost, inetPort, clientId, targetClientId, visitorId);
ChannelFuture future = bootstrap.connect(inetHost, inetPort); ChannelFuture future = bootstrap.connect(inetHost, inetPort);
// 使用的客户端ID:{} // 使用的客户端ID:{}
@@ -73,7 +73,7 @@ public class NettyUdpClientPermeateClientVisitorTransferSocket {
nettyProxyMsg.setType(UdpMessageType.UDP_REPORT_CLIENT_TRANSFER_CLIENT_PERMEATE_CHANNEL_CONNECTION_SUCCESSFUL); nettyProxyMsg.setType(UdpMessageType.UDP_REPORT_CLIENT_TRANSFER_CLIENT_PERMEATE_CHANNEL_CONNECTION_SUCCESSFUL);
// other clientId // other clientId
nettyProxyMsg.setNamespace(namespace); nettyProxyMsg.setNamespace(namespace);
nettyProxyMsg.setClientId(toClientId); nettyProxyMsg.setClientId(targetClientId);
nettyProxyMsg.setVisitorPort(visitorPort); nettyProxyMsg.setVisitorPort(visitorPort);
nettyProxyMsg.setTargetIp(targetIp); nettyProxyMsg.setTargetIp(targetIp);
nettyProxyMsg.setTargetPort(targetPort); nettyProxyMsg.setTargetPort(targetPort);

View File

@@ -60,7 +60,7 @@ public class NettyHttpClientProxyClientProxySocket {
// 客户端链接服务端 // 客户端链接服务端
log.info("Client creates a new proxy channel to connect to server IP: {}, connecting to server port: {} with clientId:【{}】 toClientId:【{}】 & visitorId:【{}】", log.info("Client creates a new proxy channel to connect to server IP: {}, connecting to server port: {} with clientId:【{}】 targetClientId:【{}】 & visitorId:【{}】",
inetHost, inetPort, clientId, targetClientId, visitorId); inetHost, inetPort, clientId, targetClientId, visitorId);
ChannelFuture future = bootstrap.connect(inetHost, inetPort); ChannelFuture future = bootstrap.connect(inetHost, inetPort);

View File

@@ -64,7 +64,7 @@ public class NettyHttpClientProxyServerProxySocket {
// 客户端新建访客通道 连接服务端IP:{},连接服务端端口:{} // 客户端新建访客通道 连接服务端IP:{},连接服务端端口:{}
log.info("Client creates a new visitor channel to connect to server IP: {}, connecting to server port: {} with clientId:【{}】 toClientId:【{}】 & visitorId:【{}】", inetHost, inetPort, clientId, clientId, visitorId); log.info("Client creates a new visitor channel to connect to server IP: {}, connecting to server port: {} with clientId:【{}】 targetClientId:【{}】 & visitorId:【{}】", inetHost, inetPort, clientId, clientId, visitorId);
ChannelFuture future = bootstrap.connect(inetHost, inetPort); ChannelFuture future = bootstrap.connect(inetHost, inetPort);
// 使用的客户端ID:{} // 使用的客户端ID:{}

View File

@@ -121,6 +121,7 @@ public class ChannelContext {
try { try {
return cacheClientChannelConcurrentHashMap.get(new String(namespace, StandardCharsets.UTF_8)).get(new String(clientId, StandardCharsets.UTF_8)); return cacheClientChannelConcurrentHashMap.get(new String(namespace, StandardCharsets.UTF_8)).get(new String(clientId, StandardCharsets.UTF_8));
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace();
// 无法通过客户端ID[{}]获取通道信息 // 无法通过客户端ID[{}]获取通道信息
log.error("Unable to obtain channel information through namespace:{} client ID [{}]", new String(namespace), new String(clientId)); log.error("Unable to obtain channel information through namespace:{} client ID [{}]", new String(namespace), new String(clientId));
return null; return null;

View File

@@ -168,17 +168,17 @@ public class ServerHandleTcpClientConnectSuccessTypeAdvanced extends AbstractHan
// 查询客户端渗透客户端信息 // 查询客户端渗透客户端信息
LazyClientPermeateClientMappingQueryListCommand lazyClientPermeateClientMappingQueryListCommand = new LazyClientPermeateClientMappingQueryListCommand(); LazyClientPermeateClientMappingQueryListCommand lazyClientPermeateClientMappingQueryListCommand = new LazyClientPermeateClientMappingQueryListCommand();
lazyClientPermeateClientMappingQueryListCommand.setFromClientId(clientId); lazyClientPermeateClientMappingQueryListCommand.setOriginClientId(clientId);
lazyClientPermeateClientMappingQueryListCommand.setIsDeleted(false); lazyClientPermeateClientMappingQueryListCommand.setIsDeleted(false);
lazyClientPermeateClientMappingApplication.findList(lazyClientPermeateClientMappingQueryListCommand) lazyClientPermeateClientMappingApplication.findList(lazyClientPermeateClientMappingQueryListCommand)
.accept(lazyInternalNetworkClientPermeateServerMappingDTOS -> { .accept(lazyInternalNetworkClientPermeateServerMappingDTOS -> {
for (LazyClientPermeateClientMappingDTO lazyClientPermeateClientMappingDTO : lazyInternalNetworkClientPermeateServerMappingDTOS) { for (LazyClientPermeateClientMappingDTO lazyClientPermeateClientMappingDTO : lazyInternalNetworkClientPermeateServerMappingDTOS) {
String selfNamespace = lazyClientPermeateClientMappingDTO.getToNamespace(); String selfNamespace = lazyClientPermeateClientMappingDTO.getTargetNamespace();
String permeateTargetIp = lazyClientPermeateClientMappingDTO.getPermeateTargetIp(); String permeateTargetIp = lazyClientPermeateClientMappingDTO.getPermeateTargetIp();
Integer permeateTargetPort = lazyClientPermeateClientMappingDTO.getPermeateTargetPort(); Integer permeateTargetPort = lazyClientPermeateClientMappingDTO.getPermeateTargetPort();
Integer visitorPort = lazyClientPermeateClientMappingDTO.getVisitorPort(); Integer visitorPort = lazyClientPermeateClientMappingDTO.getVisitorPort();
String toClientId = lazyClientPermeateClientMappingDTO.getToClientId(); String targetClientId = lazyClientPermeateClientMappingDTO.getTargetClientId();
NettyProxyMsg nettyMsg = new NettyProxyMsg(); NettyProxyMsg nettyMsg = new NettyProxyMsg();
nettyMsg.setNamespace(selfNamespace); nettyMsg.setNamespace(selfNamespace);
nettyMsg.setType(TcpMessageType.TCP_DISTRIBUTE_CLIENT_PERMEATE_CLIENT_INIT); nettyMsg.setType(TcpMessageType.TCP_DISTRIBUTE_CLIENT_PERMEATE_CLIENT_INIT);
@@ -186,7 +186,7 @@ public class ServerHandleTcpClientConnectSuccessTypeAdvanced extends AbstractHan
nettyMsg.setTargetPort(permeateTargetPort); nettyMsg.setTargetPort(permeateTargetPort);
nettyMsg.setVisitorPort(visitorPort); nettyMsg.setVisitorPort(visitorPort);
nettyMsg.setClientId(clientId); nettyMsg.setClientId(clientId);
nettyMsg.setData(toClientId.getBytes(StandardCharsets.UTF_8)); nettyMsg.setData(targetClientId.getBytes(StandardCharsets.UTF_8));
newChannel.writeAndFlush(nettyMsg); newChannel.writeAndFlush(nettyMsg);
} }
}); });

View File

@@ -157,7 +157,7 @@ public class ServerHandleUdpClientConnectSuccessTypeAdvanced extends AbstractHan
// 查询客户端渗透客户端信息 // 查询客户端渗透客户端信息
LazyClientPermeateClientMappingQueryListCommand lazyClientPermeateClientMappingQueryListCommand = new LazyClientPermeateClientMappingQueryListCommand(); LazyClientPermeateClientMappingQueryListCommand lazyClientPermeateClientMappingQueryListCommand = new LazyClientPermeateClientMappingQueryListCommand();
lazyClientPermeateClientMappingQueryListCommand.setFromClientId(clientId); lazyClientPermeateClientMappingQueryListCommand.setOriginClientId(clientId);
lazyClientPermeateClientMappingQueryListCommand.setIsDeleted(false); lazyClientPermeateClientMappingQueryListCommand.setIsDeleted(false);
lazyClientPermeateClientMappingApplication.findList(lazyClientPermeateClientMappingQueryListCommand) lazyClientPermeateClientMappingApplication.findList(lazyClientPermeateClientMappingQueryListCommand)
.accept(lazyInternalNetworkClientPermeateServerMappingDTOS -> { .accept(lazyInternalNetworkClientPermeateServerMappingDTOS -> {
@@ -166,14 +166,14 @@ public class ServerHandleUdpClientConnectSuccessTypeAdvanced extends AbstractHan
String permeateTargetIp = lazyClientPermeateClientMappingDTO.getPermeateTargetIp(); String permeateTargetIp = lazyClientPermeateClientMappingDTO.getPermeateTargetIp();
Integer permeateTargetPort = lazyClientPermeateClientMappingDTO.getPermeateTargetPort(); Integer permeateTargetPort = lazyClientPermeateClientMappingDTO.getPermeateTargetPort();
Integer visitorPort = lazyClientPermeateClientMappingDTO.getVisitorPort(); Integer visitorPort = lazyClientPermeateClientMappingDTO.getVisitorPort();
String toClientId = lazyClientPermeateClientMappingDTO.getToClientId(); String targetClientId = lazyClientPermeateClientMappingDTO.getTargetClientId();
NettyProxyMsg nettyMsg = new NettyProxyMsg(); NettyProxyMsg nettyMsg = new NettyProxyMsg();
nettyMsg.setType(TcpMessageType.TCP_DISTRIBUTE_CLIENT_PERMEATE_CLIENT_INIT); nettyMsg.setType(TcpMessageType.TCP_DISTRIBUTE_CLIENT_PERMEATE_CLIENT_INIT);
nettyMsg.setTargetIp(permeateTargetIp); nettyMsg.setTargetIp(permeateTargetIp);
nettyMsg.setTargetPort(permeateTargetPort); nettyMsg.setTargetPort(permeateTargetPort);
nettyMsg.setVisitorPort(visitorPort); nettyMsg.setVisitorPort(visitorPort);
nettyMsg.setClientId(clientId); nettyMsg.setClientId(clientId);
nettyMsg.setData(toClientId.getBytes(StandardCharsets.UTF_8)); nettyMsg.setData(targetClientId.getBytes(StandardCharsets.UTF_8));
newChannel.writeAndFlush(nettyMsg); newChannel.writeAndFlush(nettyMsg);
} }
}); });

View File

@@ -39,17 +39,17 @@ public class LazyClientPermeateClientMappingQueryListCommand {
/** /**
* *
* from命名空间 * 命名空间
*/ */
@Schema(description = "from命名空间", name = "fromNamespace", example = "") @Schema(description = "命名空间", name = "originNamespace", example = "")
private String fromNamespace; private String originNamespace;
/** /**
* *
* from客户端ID * 客户端ID
*/ */
@Schema(description ="from客户端ID",name ="fromClientId",example = "") @Schema(description ="客户端ID",name ="originClientId",example = "")
private String fromClientId; private String originClientId;
/** /**
* *
@@ -81,17 +81,17 @@ public class LazyClientPermeateClientMappingQueryListCommand {
/** /**
* *
* to命名空间 * 目标命名空间
*/ */
@Schema(description = "to命名空间", name = "toNamespace", example = "") @Schema(description = "目标命名空间", name = "targetNamespace", example = "")
private String toNamespace; private String targetNamespace;
/** /**
* *
* to客户端ID * 目标客户端ID
*/ */
@Schema(description ="to客户端ID",name ="toClientId",example = "") @Schema(description ="目标客户端ID",name ="targetClientId",example = "")
private String toClientId; private String targetClientId;
/** /**
* *
@@ -107,10 +107,10 @@ public class LazyClientPermeateClientMappingQueryListCommand {
@Schema(description ="渗透端口",name ="visitorPort",example = "") @Schema(description ="渗透端口",name ="visitorPort",example = "")
private Integer visitorPort; private Integer visitorPort;
/** /**
* from 客户端 协议类型 * 客户端 协议类型
*/ */
@Schema(description = "from 客户端协议类型", name = "from_protocol_type", example = "") @Schema(description = " 客户端协议类型", name = "origin_protocol_type", example = "")
private ProtocolType fromProtocolType; private ProtocolType originProtocolType;
/** /**
* to 客户端 协议类型 * to 客户端 协议类型

View File

@@ -39,16 +39,16 @@ public class LazyClientPermeateClientMappingQueryOneCommand {
/** /**
* *
* from命名空间 * 命名空间
*/ */
@Schema(description = "from命名空间", name = "fromNamespace", example = "") @Schema(description = "命名空间", name = "originNamespace", example = "")
private String fromNamespace; private String originNamespace;
/** /**
* *
* from客户端ID * 客户端ID
*/ */
@Schema(description ="from客户端ID",name ="fromClientId",example = "") @Schema(description ="客户端ID",name ="originClientId",example = "")
private String fromClientId; private String originClientId;
/** /**
* *
@@ -80,17 +80,17 @@ public class LazyClientPermeateClientMappingQueryOneCommand {
/** /**
* *
* to命名空间 * 目标命名空间
*/ */
@Schema(description = "to命名空间", name = "toNamespace", example = "") @Schema(description = "目标命名空间", name = "targetNamespace", example = "")
private String toNamespace; private String targetNamespace;
/** /**
* *
* to客户端ID * 目标客户端ID
*/ */
@Schema(description ="to客户端ID",name ="toClientId",example = "") @Schema(description ="目标客户端ID",name ="targetClientId",example = "")
private String toClientId; private String targetClientId;
/** /**
* *
@@ -106,10 +106,10 @@ public class LazyClientPermeateClientMappingQueryOneCommand {
@Schema(description ="渗透端口",name ="visitorPort",example = "") @Schema(description ="渗透端口",name ="visitorPort",example = "")
private Integer visitorPort; private Integer visitorPort;
/** /**
* from 客户端 协议类型 * 客户端 协议类型
*/ */
@Schema(description = "from 客户端协议类型", name = "from_protocol_type", example = "") @Schema(description = " 客户端协议类型", name = "origin_protocol_type", example = "")
private ProtocolType fromProtocolType; private ProtocolType originProtocolType;
/** /**
* to 客户端 协议类型 * to 客户端 协议类型

View File

@@ -39,16 +39,16 @@ public class LazyClientPermeateClientMappingRemoveCommand {
/** /**
* *
* from命名空间 * 命名空间
*/ */
@Schema(description = "from命名空间", name = "fromNamespace", example = "") @Schema(description = "命名空间", name = "originNamespace", example = "")
private String fromNamespace; private String originNamespace;
/** /**
* *
* from客户端ID * 客户端ID
*/ */
@Schema(description ="from客户端ID",name ="fromClientId",example = "") @Schema(description ="客户端ID",name ="originClientId",example = "")
private String fromClientId; private String originClientId;
/** /**
* *
@@ -80,17 +80,17 @@ public class LazyClientPermeateClientMappingRemoveCommand {
/** /**
* *
* to命名空间 * 目标命名空间
*/ */
@Schema(description = "to命名空间", name = "toNamespace", example = "") @Schema(description = "目标命名空间", name = "targetNamespace", example = "")
private String toNamespace; private String targetNamespace;
/** /**
* *
* to客户端ID * 目标客户端ID
*/ */
@Schema(description ="to客户端ID",name ="toClientId",example = "") @Schema(description ="目标客户端ID",name ="targetClientId",example = "")
private String toClientId; private String targetClientId;
/** /**
* *
@@ -106,10 +106,10 @@ public class LazyClientPermeateClientMappingRemoveCommand {
@Schema(description ="渗透端口",name ="visitorPort",example = "") @Schema(description ="渗透端口",name ="visitorPort",example = "")
private Integer visitorPort; private Integer visitorPort;
/** /**
* from 客户端 协议类型 * 客户端 协议类型
*/ */
@Schema(description = "from 客户端协议类型", name = "from_protocol_type", example = "") @Schema(description = " 客户端协议类型", name = "origin_protocol_type", example = "")
private ProtocolType fromProtocolType; private ProtocolType originProtocolType;
/** /**
* to 客户端 协议类型 * to 客户端 协议类型

View File

@@ -40,16 +40,16 @@ public class LazyClientPermeateClientMappingStoryCommand {
/** /**
* *
* from命名空间 * 命名空间
*/ */
@Schema(description = "from命名空间", name = "fromNamespace", example = "") @Schema(description = "命名空间", name = "originNamespace", example = "")
private String fromNamespace; private String originNamespace;
/** /**
* *
* from客户端ID * 客户端ID
*/ */
@Schema(description ="from客户端ID",name ="fromClientId",example = "") @Schema(description ="客户端ID",name ="originClientId",example = "")
private String fromClientId; private String originClientId;
/** /**
* *
@@ -81,17 +81,17 @@ public class LazyClientPermeateClientMappingStoryCommand {
/** /**
* *
* to命名空间 * 目标命名空间
*/ */
@Schema(description = "to命名空间", name = "toNamespace", example = "") @Schema(description = "目标命名空间", name = "targetNamespace", example = "")
private String toNamespace; private String targetNamespace;
/** /**
* *
* to客户端ID * 目标客户端ID
*/ */
@Schema(description ="to客户端ID",name ="toClientId",example = "") @Schema(description ="目标客户端ID",name ="targetClientId",example = "")
private String toClientId; private String targetClientId;
/** /**
* *
@@ -114,10 +114,10 @@ public class LazyClientPermeateClientMappingStoryCommand {
@Schema(description ="是否是ssl",name ="is_ssl",example = "") @Schema(description ="是否是ssl",name ="is_ssl",example = "")
private Boolean isSsl; private Boolean isSsl;
/** /**
* from 客户端 协议类型 * 客户端 协议类型
*/ */
@Schema(description = "from 客户端协议类型", name = "from_protocol_type", example = "") @Schema(description = " 客户端协议类型", name = "origin_protocol_type", example = "")
private ProtocolType fromProtocolType; private ProtocolType originProtocolType;
/** /**
* to 客户端 协议类型 * to 客户端 协议类型

View File

@@ -39,16 +39,16 @@ public class LazyClientPermeateClientMappingUpdateCommand {
/** /**
* *
* from命名空间 * 命名空间
*/ */
@Schema(description = "from命名空间", name = "fromNamespace", example = "") @Schema(description = "命名空间", name = "originNamespace", example = "")
private String fromNamespace; private String originNamespace;
/** /**
* *
* from客户端ID * 客户端ID
*/ */
@Schema(description ="from客户端ID",name ="fromClientId",example = "") @Schema(description ="客户端ID",name ="originClientId",example = "")
private String fromClientId; private String originClientId;
/** /**
* *
@@ -86,10 +86,10 @@ public class LazyClientPermeateClientMappingUpdateCommand {
/** /**
* *
* to客户端ID * 目标客户端ID
*/ */
@Schema(description ="to客户端ID",name ="toClientId",example = "") @Schema(description ="目标客户端ID",name ="targetClientId",example = "")
private String toClientId; private String targetClientId;
/** /**
* *
@@ -112,10 +112,10 @@ public class LazyClientPermeateClientMappingUpdateCommand {
private Boolean isSsl; private Boolean isSsl;
/** /**
* from 客户端 协议类型 * 客户端 协议类型
*/ */
@Schema(description = "from 客户端协议类型", name = "from_protocol_type", example = "") @Schema(description = " 客户端协议类型", name = "origin_protocol_type", example = "")
private ProtocolType fromProtocolType; private ProtocolType originProtocolType;
/** /**
* to 客户端 协议类型 * to 客户端 协议类型

View File

@@ -31,10 +31,10 @@ public class LazyClientPermeateServerMappingQueryListCommand {
private String clientId; private String clientId;
/** /**
* *
* from命名空间 * 命名空间
*/ */
@Schema(description = "from命名空间", name = "fromNamespace", example = "") @Schema(description = "命名空间", name = "originNamespace", example = "")
private String fromNamespace; private String originNamespace;
/** /**
* *
* *
@@ -79,10 +79,10 @@ public class LazyClientPermeateServerMappingQueryListCommand {
/** /**
* *
* to命名空间 * 目标命名空间
*/ */
@Schema(description = "to命名空间", name = "toNamespace", example = "") @Schema(description = "目标命名空间", name = "targetNamespace", example = "")
private String toNamespace; private String targetNamespace;
/** /**
* *
@@ -98,10 +98,10 @@ public class LazyClientPermeateServerMappingQueryListCommand {
@Schema(description ="渗透端口",name ="visitorPort",example = "") @Schema(description ="渗透端口",name ="visitorPort",example = "")
private Integer visitorPort; private Integer visitorPort;
/** /**
* from 客户端 协议类型 * 客户端 协议类型
*/ */
@Schema(description = "from 客户端协议类型", name = "from_protocol_type", example = "") @Schema(description = " 客户端协议类型", name = "origin_protocol_type", example = "")
private ProtocolType fromProtocolType; private ProtocolType originProtocolType;
/** /**
* to 客户端 协议类型 * to 客户端 协议类型

View File

@@ -31,10 +31,10 @@ public class LazyClientPermeateServerMappingQueryOneCommand {
private String clientId; private String clientId;
/** /**
* *
* from命名空间 * 命名空间
*/ */
@Schema(description = "from命名空间", name = "fromNamespace", example = "") @Schema(description = "命名空间", name = "originNamespace", example = "")
private String fromNamespace; private String originNamespace;
/** /**
* *
* *
@@ -79,10 +79,10 @@ public class LazyClientPermeateServerMappingQueryOneCommand {
/** /**
* *
* to命名空间 * 目标命名空间
*/ */
@Schema(description = "to命名空间", name = "toNamespace", example = "") @Schema(description = "目标命名空间", name = "targetNamespace", example = "")
private String toNamespace; private String targetNamespace;
/** /**
* *
@@ -99,10 +99,10 @@ public class LazyClientPermeateServerMappingQueryOneCommand {
private Integer visitorPort; private Integer visitorPort;
/** /**
* from 客户端 协议类型 * 客户端 协议类型
*/ */
@Schema(description = "from 客户端协议类型", name = "from_protocol_type", example = "") @Schema(description = " 客户端协议类型", name = "origin_protocol_type", example = "")
private ProtocolType fromProtocolType; private ProtocolType originProtocolType;
/** /**
* to 客户端 协议类型 * to 客户端 协议类型

View File

@@ -31,10 +31,10 @@ public class LazyClientPermeateServerMappingRemoveCommand {
private String clientId; private String clientId;
/** /**
* *
* from命名空间 * 命名空间
*/ */
@Schema(description = "from命名空间", name = "fromNamespace", example = "") @Schema(description = "命名空间", name = "originNamespace", example = "")
private String fromNamespace; private String originNamespace;
/** /**
* *
* *
@@ -79,10 +79,10 @@ public class LazyClientPermeateServerMappingRemoveCommand {
/** /**
* *
* to命名空间 * 目标命名空间
*/ */
@Schema(description = "to命名空间", name = "toNamespace", example = "") @Schema(description = "目标命名空间", name = "targetNamespace", example = "")
private String toNamespace; private String targetNamespace;
/** /**
* *
@@ -98,10 +98,10 @@ public class LazyClientPermeateServerMappingRemoveCommand {
@Schema(description ="渗透端口",name ="visitorPort",example = "") @Schema(description ="渗透端口",name ="visitorPort",example = "")
private Integer visitorPort; private Integer visitorPort;
/** /**
* from 客户端 协议类型 * 客户端 协议类型
*/ */
@Schema(description = "from 客户端协议类型", name = "from_protocol_type", example = "") @Schema(description = " 客户端协议类型", name = "origin_protocol_type", example = "")
private ProtocolType fromProtocolType; private ProtocolType originProtocolType;
/** /**
* to 客户端 协议类型 * to 客户端 协议类型

View File

@@ -31,10 +31,10 @@ public class LazyClientPermeateServerMappingStoryCommand {
private String clientId; private String clientId;
/** /**
* *
* from命名空间 * 命名空间
*/ */
@Schema(description = "from命名空间", name = "fromNamespace", example = "") @Schema(description = "命名空间", name = "originNamespace", example = "")
private String fromNamespace; private String originNamespace;
/** /**
* *
* *
@@ -79,10 +79,10 @@ public class LazyClientPermeateServerMappingStoryCommand {
/** /**
* *
* to命名空间 * 目标命名空间
*/ */
@Schema(description = "to命名空间", name = "toNamespace", example = "") @Schema(description = "目标命名空间", name = "targetNamespace", example = "")
private String toNamespace; private String targetNamespace;
/** /**
* *
* *
@@ -103,10 +103,10 @@ public class LazyClientPermeateServerMappingStoryCommand {
@Schema(description ="是否是ssl",name ="is_ssl",example = "") @Schema(description ="是否是ssl",name ="is_ssl",example = "")
private Boolean isSsl; private Boolean isSsl;
/** /**
* from 客户端 协议类型 * 客户端 协议类型
*/ */
@Schema(description = "from 客户端协议类型", name = "from_protocol_type", example = "") @Schema(description = " 客户端协议类型", name = "origin_protocol_type", example = "")
private ProtocolType fromProtocolType; private ProtocolType originProtocolType;
/** /**
* to 客户端 协议类型 * to 客户端 协议类型

View File

@@ -31,10 +31,10 @@ public class LazyClientPermeateServerMappingUpdateCommand {
private String clientId; private String clientId;
/** /**
* *
* from命名空间 * 命名空间
*/ */
@Schema(description = "from命名空间", name = "fromNamespace", example = "") @Schema(description = "命名空间", name = "originNamespace", example = "")
private String fromNamespace; private String originNamespace;
/** /**
* *
* *
@@ -79,10 +79,10 @@ public class LazyClientPermeateServerMappingUpdateCommand {
/** /**
* *
* to命名空间 * 目标命名空间
*/ */
@Schema(description = "to命名空间", name = "toNamespace", example = "") @Schema(description = "目标命名空间", name = "targetNamespace", example = "")
private String toNamespace; private String targetNamespace;
/** /**
* *
@@ -104,10 +104,10 @@ public class LazyClientPermeateServerMappingUpdateCommand {
@Schema(description ="是否是ssl",name ="is_ssl",example = "") @Schema(description ="是否是ssl",name ="is_ssl",example = "")
private Boolean isSsl; private Boolean isSsl;
/** /**
* from 客户端 协议类型 * 客户端 协议类型
*/ */
@Schema(description = "from 客户端协议类型", name = "from_protocol_type", example = "") @Schema(description = " 客户端协议类型", name = "origin_protocol_type", example = "")
private ProtocolType fromProtocolType; private ProtocolType originProtocolType;
/** /**
* to 客户端 协议类型 * to 客户端 协议类型

View File

@@ -74,10 +74,10 @@ public class LazyServerPermeateClientMappingQueryListCommand {
@Schema(description = "命名空间", name = "namespace", example = "") @Schema(description = "命名空间", name = "namespace", example = "")
private String namespace; private String namespace;
/** /**
* from 客户端 协议类型 * 客户端 协议类型
*/ */
@Schema(description = "from 客户端协议类型", name = "from_protocol_type", example = "") @Schema(description = " 客户端协议类型", name = "origin_protocol_type", example = "")
private ProtocolType fromProtocolType; private ProtocolType originProtocolType;
/** /**
* to 客户端 协议类型 * to 客户端 协议类型

View File

@@ -73,10 +73,10 @@ public class LazyServerPermeateClientMappingQueryOneCommand {
@Schema(description = "命名空间", name = "namespace", example = "") @Schema(description = "命名空间", name = "namespace", example = "")
private String namespace; private String namespace;
/** /**
* from 客户端 协议类型 * 客户端 协议类型
*/ */
@Schema(description = "from 客户端协议类型", name = "from_protocol_type", example = "") @Schema(description = " 客户端协议类型", name = "origin_protocol_type", example = "")
private ProtocolType fromProtocolType; private ProtocolType originProtocolType;
/** /**
* to 客户端 协议类型 * to 客户端 协议类型

View File

@@ -65,10 +65,10 @@ public class LazyServerPermeateClientMappingRemoveCommand {
@Schema(description = "命名空间", name = "namespace", example = "") @Schema(description = "命名空间", name = "namespace", example = "")
private String namespace; private String namespace;
/** /**
* from 客户端 协议类型 * 客户端 协议类型
*/ */
@Schema(description = "from 客户端协议类型", name = "from_protocol_type", example = "") @Schema(description = " 客户端协议类型", name = "origin_protocol_type", example = "")
private ProtocolType fromProtocolType; private ProtocolType originProtocolType;
/** /**
* to 客户端 协议类型 * to 客户端 协议类型

View File

@@ -64,10 +64,10 @@ public class LazyServerPermeateClientMappingStoryCommand {
@Schema(description ="是否是ssl",name ="is_ssl",example = "") @Schema(description ="是否是ssl",name ="is_ssl",example = "")
private Boolean isSsl; private Boolean isSsl;
/** /**
* from 客户端 协议类型 * 客户端 协议类型
*/ */
@Schema(description = "from 客户端协议类型", name = "from_protocol_type", example = "") @Schema(description = " 客户端协议类型", name = "origin_protocol_type", example = "")
private ProtocolType fromProtocolType; private ProtocolType originProtocolType;
/** /**
* to 客户端 协议类型 * to 客户端 协议类型

View File

@@ -70,10 +70,10 @@ public class LazyServerPermeateClientMappingUpdateCommand {
@Schema(description ="是否是ssl",name ="is_ssl",example = "") @Schema(description ="是否是ssl",name ="is_ssl",example = "")
private Boolean isSsl; private Boolean isSsl;
/** /**
* from 客户端 协议类型 * 客户端 协议类型
*/ */
@Schema(description = "from 客户端协议类型", name = "from_protocol_type", example = "") @Schema(description = " 客户端协议类型", name = "origin_protocol_type", example = "")
private ProtocolType fromProtocolType; private ProtocolType originProtocolType;
/** /**
* to 客户端 协议类型 * to 客户端 协议类型

View File

@@ -86,10 +86,10 @@ public class LazyServerPermeateServerMappingQueryListCommand {
private Integer visitorPort; private Integer visitorPort;
/** /**
* from 客户端 协议类型 * 客户端 协议类型
*/ */
@Schema(description = "from 客户端协议类型", name = "from_protocol_type", example = "") @Schema(description = " 客户端协议类型", name = "origin_protocol_type", example = "")
private ProtocolType fromProtocolType; private ProtocolType originProtocolType;
/** /**
* to 客户端 协议类型 * to 客户端 协议类型

View File

@@ -86,10 +86,10 @@ public class LazyServerPermeateServerMappingQueryOneCommand {
private Integer visitorPort; private Integer visitorPort;
/** /**
* from 客户端 协议类型 * 客户端 协议类型
*/ */
@Schema(description = "from 客户端协议类型", name = "from_protocol_type", example = "") @Schema(description = " 客户端协议类型", name = "origin_protocol_type", example = "")
private ProtocolType fromProtocolType; private ProtocolType originProtocolType;
/** /**
* to 客户端 协议类型 * to 客户端 协议类型

View File

@@ -88,10 +88,10 @@ public class LazyServerPermeateServerMappingRemoveCommand {
@Schema(description ="渗透端口",name ="visitorPort",example = "") @Schema(description ="渗透端口",name ="visitorPort",example = "")
private Integer visitorPort; private Integer visitorPort;
/** /**
* from 客户端 协议类型 * 客户端 协议类型
*/ */
@Schema(description = "from 客户端协议类型", name = "from_protocol_type", example = "") @Schema(description = " 客户端协议类型", name = "origin_protocol_type", example = "")
private ProtocolType fromProtocolType; private ProtocolType originProtocolType;
/** /**
* to 客户端 协议类型 * to 客户端 协议类型

View File

@@ -91,10 +91,10 @@ public class LazyServerPermeateServerMappingStoryCommand {
@Schema(description ="是否是ssl",name ="is_ssl",example = "") @Schema(description ="是否是ssl",name ="is_ssl",example = "")
private Boolean isSsl; private Boolean isSsl;
/** /**
* from 客户端 协议类型 * 客户端 协议类型
*/ */
@Schema(description = "from 客户端协议类型", name = "from_protocol_type", example = "") @Schema(description = " 客户端协议类型", name = "origin_protocol_type", example = "")
private ProtocolType fromProtocolType; private ProtocolType originProtocolType;
/** /**
* to 客户端 协议类型 * to 客户端 协议类型

View File

@@ -91,10 +91,10 @@ public class LazyServerPermeateServerMappingUpdateCommand {
@Schema(description ="是否是ssl",name ="is_ssl",example = "") @Schema(description ="是否是ssl",name ="is_ssl",example = "")
private Boolean isSsl; private Boolean isSsl;
/** /**
* from 客户端 协议类型 * 客户端 协议类型
*/ */
@Schema(description = "from 客户端协议类型", name = "from_protocol_type", example = "") @Schema(description = " 客户端协议类型", name = "origin_protocol_type", example = "")
private ProtocolType fromProtocolType; private ProtocolType originProtocolType;
/** /**
* to 客户端 协议类型 * to 客户端 协议类型

View File

@@ -38,16 +38,16 @@ public class LazyClientPermeateClientMappingDTO {
private String describe; private String describe;
/** /**
* *
* from命名空间 * 命名空间
*/ */
@Schema(description = "from命名空间", name = "fromNamespace", example = "") @Schema(description = "命名空间", name = "originNamespace", example = "")
private String fromNamespace; private String originNamespace;
/** /**
* *
* from客户端ID * 客户端ID
*/ */
@Schema(description ="from客户端ID",name ="fromClientId",example = "") @Schema(description ="客户端ID",name ="originClientId",example = "")
private String fromClientId; private String originClientId;
/** /**
* *
@@ -79,17 +79,17 @@ public class LazyClientPermeateClientMappingDTO {
/** /**
* *
* to命名空间 * 目标命名空间
*/ */
@Schema(description = "to命名空间", name = "toNamespace", example = "") @Schema(description = "目标命名空间", name = "targetNamespace", example = "")
private String toNamespace; private String targetNamespace;
/** /**
* *
* to客户端ID * 目标客户端ID
*/ */
@Schema(description ="to客户端ID",name ="toClientId",example = "") @Schema(description ="目标客户端ID",name ="targetClientId",example = "")
private String toClientId; private String targetClientId;
/** /**
* *
@@ -112,10 +112,10 @@ public class LazyClientPermeateClientMappingDTO {
private Boolean isSsl; private Boolean isSsl;
/** /**
* from 客户端 协议类型 * 客户端 协议类型
*/ */
@Schema(description = "from 客户端协议类型", name = "from_protocol_type", example = "") @Schema(description = " 客户端协议类型", name = "origin_protocol_type", example = "")
private ProtocolType fromProtocolType; private ProtocolType originProtocolType;
/** /**
* to 客户端 协议类型 * to 客户端 协议类型

View File

@@ -31,10 +31,10 @@ public class LazyClientPermeateServerMappingDTO {
private String clientId; private String clientId;
/** /**
* *
* from命名空间 * 命名空间
*/ */
@Schema(description = "from命名空间", name = "fromNamespace", example = "") @Schema(description = "命名空间", name = "originNamespace", example = "")
private String fromNamespace; private String originNamespace;
/** /**
* *
* *
@@ -79,10 +79,10 @@ public class LazyClientPermeateServerMappingDTO {
/** /**
* *
* to命名空间 * 目标命名空间
*/ */
@Schema(description = "to命名空间", name = "toNamespace", example = "") @Schema(description = "目标命名空间", name = "targetNamespace", example = "")
private String toNamespace; private String targetNamespace;
/** /**
* *
* *
@@ -104,10 +104,10 @@ public class LazyClientPermeateServerMappingDTO {
private Boolean isSsl; private Boolean isSsl;
/** /**
* from 客户端 协议类型 * 客户端 协议类型
*/ */
@Schema(description = "from 客户端协议类型", name = "from_protocol_type", example = "") @Schema(description = " 客户端协议类型", name = "origin_protocol_type", example = "")
private ProtocolType fromProtocolType; private ProtocolType originProtocolType;
/** /**
* to 客户端 协议类型 * to 客户端 协议类型

View File

@@ -88,10 +88,10 @@ public class LazyServerPermeateClientMappingDTO {
private Boolean isSsl; private Boolean isSsl;
/** /**
* from 客户端 协议类型 * 客户端 协议类型
*/ */
@Schema(description = "from 客户端协议类型", name = "from_protocol_type", example = "") @Schema(description = " 客户端协议类型", name = "origin_protocol_type", example = "")
private ProtocolType fromProtocolType; private ProtocolType originProtocolType;
/** /**
* to 客户端 协议类型 * to 客户端 协议类型

View File

@@ -92,10 +92,10 @@ public class LazyServerPermeateServerMappingDTO {
private Boolean isSsl; private Boolean isSsl;
/** /**
* from 客户端 协议类型 * 客户端 协议类型
*/ */
@Schema(description = "from 客户端协议类型", name = "from_protocol_type", example = "") @Schema(description = " 客户端协议类型", name = "origin_protocol_type", example = "")
private ProtocolType fromProtocolType; private ProtocolType originProtocolType;
/** /**
* to 客户端 协议类型 * to 客户端 协议类型

View File

@@ -152,8 +152,8 @@ public class LazyClientPermeateClientMappingApplicationImpl implements LazyClien
*/ */
public void closeClientPermeateClientSocketMessage(LazyNettyClientPermeateClientMapping lazyNettyClientPermeateClientMapping) { public void closeClientPermeateClientSocketMessage(LazyNettyClientPermeateClientMapping lazyNettyClientPermeateClientMapping) {
// 发送客户端初始化渗透 // 发送客户端初始化渗透
String namespace = lazyNettyClientPermeateClientMapping.getFromNamespace(); String namespace = lazyNettyClientPermeateClientMapping.getOriginNamespace();
String clientId = lazyNettyClientPermeateClientMapping.getFromClientId(); String clientId = lazyNettyClientPermeateClientMapping.getOriginClientId();
Channel clientChannel = ChannelContext.getLoadBalance(namespace, clientId); Channel clientChannel = ChannelContext.getLoadBalance(namespace, clientId);
if (clientChannel != null && clientChannel.isActive()) { if (clientChannel != null && clientChannel.isActive()) {
@@ -176,10 +176,10 @@ public class LazyClientPermeateClientMappingApplicationImpl implements LazyClien
*/ */
public void createClientPermeateClientSocketMessage(LazyNettyClientPermeateClientMapping lazyNettyClientPermeateClientMapping) { public void createClientPermeateClientSocketMessage(LazyNettyClientPermeateClientMapping lazyNettyClientPermeateClientMapping) {
// 发送客户端初始化渗透 // 发送客户端初始化渗透
String namespace = lazyNettyClientPermeateClientMapping.getFromNamespace(); String namespace = lazyNettyClientPermeateClientMapping.getOriginNamespace();
String fromClientId = lazyNettyClientPermeateClientMapping.getFromClientId(); String originClientId = lazyNettyClientPermeateClientMapping.getOriginClientId();
String toClientId = lazyNettyClientPermeateClientMapping.getToClientId(); String targetClientId = lazyNettyClientPermeateClientMapping.getTargetClientId();
Channel clientChannel = ChannelContext.getLoadBalance(namespace, fromClientId); Channel clientChannel = ChannelContext.getLoadBalance(namespace, originClientId);
if (clientChannel != null && clientChannel.isActive()) { if (clientChannel != null && clientChannel.isActive()) {
String permeateTargetIp = lazyNettyClientPermeateClientMapping.getPermeateTargetIp(); String permeateTargetIp = lazyNettyClientPermeateClientMapping.getPermeateTargetIp();
Integer permeateTargetPort = lazyNettyClientPermeateClientMapping.getPermeateTargetPort(); Integer permeateTargetPort = lazyNettyClientPermeateClientMapping.getPermeateTargetPort();
@@ -189,9 +189,9 @@ public class LazyClientPermeateClientMappingApplicationImpl implements LazyClien
nettyMsg.setTargetIp(permeateTargetIp); nettyMsg.setTargetIp(permeateTargetIp);
nettyMsg.setTargetPort(permeateTargetPort); nettyMsg.setTargetPort(permeateTargetPort);
nettyMsg.setVisitorPort(visitorPort); nettyMsg.setVisitorPort(visitorPort);
nettyMsg.setClientId(fromClientId); nettyMsg.setClientId(originClientId);
nettyMsg.setNamespace(namespace); nettyMsg.setNamespace(namespace);
nettyMsg.setData(toClientId.getBytes(StandardCharsets.UTF_8)); nettyMsg.setData(targetClientId.getBytes(StandardCharsets.UTF_8));
clientChannel.writeAndFlush(nettyMsg); clientChannel.writeAndFlush(nettyMsg);
} }
} }

View File

@@ -163,7 +163,7 @@ public class LazyClientPermeateServerMappingApplicationImpl implements LazyClien
*/ */
public void closeClientPermeateServerSocketMessage(LazyNettyClientPermeateServerMapping lazyNettyClientPermeateServerMapping) { public void closeClientPermeateServerSocketMessage(LazyNettyClientPermeateServerMapping lazyNettyClientPermeateServerMapping) {
// 发送客户端初始化渗透 // 发送客户端初始化渗透
String serverId = lazyNettyClientPermeateServerMapping.getFromNamespace(); String serverId = lazyNettyClientPermeateServerMapping.getOriginNamespace();
String clientId = lazyNettyClientPermeateServerMapping.getClientId(); String clientId = lazyNettyClientPermeateServerMapping.getClientId();
Channel clientChannel = ChannelContext.getLoadBalance(serverId, clientId); Channel clientChannel = ChannelContext.getLoadBalance(serverId, clientId);
if (clientChannel != null && clientChannel.isActive()) { if (clientChannel != null && clientChannel.isActive()) {
@@ -186,7 +186,7 @@ public class LazyClientPermeateServerMappingApplicationImpl implements LazyClien
*/ */
public void createClientPermeateServerSocketMessage(LazyNettyClientPermeateServerMapping lazyNettyClientPermeateServerMapping) { public void createClientPermeateServerSocketMessage(LazyNettyClientPermeateServerMapping lazyNettyClientPermeateServerMapping) {
// 发送客户端初始化渗透 // 发送客户端初始化渗透
String serverId = lazyNettyClientPermeateServerMapping.getFromNamespace(); String serverId = lazyNettyClientPermeateServerMapping.getOriginNamespace();
String clientId = lazyNettyClientPermeateServerMapping.getClientId(); String clientId = lazyNettyClientPermeateServerMapping.getClientId();
Channel clientChannel = ChannelContext.getLoadBalance(serverId, clientId); Channel clientChannel = ChannelContext.getLoadBalance(serverId, clientId);

View File

@@ -39,16 +39,16 @@ public class LazyNettyClientPermeateClientMapping {
/** /**
* *
* from客户端ID * 客户端ID
*/ */
@Schema(description ="from客户端ID",name ="fromClientId",example = "") @Schema(description ="客户端ID",name ="originClientId",example = "")
private String fromClientId; private String originClientId;
/** /**
* *
* from命名空间 * 命名空间
*/ */
@Schema(description = "from命名空间", name = "fromNamespace", example = "") @Schema(description = "命名空间", name = "originNamespace", example = "")
private String fromNamespace; private String originNamespace;
/** /**
* *
* *
@@ -80,16 +80,16 @@ public class LazyNettyClientPermeateClientMapping {
/** /**
* *
* to客户端ID * 目标客户端ID
*/ */
@Schema(description ="to客户端ID",name ="toClientId",example = "") @Schema(description ="目标客户端ID",name ="targetClientId",example = "")
private String toClientId; private String targetClientId;
/** /**
* *
* to命名空间 * 目标命名空间
*/ */
@Schema(description = "to命名空间", name = "toNamespace", example = "") @Schema(description = "目标命名空间", name = "targetNamespace", example = "")
private String toNamespace; private String targetNamespace;
/** /**
* *

View File

@@ -29,10 +29,10 @@ public class LazyNettyClientPermeateServerMapping {
private String clientId; private String clientId;
/** /**
* *
* from命名空间 * 命名空间
*/ */
@Schema(description = "from命名空间", name = "fromNamespace", example = "") @Schema(description = "命名空间", name = "originNamespace", example = "")
private String fromNamespace; private String originNamespace;
/** /**
* *
* *
@@ -77,10 +77,10 @@ public class LazyNettyClientPermeateServerMapping {
/** /**
* *
* to命名空间 * 目标命名空间
*/ */
@Schema(description = "to命名空间", name = "toNamespace", example = "") @Schema(description = "目标命名空间", name = "targetNamespace", example = "")
private String toNamespace; private String targetNamespace;
/** /**
* *
* *

View File

@@ -94,10 +94,10 @@ public class LazyNettyServerPermeateServerMapping {
/** /**
* from 客户端 协议类型 * 客户端 协议类型
*/ */
@Schema(description = "from 客户端协议类型", name = "from_protocol_type", example = "") @Schema(description = " 客户端协议类型", name = "origin_protocol_type", example = "")
private ProtocolType fromProtocolType; private ProtocolType originProtocolType;
/** /**
* to 客户端 协议类型 * to 客户端 协议类型

View File

@@ -24,19 +24,19 @@ public class LazyNettyClientPermeateClientMappingDO {
/** /**
* *
* from客户端ID * 客户端ID
*/ */
@Schema(description = "from客户端ID", name = "fromClientId", example = "") @Schema(description = "客户端ID", name = "originClientId", example = "")
@LazyTableFieldUnique(name = "from_client_id", comment = "from客户端ID", columnType = "varchar(25)") @LazyTableFieldUnique(name = "origin_client_id", comment = "客户端ID", columnType = "varchar(25)")
private String fromClientId; private String originClientId;
/** /**
* *
* from命名空间 * 命名空间
*/ */
@Schema(description = "from命名空间", name = "fromNamespace", example = "") @Schema(description = "命名空间", name = "originNamespace", example = "")
@LazyTableFieldUnique(name = "from_namespace", comment = "from命名空间", columnType = "varchar(25)") @LazyTableFieldUnique(name = "origin_namespace", comment = "命名空间", columnType = "varchar(25)")
private String fromNamespace; private String originNamespace;
/** /**
@@ -48,27 +48,27 @@ public class LazyNettyClientPermeateClientMappingDO {
private Integer visitorPort; private Integer visitorPort;
/** /**
* from 客户端 协议类型 * 客户端 协议类型
*/ */
@LazyTableField(name="from_protocol_type",comment="from 客户端 协议类型",columnType="varchar(255)",defaultValue = "'TCP'") @LazyTableField(name="origin_protocol_type",comment=" 客户端 协议类型",columnType="varchar(255)",defaultValue = "'TCP'")
@Schema(description = "from 客户端协议类型", name = "from_protocol_type", example = "") @Schema(description = " 客户端协议类型", name = "origin_protocol_type", example = "")
private ProtocolType fromProtocolType; private ProtocolType originProtocolType;
/** /**
* *
* to客户端ID * 目标客户端ID
*/ */
@Schema(description = "to客户端ID", name = "toClientId", example = "") @Schema(description = "目标客户端ID", name = "targetClientId", example = "")
@LazyTableField(name = "to_client_id", comment = "to客户端ID", columnType = "varchar(255)") @LazyTableField(name = "target_client_id", comment = "目标客户端ID", columnType = "varchar(255)")
private String toClientId; private String targetClientId;
/** /**
* *
* to命名空间 * 目标命名空间
*/ */
@Schema(description = "to命名空间", name = "toNamespace", example = "") @Schema(description = "目标命名空间", name = "targetNamespace", example = "")
@LazyTableFieldUnique(name = "to_namespace", comment = "to命名空间", columnType = "varchar(25)") @LazyTableFieldUnique(name = "target_namespace", comment = "目标命名空间", columnType = "varchar(25)")
private String toNamespace; private String targetNamespace;
/** /**
* *
* *
@@ -123,12 +123,7 @@ public class LazyNettyClientPermeateClientMappingDO {
@LazyTableField(name="to_protocol_type",comment="to 客户端 协议类型",columnType="varchar(255)",defaultValue = "'TCP'") @LazyTableField(name="to_protocol_type",comment="to 客户端 协议类型",columnType="varchar(255)",defaultValue = "'TCP'")
@Schema(description = "to 客户端协议类型", name = "to_protocol_type", example = "") @Schema(description = "to 客户端协议类型", name = "to_protocol_type", example = "")
private ProtocolType toProtocolType; private ProtocolType toProtocolType;
/**
* 命名空间
*/
@Schema(description ="命名空间",name ="namespace",example = "")
@LazyTableFieldUnique(name="namespace",comment="命名空间",columnType="varchar(25)",defaultValue = "DEFAULT")
private String namespace;
/** /**
* *

View File

@@ -37,11 +37,11 @@ public class LazyNettyClientPermeateServerMappingDO {
private String clientId; private String clientId;
/** /**
* *
* from命名空间 * 命名空间
*/ */
@Schema(description = "from命名空间", name = "fromNamespace", example = "") @Schema(description = "命名空间", name = "originNamespace", example = "")
@LazyTableFieldUnique(name = "from_namespace", comment = "from命名空间", columnType = "varchar(25)") @LazyTableFieldUnique(name = "origin_namespace", comment = "命名空间", columnType = "varchar(25)")
private String fromNamespace; private String originNamespace;
/** /**
* *
@@ -52,11 +52,11 @@ public class LazyNettyClientPermeateServerMappingDO {
private Integer visitorPort; private Integer visitorPort;
/** /**
* from 客户端 协议类型 * 客户端 协议类型
*/ */
@LazyTableField(name="from_protocol_type",comment="from 客户端 协议类型",columnType="varchar(255)",defaultValue = "'TCP'") @LazyTableField(name="origin_protocol_type",comment=" 客户端 协议类型",columnType="varchar(255)",defaultValue = "'TCP'")
@Schema(description = "from 客户端协议类型", name = "from_protocol_type", example = "") @Schema(description = " 客户端协议类型", name = "origin_protocol_type", example = "")
private ProtocolType fromProtocolType; private ProtocolType originProtocolType;
/** /**
* *
* *
@@ -114,9 +114,9 @@ public class LazyNettyClientPermeateServerMappingDO {
/** /**
* 命名空间 * 命名空间
*/ */
@Schema(description ="命名空间",name ="toNamespace",example = "") @Schema(description ="命名空间",name ="targetNamespace",example = "")
@LazyTableFieldUnique(name="to_namespace",comment="命名空间",columnType="varchar(25)",defaultValue = "DEFAULT") @LazyTableFieldUnique(name="target_namespace",comment="命名空间",columnType="varchar(25)",defaultValue = "DEFAULT")
private String toNamespace; private String targetNamespace;
/** /**
* *

View File

@@ -83,11 +83,11 @@ public class LazyNettyServerPermeateClientMappingDO {
/** /**
* from 客户端 协议类型 * 客户端 协议类型
*/ */
@LazyTableField(name="from_protocol_type",comment="from 客户端 协议类型",columnType="varchar(255)",defaultValue = "'TCP'") @LazyTableField(name="origin_protocol_type",comment=" 客户端 协议类型",columnType="varchar(255)",defaultValue = "'TCP'")
@Schema(description = "from 客户端协议类型", name = "from_protocol_type", example = "") @Schema(description = " 客户端协议类型", name = "origin_protocol_type", example = "")
private ProtocolType fromProtocolType; private ProtocolType originProtocolType;
/** /**
* 访问端口 * 访问端口

View File

@@ -97,11 +97,11 @@ public class LazyNettyServerPermeateServerMappingDO {
private LocalDateTime updateTime; private LocalDateTime updateTime;
/** /**
* from 客户端 协议类型 * 客户端 协议类型
*/ */
@LazyTableField(name="from_protocol_type",comment="from 客户端 协议类型",columnType="varchar(255)",defaultValue = "'TCP'") @LazyTableField(name="origin_protocol_type",comment=" 客户端 协议类型",columnType="varchar(255)",defaultValue = "'TCP'")
@Schema(description = "from 客户端协议类型", name = "from_protocol_type", example = "") @Schema(description = " 客户端协议类型", name = "origin_protocol_type", example = "")
private ProtocolType fromProtocolType; private ProtocolType originProtocolType;
/** /**
* *
* 渗透端口 * 渗透端口

View File

@@ -5,13 +5,13 @@
<resultMap id="BaseResultMap" type="org.framework.lazy.cloud.network.heartbeat.server.standalone.infrastructure.entity.LazyNettyClientPermeateClientMappingDO"> <resultMap id="BaseResultMap" type="org.framework.lazy.cloud.network.heartbeat.server.standalone.infrastructure.entity.LazyNettyClientPermeateClientMappingDO">
<result column="create_time" property="createTime" /> <result column="create_time" property="createTime" />
<result column="`describe`" property="describe" /> <result column="`describe`" property="describe" />
<result column="form_client_id" property="fromClientId" /> <result column="form_client_id" property="originClientId" />
<id column="id" property="id" /> <id column="id" property="id" />
<result column="is_deleted" property="isDeleted" /> <result column="is_deleted" property="isDeleted" />
<result column="permeate_target_ip" property="permeateTargetIp" /> <result column="permeate_target_ip" property="permeateTargetIp" />
<result column="permeate_target_port" property="permeateTargetPort" /> <result column="permeate_target_port" property="permeateTargetPort" />
<result column="server_id" property="serverId" /> <result column="server_id" property="serverId" />
<result column="to_client_id" property="toClientId" /> <result column="target_client_id" property="targetClientId" />
<result column="update_time" property="updateTime" /> <result column="update_time" property="updateTime" />
<result column="visitor_port" property="visitorPort" /> <result column="visitor_port" property="visitorPort" />
</resultMap> </resultMap>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -4,14 +4,15 @@ spring:
client: client:
# inet-host: 124.222.48.62 # inet-host: 124.222.48.62
# inet-port: 30676 # inet-port: 30676
inet-host: 124.222.152.160 # inet-host: 124.222.152.160
inet-port: 30560 # inet-port: 30560
namespace: tencent # namespace: tencent
# inet-host: 192.168.15.121 # inet-host: 192.168.15.121
# inet-port: 7001 # inet-port: 7001
# server-id: win # namespace: win
# inet-host: 127.0.0.1 inet-host: 127.0.0.1
# inet-port: 7001 inet-port: 7001
namespace: local-proxy
inet-path: wu-lazy-cloud-heartbeat-server inet-path: wu-lazy-cloud-heartbeat-server
client-id: socks-local-proxy # 客户端ID client-id: socks-local-proxy # 客户端ID
app-key: a4bf4415-25aa-4007-914b-31ec77d1292f app-key: a4bf4415-25aa-4007-914b-31ec77d1292f