[fix] 优化tcp、udp架构

This commit is contained in:
wujiawei 2024-12-17 10:47:25 +08:00
parent 0df0a42b2c
commit f19b1cae68
201 changed files with 1118 additions and 892 deletions

View File

@ -2,18 +2,21 @@ package org.framework.lazy.cloud.network.heartbeat.client.application.impl;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.framework.lazy.cloud.network.heartbeat.client.application.assembler.LazyNettyServerPropertiesDTOAssembler;
import org.framework.lazy.cloud.network.heartbeat.client.application.dto.LazyNettyServerPropertiesDTO;
import org.framework.lazy.cloud.network.heartbeat.client.domain.model.lazy.netty.server.properties.LazyNettyServerProperties;
import org.framework.lazy.cloud.network.heartbeat.client.domain.model.lazy.netty.server.properties.LazyNettyServerPropertiesRepository;
import org.framework.lazy.cloud.network.heartbeat.client.netty.tcp.socket.NettyTcpClientSocket;
import org.framework.lazy.cloud.network.heartbeat.client.application.LazyNettyServerPropertiesApplication;
import org.framework.lazy.cloud.network.heartbeat.client.application.assembler.LazyNettyServerPropertiesDTOAssembler;
import org.framework.lazy.cloud.network.heartbeat.client.application.command.lazy.netty.server.properties.*;
import org.framework.lazy.cloud.network.heartbeat.client.application.dto.LazyNettyServerPropertiesDTO;
import org.framework.lazy.cloud.network.heartbeat.client.config.NettyClientProperties;
import org.framework.lazy.cloud.network.heartbeat.client.config.PropertiesType;
import org.framework.lazy.cloud.network.heartbeat.client.domain.model.lazy.netty.server.properties.LazyNettyServerProperties;
import org.framework.lazy.cloud.network.heartbeat.client.domain.model.lazy.netty.server.properties.LazyNettyServerPropertiesRepository;
import org.framework.lazy.cloud.network.heartbeat.client.netty.NettyClientSocket;
import org.framework.lazy.cloud.network.heartbeat.client.netty.event.ClientChangeEvent;
import org.framework.lazy.cloud.network.heartbeat.client.netty.tcp.socket.NettyTcpClientSocket;
import org.framework.lazy.cloud.network.heartbeat.client.netty.udp.socket.NettyUdpClientSocket;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.enums.NettyClientStatus;
import org.framework.lazy.cloud.network.heartbeat.common.enums.ProtocolType;
import org.wu.framework.core.NormalUsedString;
import org.wu.framework.database.lazy.web.plus.stereotype.LazyApplication;
import org.wu.framework.lazy.orm.database.lambda.domain.LazyPage;
@ -52,7 +55,7 @@ public class LazyNettyServerPropertiesApplicationImpl implements LazyNettyServer
// 缓存连接socket
private final ConcurrentHashMap<LazyNettyServerProperties, NettyTcpClientSocket> cacheNettyClientSocketMap = new ConcurrentHashMap<>();
private final ConcurrentHashMap<LazyNettyServerProperties, NettyClientSocket> cacheNettyClientSocketMap = new ConcurrentHashMap<>();
public static final ThreadPoolExecutor NETTY_CLIENT_EXECUTOR =
new ThreadPoolExecutor(20, 50, 200, TimeUnit.MILLISECONDS,
@ -188,19 +191,36 @@ public class LazyNettyServerPropertiesApplicationImpl implements LazyNettyServer
String clientId = lazyNettyServerProperties.getClientId();
String appKey = lazyNettyServerProperties.getAppKey();
String appSecret = lazyNettyServerProperties.getAppSecret();
ProtocolType protocolType = lazyNettyServerProperties.getProtocolType();
NettyClientSocket nettyClientSocket;
if (ProtocolType.TCP.equals(protocolType)) {
nettyClientSocket = new
NettyTcpClientSocket(inetHost, inetPort, clientId,
NormalUsedString.DEFAULT, appKey, appSecret,
clientChangeEvent, handleChannelTypeAdvancedList);
} else if (ProtocolType.UDP.equals(protocolType)) {
nettyClientSocket = new
NettyUdpClientSocket(inetHost, inetPort, clientId,
NormalUsedString.DEFAULT, appKey, appSecret,
clientChangeEvent, handleChannelTypeAdvancedList);
} else {
nettyClientSocket = null;
}
NettyTcpClientSocket nettyTcpClientSocket = new
NettyTcpClientSocket(inetHost, inetPort, clientId,
NormalUsedString.DEFAULT,appKey,appSecret,
clientChangeEvent, handleChannelTypeAdvancedList);
cacheNettyClientSocketMap.put(lazyNettyServerProperties, nettyTcpClientSocket);
if (nettyClientSocket == null) {
return;
}
cacheNettyClientSocketMap.put(lazyNettyServerProperties, nettyClientSocket);
// 更新状态为运行中
lazyNettyServerProperties.setConnectStatus(NettyClientStatus.RUNNING);
lazyNettyServerPropertiesRepository.story(lazyNettyServerProperties);
Thread thread = new Thread(() -> {
try {
nettyTcpClientSocket.newConnect2Server();
nettyClientSocket.newConnect2Server();
} catch (Exception e) {
throw new RuntimeException(e);
}

View File

@ -1,10 +1,10 @@
package org.framework.lazy.cloud.network.heartbeat.client.config;
import org.framework.lazy.cloud.network.heartbeat.client.context.NettyTcpClientSocketApplicationListener;
import org.framework.lazy.cloud.network.heartbeat.client.context.NettyUdpClientSocketApplicationListener;
import org.framework.lazy.cloud.network.heartbeat.client.context.NettyClientSocketApplicationListener;
import org.framework.lazy.cloud.network.heartbeat.client.netty.event.ClientChangeEvent;
import org.framework.lazy.cloud.network.heartbeat.client.netty.tcp.advanced.*;
import org.framework.lazy.cloud.network.heartbeat.client.netty.udp.advanced.*;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelTypeAdvanced;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
@ -15,7 +15,7 @@ import org.springframework.context.annotation.Role;
import java.util.List;
@Import({NettyTcpClientSocketApplicationListener.class, NettyUdpClientSocketApplicationListener.class})
@Import({NettyClientSocketApplicationListener.class})
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
@ConditionalOnProperty(prefix = NettyClientProperties.PREFIX, name = "enabled", havingValue = "true", matchIfMissing = true)
public class ClientAutoConfiguration {
@ -166,9 +166,8 @@ public class ClientAutoConfiguration {
@Bean
public ClientHandleTcpDistributeServicePermeateClientRealConnectTypeAdvanced clientHandleTcpDistributeServicePermeateClientRealConnectTypeAdvanced(
NettyClientProperties nettyClientProperties,
List<HandleChannelTypeAdvanced> handleChannelTypeAdvancedList) {
return new ClientHandleTcpDistributeServicePermeateClientRealConnectTypeAdvanced(nettyClientProperties, handleChannelTypeAdvancedList);
NettyClientProperties nettyClientProperties) {
return new ClientHandleTcpDistributeServicePermeateClientRealConnectTypeAdvanced(nettyClientProperties);
}
@Bean
@ -182,11 +181,11 @@ public class ClientAutoConfiguration {
/**
* 服务端 处理客户端心跳
*
* @return ClientUdpHandleChannelHeartbeatTypeAdvanced
* @return ClientHandleUdpChannelHeartbeatTypeAdvanced
*/
@Bean
public ClientUdpHandleChannelHeartbeatTypeAdvanced clientUdpHandleChannelHeartbeatTypeAdvanced() {
return new ClientUdpHandleChannelHeartbeatTypeAdvanced();
public ClientHandleUdpChannelHeartbeatTypeAdvanced clientHandleUdpChannelHeartbeatTypeAdvanced() {
return new ClientHandleUdpChannelHeartbeatTypeAdvanced();
}
/**
@ -250,8 +249,8 @@ public class ClientAutoConfiguration {
}
@Bean
public ClientHandleChannelTransferTypeAdvancedHandleDistributeUdpDistribute clientHandleChannelTransferTypeAdvancedHandleDistributeUdpDistribute(NettyClientProperties nettyClientProperties) {
return new ClientHandleChannelTransferTypeAdvancedHandleDistributeUdpDistribute(nettyClientProperties);
public ClientHandleUdpChannelTransferTypeAdvancedHandleDistribute clientHandleUdpChannelTransferTypeAdvancedHandleDistribute(NettyClientProperties nettyClientProperties) {
return new ClientHandleUdpChannelTransferTypeAdvancedHandleDistribute(nettyClientProperties);
}
@Bean
@ -322,14 +321,13 @@ public class ClientAutoConfiguration {
@Bean
public ClientHandleUdpDistributeServicePermeateClientRealConnectTypeAdvanced clientHandleUdpDistributeServicePermeateClientRealConnectTypeAdvanced(
NettyClientProperties nettyClientProperties,
List<HandleChannelTypeAdvanced> handleChannelTypeAdvancedList) {
return new ClientHandleUdpDistributeServicePermeateClientRealConnectTypeAdvanced(nettyClientProperties, handleChannelTypeAdvancedList);
NettyClientProperties nettyClientProperties) {
return new ClientHandleUdpDistributeServicePermeateClientRealConnectTypeAdvanced(nettyClientProperties);
}
@Bean
public ClientHandleHandleUdpDistributeClientPermeateServerTransferCloseTypeAdvanced clientHandleHandleUdpDistributeClientPermeateServerTransferCloseTypeAdvanced() {
return new ClientHandleHandleUdpDistributeClientPermeateServerTransferCloseTypeAdvanced();
public ClientHandleUdpDistributeClientPermeateServerTransferCloseTypeAdvanced clientHandleUdpDistributeClientPermeateServerTransferCloseTypeAdvanced() {
return new ClientHandleUdpDistributeClientPermeateServerTransferCloseTypeAdvanced();
}
}
}

View File

@ -1,6 +1,7 @@
package org.framework.lazy.cloud.network.heartbeat.client.config;
import lombok.Data;
import org.framework.lazy.cloud.network.heartbeat.common.enums.ProtocolType;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
@ -29,7 +30,10 @@ public class NettyClientProperties {
*/
private String clientId;
/**
* 协议类型
*/
private ProtocolType protocolType = ProtocolType.TCP;
/**
*
* 令牌key

View File

@ -1,34 +1,32 @@
package org.framework.lazy.cloud.network.heartbeat.client.context;
import io.netty.bootstrap.ServerBootstrap;
import io.netty.channel.*;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.nio.NioServerSocketChannel;
import jakarta.annotation.PreDestroy;
import lombok.extern.slf4j.Slf4j;
import org.framework.lazy.cloud.network.heartbeat.client.application.LazyNettyServerPropertiesApplication;
import org.framework.lazy.cloud.network.heartbeat.client.config.NettyClientProperties;
import org.framework.lazy.cloud.network.heartbeat.client.config.PropertiesType;
import org.framework.lazy.cloud.network.heartbeat.client.infrastructure.entity.LazyNettyServerPropertiesDO;
import org.framework.lazy.cloud.network.heartbeat.server.netty.tcp.filter.NettyTcpServerFilter;
import org.framework.lazy.cloud.network.heartbeat.server.properties.ServerNodeProperties;
import org.framework.lazy.cloud.network.heartbeat.common.enums.ProtocolType;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.boot.context.event.ApplicationStartedEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;
import org.wu.framework.lazy.orm.database.lambda.stream.lambda.LazyLambdaStream;
import org.wu.framework.lazy.orm.database.lambda.stream.wrapper.LazyWrappers;
import java.util.Objects;
@Slf4j
@Component
public class NettyTcpClientSocketApplicationListener implements ApplicationListener<ApplicationStartedEvent>, DisposableBean {
public class NettyClientSocketApplicationListener implements ApplicationListener<ApplicationStartedEvent>, DisposableBean {
private final NettyClientProperties nettyClientProperties;
private final LazyLambdaStream lazyLambdaStream;
private final LazyNettyServerPropertiesApplication lazyNettyServerPropertiesApplication;
public NettyTcpClientSocketApplicationListener(NettyClientProperties nettyClientProperties, LazyLambdaStream lazyLambdaStream, LazyNettyServerPropertiesApplication lazyNettyServerPropertiesApplication) {
public NettyClientSocketApplicationListener(NettyClientProperties nettyClientProperties, LazyLambdaStream lazyLambdaStream, LazyNettyServerPropertiesApplication lazyNettyServerPropertiesApplication) {
this.nettyClientProperties = nettyClientProperties;
this.lazyLambdaStream = lazyLambdaStream;
this.lazyNettyServerPropertiesApplication = lazyNettyServerPropertiesApplication;
@ -44,6 +42,7 @@ public class NettyTcpClientSocketApplicationListener implements ApplicationListe
int inetPort = nettyClientProperties.getInetPort();
String appKey = nettyClientProperties.getAppKey();
String appSecret = nettyClientProperties.getAppSecret();
ProtocolType protocolType = nettyClientProperties.getProtocolType();
if (Objects.isNull(clientId) ||
Objects.isNull(inetHost)) {
log.warn("配置信息为空,请通过页面添加配置信息:{}", nettyClientProperties);
@ -57,12 +56,14 @@ public class NettyTcpClientSocketApplicationListener implements ApplicationListe
lazyNettyServerPropertiesDO.setIsDeleted(false);
lazyNettyServerPropertiesDO.setAppKey(appKey);
lazyNettyServerPropertiesDO.setAppSecret(appSecret);
lazyNettyServerPropertiesDO.setProtocolType(protocolType);
// 根据服务端端口port 唯一性验证
boolean exists = lazyLambdaStream.exists(LazyWrappers.<LazyNettyServerPropertiesDO>lambdaWrapper()
.eq(LazyNettyServerPropertiesDO::getInetHost, inetHost)
.eq(LazyNettyServerPropertiesDO::getInetPort, inetPort)
.eq(LazyNettyServerPropertiesDO::getClientId, clientId)
.eq(LazyNettyServerPropertiesDO::getProtocolType, protocolType)
);
if (!exists) {
lazyLambdaStream.insert(lazyNettyServerPropertiesDO);
@ -94,4 +95,5 @@ public class NettyTcpClientSocketApplicationListener implements ApplicationListe
public void destroy() throws Exception {
lazyNettyServerPropertiesApplication.destroyClientSocket();
}
}

View File

@ -1,25 +0,0 @@
package org.framework.lazy.cloud.network.heartbeat.client.context;
import io.netty.bootstrap.Bootstrap;
import io.netty.channel.*;
import io.netty.channel.epoll.EpollDatagramChannel;
import io.netty.channel.epoll.EpollEventLoopGroup;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.nio.NioDatagramChannel;
import io.netty.util.internal.SystemPropertyUtil;
import jakarta.annotation.PreDestroy;
import lombok.extern.slf4j.Slf4j;
import org.framework.lazy.cloud.network.heartbeat.server.netty.udp.filter.NettyUdpServerFilter;
import org.framework.lazy.cloud.network.heartbeat.server.properties.ServerNodeProperties;
import org.springframework.boot.context.event.ApplicationStartedEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;
@Slf4j
@Component
public class NettyUdpClientSocketApplicationListener implements ApplicationListener<ApplicationStartedEvent>,DisposableBean {
}

View File

@ -1,15 +1,13 @@
package org.framework.lazy.cloud.network.heartbeat.client.domain.model.lazy.netty.server.properties;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
import io.swagger.v3.oas.annotations.media.Schema;
import org.framework.lazy.cloud.network.heartbeat.common.enums.NettyClientStatus;
import org.framework.lazy.cloud.network.heartbeat.client.config.PropertiesType;
import org.wu.framework.lazy.orm.core.stereotype.LazyTableField;
import org.framework.lazy.cloud.network.heartbeat.common.enums.NettyClientStatus;
import org.framework.lazy.cloud.network.heartbeat.common.enums.ProtocolType;
import java.lang.String;
import java.time.LocalDateTime;
import java.lang.Integer;
/**
* describe 服务端配置信息
*
@ -66,6 +64,12 @@ public class LazyNettyServerProperties {
*/
@Schema(description ="类型配置、DB",name ="type",example = "")
private PropertiesType type;
/**
* 协议类型
*/
@Schema(description = "协议类型", name = "protocol_type", example = "")
private ProtocolType protocolType;
/**
* 令牌key
*/

View File

@ -5,6 +5,7 @@ import lombok.Data;
import lombok.experimental.Accessors;
import org.framework.lazy.cloud.network.heartbeat.client.config.PropertiesType;
import org.framework.lazy.cloud.network.heartbeat.common.enums.NettyClientStatus;
import org.framework.lazy.cloud.network.heartbeat.common.enums.ProtocolType;
import org.wu.framework.lazy.orm.core.stereotype.LazyTable;
import org.wu.framework.lazy.orm.core.stereotype.LazyTableField;
import org.wu.framework.lazy.orm.core.stereotype.LazyTableFieldUnique;
@ -95,6 +96,13 @@ public class LazyNettyServerPropertiesDO {
@LazyTableField(name="type",comment="类型配置、DB",columnType="varchar(255)")
private PropertiesType type;
/**
* 协议类型
*/
@Schema(description ="协议类型",name ="protocol_type",example = "")
@LazyTableField(name="protocol_type",comment="协议类型",columnType="varchar(255)")
private ProtocolType protocolType;
/**
*
* 更新时间

View File

@ -0,0 +1,15 @@
package org.framework.lazy.cloud.network.heartbeat.client.netty;
public interface NettyClientSocket {
/**
* 创建客户端链接服务端
* @throws InterruptedException 异常信息
*/
void newConnect2Server() throws InterruptedException;
/**
* 关闭链接
*/
void shutdown();
}

View File

@ -2,7 +2,7 @@ package org.framework.lazy.cloud.network.heartbeat.client.netty.tcp.advanced;
import io.netty.channel.Channel;
import org.framework.lazy.cloud.network.heartbeat.common.MessageType;
import org.framework.lazy.cloud.network.heartbeat.common.constant.TcpMessageType;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.tcp.AbstractTcpHandleChannelHeartbeatTypeAdvanced;
@ -22,7 +22,7 @@ public class ClientHandleTcpChannelHeartbeatTypeAdvanced extends AbstractTcpHand
@Override
public void doHandler(Channel channel, NettyProxyMsg msg) {
NettyProxyMsg hb = new NettyProxyMsg();
hb.setType(MessageType.TCP_TYPE_HEARTBEAT);
hb.setType(TcpMessageType.TCP_TYPE_HEARTBEAT);
// channel.writeAndFlush(hb);
}

View File

@ -7,14 +7,14 @@ import lombok.extern.slf4j.Slf4j;
import org.framework.lazy.cloud.network.heartbeat.client.config.NettyClientProperties;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.tcp.client.AbstractHandleTcpDistributeServicePermeateClientTransferTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.enums.MessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
/**
* 服务端处理客户端数据传输
*
* @see MessageTypeEnums#TCP_DISTRIBUTE_CLIENT_TRANSFER
* @see TcpMessageTypeEnums#TCP_DISTRIBUTE_CLIENT_TRANSFER
*/
@Slf4j
public class ClientHandleTcpChannelTransferTypeAdvancedHandleDistributeTcpDistribute extends AbstractHandleTcpDistributeServicePermeateClientTransferTypeAdvanced<NettyProxyMsg> {

View File

@ -6,14 +6,14 @@ import lombok.extern.slf4j.Slf4j;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.NettyVisitorPortContext;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.tcp.client.AbstractHandleTcpDistributeClientPermeateClientCloseTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.enums.MessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.socket.PermeateVisitorSocket;
/**
* 客户端渗透客户端init close 信息
*
* @see MessageTypeEnums#TCP_DISTRIBUTE_CLIENT_PERMEATE_CLIENT_CLOSE
* @see TcpMessageTypeEnums#TCP_DISTRIBUTE_CLIENT_PERMEATE_CLIENT_CLOSE
*/
@Slf4j
public class ClientHandleTcpDistributeClientPermeateClientCloseTypeAdvanced extends AbstractHandleTcpDistributeClientPermeateClientCloseTypeAdvanced<NettyProxyMsg> {

View File

@ -8,7 +8,7 @@ import org.framework.lazy.cloud.network.heartbeat.client.netty.tcp.socket.NettyT
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.tcp.client.AbstractHandleTcpDistributeClientPermeateClientInitTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.enums.MessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
import org.wu.framework.spring.utils.SpringContextHolder;
import java.util.ArrayList;
@ -18,7 +18,7 @@ import java.util.List;
/**
* 客户端渗透客户端init信息
*
* @see MessageTypeEnums#TCP_DISTRIBUTE_CLIENT_PERMEATE_CLIENT_INIT
* @see TcpMessageTypeEnums#TCP_DISTRIBUTE_CLIENT_PERMEATE_CLIENT_INIT
*/
@Slf4j
public class ClientHandleTcpDistributeClientPermeateClientInitTypeAdvanced extends AbstractHandleTcpDistributeClientPermeateClientInitTypeAdvanced<NettyProxyMsg> {

View File

@ -5,14 +5,14 @@ import io.netty.channel.Channel;
import lombok.extern.slf4j.Slf4j;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.tcp.client.AbstractHandleTcpDistributeClientPermeateClientTransferCloseTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.enums.MessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
/**
* 下发客户端渗透客户端通信通道关闭
*
* @see MessageTypeEnums#TCP_DISTRIBUTE_CLIENT_PERMEATE_CLIENT_TRANSFER_CLOSE
* @see TcpMessageTypeEnums#TCP_DISTRIBUTE_CLIENT_PERMEATE_CLIENT_TRANSFER_CLOSE
*/
@Slf4j
public class ClientHandleTcpDistributeClientPermeateClientTransferCloseTypeAdvanced extends AbstractHandleTcpDistributeClientPermeateClientTransferCloseTypeAdvanced<NettyProxyMsg> {

View File

@ -6,14 +6,14 @@ import lombok.extern.slf4j.Slf4j;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.NettyVisitorPortContext;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.tcp.client.AbstractHandleTcpDistributeClientPermeateServerCloseTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.enums.MessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.socket.PermeateVisitorSocket;
/**
* 客户端渗透服务端init close 信息
*
* @see MessageTypeEnums#TCP_DISTRIBUTE_CLIENT_PERMEATE_SERVER_CLOSE
* @see TcpMessageTypeEnums#TCP_DISTRIBUTE_CLIENT_PERMEATE_SERVER_CLOSE
*/
@Slf4j
public class ClientHandleTcpDistributeClientPermeateServerCloseTypeAdvanced extends AbstractHandleTcpDistributeClientPermeateServerCloseTypeAdvanced<NettyProxyMsg> {

View File

@ -8,7 +8,7 @@ import org.framework.lazy.cloud.network.heartbeat.client.netty.tcp.socket.NettyT
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.tcp.client.AbstractHandleTcpDistributeClientPermeateServerInitTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.enums.MessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
import org.wu.framework.spring.utils.SpringContextHolder;
import java.util.ArrayList;
@ -18,7 +18,7 @@ import java.util.List;
/**
* 客户端渗透服务端init信息
*
* @see MessageTypeEnums#TCP_DISTRIBUTE_CLIENT_PERMEATE_SERVER_INIT
* @see TcpMessageTypeEnums#TCP_DISTRIBUTE_CLIENT_PERMEATE_SERVER_INIT
*/
@Slf4j
public class ClientHandleTcpDistributeClientPermeateServerInitTypeAdvanced extends AbstractHandleTcpDistributeClientPermeateServerInitTypeAdvanced<NettyProxyMsg> {

View File

@ -5,14 +5,14 @@ import io.netty.channel.Channel;
import lombok.extern.slf4j.Slf4j;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.tcp.client.AbstractHandleTcpDistributeClientPermeateServerTransferCloseTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.enums.MessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
/**
* 下发 客户端渗透服务端通信通道关闭
*
* @see MessageTypeEnums#TCP_DISTRIBUTE_CLIENT_PERMEATE_SERVER_TRANSFER_CLOSE
* @see TcpMessageTypeEnums#TCP_DISTRIBUTE_CLIENT_PERMEATE_SERVER_TRANSFER_CLOSE
*/
@Slf4j
public class ClientHandleTcpDistributeClientPermeateServerTransferCloseTypeAdvanced extends AbstractHandleTcpDistributeClientPermeateServerTransferCloseTypeAdvanced<NettyProxyMsg> {

View File

@ -6,14 +6,14 @@ import io.netty.channel.Channel;
import lombok.extern.slf4j.Slf4j;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.tcp.client.AbstractHandleTcpDistributeClientPermeateServerTransferTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.enums.MessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
/**
* 服务端处理客户端数据传输
*
* @see MessageTypeEnums#TCP_DISTRIBUTE_CLIENT_TRANSFER
* @see TcpMessageTypeEnums#TCP_DISTRIBUTE_CLIENT_TRANSFER
*/
@Slf4j
public class ClientHandleTcpDistributeClientPermeateServerTransferTypeAdvanced extends AbstractHandleTcpDistributeClientPermeateServerTransferTypeAdvanced<NettyProxyMsg> {

View File

@ -8,7 +8,7 @@ import org.framework.lazy.cloud.network.heartbeat.client.netty.tcp.socket.NettyT
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.tcp.client.AbstractHandleTcpDistributeClientTransferClientPermeateChannelConnectionSuccessfulTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.enums.MessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
import org.wu.framework.spring.utils.SpringContextHolder;
import java.util.ArrayList;
@ -19,7 +19,7 @@ import java.util.List;
* 客户端渗透客户端数据传输通道连接成功
*
*
* @see MessageTypeEnums#TCP_DISTRIBUTE_CLIENT_TRANSFER_CLIENT_PERMEATE_CHANNEL_CONNECTION_SUCCESSFUL
* @see TcpMessageTypeEnums#TCP_DISTRIBUTE_CLIENT_TRANSFER_CLIENT_PERMEATE_CHANNEL_CONNECTION_SUCCESSFUL
*/
@Slf4j
public class ClientHandleTcpDistributeClientTransferClientPermeateChannelConnectionSuccessfulTypeAdvanced extends AbstractHandleTcpDistributeClientTransferClientPermeateChannelConnectionSuccessfulTypeAdvanced<NettyProxyMsg> {

View File

@ -6,7 +6,7 @@ import io.netty.channel.ChannelOption;
import lombok.extern.slf4j.Slf4j;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.tcp.client.AbstractHandleTcpDistributeClientTransferClientPermeateChannelInitSuccessfulTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.enums.MessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
@ -14,7 +14,7 @@ import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeK
* 下发 客户端渗透客户端数据传输通道init 成功
*
*
* @see MessageTypeEnums#TCP_DISTRIBUTE_CLIENT_TRANSFER_CLIENT_PERMEATE_CHANNEL_CONNECTION_SUCCESSFUL
* @see TcpMessageTypeEnums#TCP_DISTRIBUTE_CLIENT_TRANSFER_CLIENT_PERMEATE_CHANNEL_CONNECTION_SUCCESSFUL
*/
@Slf4j
public class ClientHandleTcpDistributeClientTransferClientPermeateChannelInitSuccessfulTypeAdvanced extends AbstractHandleTcpDistributeClientTransferClientPermeateChannelInitSuccessfulTypeAdvanced<NettyProxyMsg> {

View File

@ -6,7 +6,7 @@ import io.netty.channel.Channel;
import lombok.extern.slf4j.Slf4j;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.tcp.client.AbstractHandleTcpDistributeClientTransferClientRequestTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.enums.MessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
@ -14,7 +14,7 @@ import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeK
* 下发客户端渗透客户端数据传输
*
*
* @see MessageTypeEnums#TCP_DISTRIBUTE_CLIENT_PERMEATE_CLIENT_TRANSFER_REQUEST
* @see TcpMessageTypeEnums#TCP_DISTRIBUTE_CLIENT_PERMEATE_CLIENT_TRANSFER_REQUEST
*/
@Slf4j
public class ClientHandleTcpDistributeClientTransferClientRequestTypeAdvanced extends AbstractHandleTcpDistributeClientTransferClientRequestTypeAdvanced<NettyProxyMsg> {

View File

@ -8,7 +8,7 @@ import org.framework.lazy.cloud.network.heartbeat.client.netty.tcp.handler.Netty
import org.framework.lazy.cloud.network.heartbeat.client.netty.tcp.socket.NettyTcpClientPermeateServerVisitorTransferSocket;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.tcp.client.AbstractHandleTcpDistributeClientTransferServerPermeateChannelConnectionSuccessfulTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.enums.MessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
@ -17,7 +17,7 @@ import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeK
* @see NettyTcpClientPermeateServerVisitorTransferSocket
* @see NettyTcpClientPermeateServerVisitorHandler
*
* @see MessageTypeEnums#TCP_DISTRIBUTE_CLIENT_TRANSFER_SERVER_PERMEATE_CHANNEL_CONNECTION_SUCCESSFUL
* @see TcpMessageTypeEnums#TCP_DISTRIBUTE_CLIENT_TRANSFER_SERVER_PERMEATE_CHANNEL_CONNECTION_SUCCESSFUL
*/
@Slf4j
public class ClientHandleTcpDistributeClientTransferServerPermeateChannelConnectionSuccessfulTypeAdvanced extends AbstractHandleTcpDistributeClientTransferServerPermeateChannelConnectionSuccessfulTypeAdvanced<NettyProxyMsg> {

View File

@ -8,7 +8,9 @@ import org.framework.lazy.cloud.network.heartbeat.common.InternalNetworkPenetrat
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.tcp.client.AbstractHandleTcpDistributeServicePermeateClientRealConnectTypeAdvanced;
import org.wu.framework.spring.utils.SpringContextHolder;
import java.util.ArrayList;
import java.util.List;
/**
@ -18,11 +20,11 @@ import java.util.List;
public class ClientHandleTcpDistributeServicePermeateClientRealConnectTypeAdvanced extends AbstractHandleTcpDistributeServicePermeateClientRealConnectTypeAdvanced<NettyProxyMsg> {
private final NettyClientProperties nettyClientProperties;// 服务端地址信息
private final List<HandleChannelTypeAdvanced> handleChannelTypeAdvancedList;
public ClientHandleTcpDistributeServicePermeateClientRealConnectTypeAdvanced(NettyClientProperties nettyClientProperties, List<HandleChannelTypeAdvanced> handleChannelTypeAdvancedList) {
public ClientHandleTcpDistributeServicePermeateClientRealConnectTypeAdvanced(NettyClientProperties nettyClientProperties) {
this.nettyClientProperties = nettyClientProperties;
this.handleChannelTypeAdvancedList = handleChannelTypeAdvancedList;
}
/**
@ -49,6 +51,7 @@ public class ClientHandleTcpDistributeServicePermeateClientRealConnectTypeAdvanc
.visitorId(new String(visitorIdBytes))
.build();
List<HandleChannelTypeAdvanced> handleChannelTypeAdvancedList = new ArrayList<>(SpringContextHolder.getApplicationContext().getBeansOfType(HandleChannelTypeAdvanced.class).values());
// 绑定真实服务端口
NettyTcpServerPermeateClientRealSocket.buildRealServer(internalNetworkPenetrationRealClient, nettyClientProperties, handleChannelTypeAdvancedList);

View File

@ -6,7 +6,7 @@ import io.netty.channel.Channel;
import lombok.extern.slf4j.Slf4j;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.tcp.client.AbstractHandleTcpDistributeServicePermeateClientTransferClientResponseTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.enums.MessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
@ -14,7 +14,7 @@ import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeK
* 下发客户端渗透客户端数据传输响应
*
*
* @see MessageTypeEnums#TCP_DISTRIBUTE_CLIENT_PERMEATE_CLIENT_TRANSFER_RESPONSE
* @see TcpMessageTypeEnums#TCP_DISTRIBUTE_CLIENT_PERMEATE_CLIENT_TRANSFER_RESPONSE
*/
@Slf4j
public class ClientHandleTcpDistributeServicePermeateClientTransferClientResponseTypeAdvanced extends AbstractHandleTcpDistributeServicePermeateClientTransferClientResponseTypeAdvanced<NettyProxyMsg> {

View File

@ -8,7 +8,7 @@ import io.netty.handler.timeout.IdleState;
import io.netty.handler.timeout.IdleStateEvent;
import lombok.extern.slf4j.Slf4j;
import org.framework.lazy.cloud.network.heartbeat.client.netty.tcp.socket.NettyTcpClientSocket;
import org.framework.lazy.cloud.network.heartbeat.common.MessageType;
import org.framework.lazy.cloud.network.heartbeat.common.constant.TcpMessageType;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.adapter.ChannelTypeAdapter;
@ -62,7 +62,7 @@ public class NettyTcpClientHandler extends SimpleChannelInboundHandler<NettyProx
// 处理客户端连接成功
Channel channel = ctx.channel();
NettyProxyMsg nettyMsg = new NettyProxyMsg();
nettyMsg.setType(MessageType.TCP_CLIENT_CHANNEL_ACTIVE);
nettyMsg.setType(TcpMessageType.TCP_CLIENT_CHANNEL_ACTIVE);
nettyMsg.setClientId(clientId);
channelTypeAdapter.handler(channel, nettyMsg);
@ -97,7 +97,7 @@ public class NettyTcpClientHandler extends SimpleChannelInboundHandler<NettyProx
if (IdleState.WRITER_IDLE.equals(event.state())) { //如果写通道处于空闲状态,就发送心跳命令
String clientId = nettyTcpClientSocket.getClientId();
NettyProxyMsg nettyMsg = new NettyProxyMsg();
nettyMsg.setType(MessageType.TCP_TYPE_HEARTBEAT);
nettyMsg.setType(TcpMessageType.TCP_TYPE_HEARTBEAT);
nettyMsg.setData(clientId.getBytes(StandardCharsets.UTF_8));
nettyMsg.setClientId(clientId.getBytes(StandardCharsets.UTF_8));
ctx.writeAndFlush(nettyMsg);// 发送心跳数据
@ -106,7 +106,7 @@ public class NettyTcpClientHandler extends SimpleChannelInboundHandler<NettyProx
String clientId = nettyTcpClientSocket.getClientId();
Channel channel = ctx.channel();
NettyProxyMsg nettyMsg = new NettyProxyMsg();
nettyMsg.setType(MessageType.TCP_DISTRIBUTE_CLIENT_DISCONNECTION_NOTIFICATION);
nettyMsg.setType(TcpMessageType.TCP_DISTRIBUTE_CLIENT_DISCONNECTION_NOTIFICATION);
nettyMsg.setClientId(clientId.getBytes(StandardCharsets.UTF_8));
channelTypeAdapter.handler(channel, nettyMsg);
ctx.close();

View File

@ -5,7 +5,7 @@ import io.netty.channel.Channel;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;
import lombok.extern.slf4j.Slf4j;
import org.framework.lazy.cloud.network.heartbeat.common.MessageType;
import org.framework.lazy.cloud.network.heartbeat.common.constant.TcpMessageType;
import org.framework.lazy.cloud.network.heartbeat.common.NettyByteBuf;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
@ -29,7 +29,7 @@ public class NettyTcpClientPermeateClientRealHandler extends SimpleChannelInboun
// 访客通信通道 上报服务端代理完成
Channel nextChannel = ChannelAttributeKeyUtils.getNextChannel(ctx.channel());
NettyProxyMsg returnMessage = new NettyProxyMsg();
returnMessage.setType(MessageType.TCP_REPORT_CLIENT_TRANSFER_CLIENT_RESPONSE);
returnMessage.setType(TcpMessageType.TCP_REPORT_CLIENT_TRANSFER_CLIENT_RESPONSE);
returnMessage.setVisitorId(visitorId);
returnMessage.setClientId(clientId);
returnMessage.setVisitorPort(visitorPort);
@ -52,7 +52,7 @@ public class NettyTcpClientPermeateClientRealHandler extends SimpleChannelInboun
if (nextChannel != null) {
// 上报关闭这个客户端的访客通道
NettyProxyMsg closeVisitorMsg = new NettyProxyMsg();
closeVisitorMsg.setType(MessageType.TCP_REPORT_CLIENT_PERMEATE_CLIENT_TRANSFER_CLOSE);
closeVisitorMsg.setType(TcpMessageType.TCP_REPORT_CLIENT_PERMEATE_CLIENT_TRANSFER_CLOSE);
closeVisitorMsg.setVisitorId(visitorId);
nextChannel.writeAndFlush(closeVisitorMsg);
}

View File

@ -5,7 +5,7 @@ import io.netty.channel.Channel;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;
import lombok.extern.slf4j.Slf4j;
import org.framework.lazy.cloud.network.heartbeat.common.MessageType;
import org.framework.lazy.cloud.network.heartbeat.common.constant.TcpMessageType;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.adapter.ChannelTypeAdapter;
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
@ -43,7 +43,7 @@ public class NettyTcpClientPermeateClientTransferHandler extends SimpleChannelIn
if (nextChannel != null) {
// 上报关闭这个客户端的访客通道
NettyProxyMsg closeVisitorMsg = new NettyProxyMsg();
closeVisitorMsg.setType(MessageType.TCP_REPORT_CLIENT_PERMEATE_CLIENT_TRANSFER_CLOSE);
closeVisitorMsg.setType(TcpMessageType.TCP_REPORT_CLIENT_PERMEATE_CLIENT_TRANSFER_CLOSE);
closeVisitorMsg.setVisitorId(visitorId);
nextChannel.writeAndFlush(closeVisitorMsg);
}

View File

@ -5,7 +5,7 @@ import io.netty.channel.Channel;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;
import lombok.extern.slf4j.Slf4j;
import org.framework.lazy.cloud.network.heartbeat.common.MessageType;
import org.framework.lazy.cloud.network.heartbeat.common.constant.TcpMessageType;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.adapter.ChannelTypeAdapter;
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
@ -45,7 +45,7 @@ public class NettyTcpClientPermeateClientTransferRealHandler extends SimpleChann
// 上报关闭这个客户端的访客通道
NettyProxyMsg closeVisitorMsg = new NettyProxyMsg();
closeVisitorMsg.setType(MessageType.TCP_REPORT_CLIENT_PERMEATE_CLIENT_TRANSFER_CLOSE);
closeVisitorMsg.setType(TcpMessageType.TCP_REPORT_CLIENT_PERMEATE_CLIENT_TRANSFER_CLOSE);
closeVisitorMsg.setVisitorId(visitorId);
nextChannel.writeAndFlush(closeVisitorMsg);
}

View File

@ -12,7 +12,7 @@ import org.framework.lazy.cloud.network.heartbeat.client.netty.InternalNetworkCl
import org.framework.lazy.cloud.network.heartbeat.client.netty.tcp.advanced.ClientHandleTcpDistributeClientTransferServerPermeateChannelConnectionSuccessfulTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.client.netty.tcp.socket.NettyTcpClientPermeateClientVisitorTransferSocket;
import org.framework.lazy.cloud.network.heartbeat.client.netty.tcp.socket.NettyTcpClientPermeateServerVisitorTransferSocket;
import org.framework.lazy.cloud.network.heartbeat.common.MessageType;
import org.framework.lazy.cloud.network.heartbeat.common.constant.TcpMessageType;
import org.framework.lazy.cloud.network.heartbeat.common.NettyCommunicationIdContext;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.NettyRealIdContext;
@ -75,7 +75,7 @@ public class NettyTcpClientPermeateClientVisitorHandler extends SimpleChannelInb
Integer visitorPort = internalNetworkClientPermeateClientVisitor.getVisitorPort();
String clientId = internalNetworkClientPermeateClientVisitor.getNettyClientProperties().getClientId();
NettyProxyMsg nettyProxyMsg = new NettyProxyMsg();
nettyProxyMsg.setType(MessageType.TCP_REPORT_CLIENT_PERMEATE_CLIENT_TRANSFER_REQUEST);
nettyProxyMsg.setType(TcpMessageType.TCP_REPORT_CLIENT_PERMEATE_CLIENT_TRANSFER_REQUEST);
nettyProxyMsg.setVisitorId(visitorId);
nettyProxyMsg.setClientId(clientId);
nettyProxyMsg.setVisitorPort(visitorPort);
@ -102,7 +102,7 @@ public class NettyTcpClientPermeateClientVisitorHandler extends SimpleChannelInb
// 通知客户端 关闭访问通道真实通道
NettyProxyMsg myMsg = new NettyProxyMsg();
myMsg.setType(MessageType.TCP_REPORT_CLIENT_PERMEATE_CLIENT_TRANSFER_CLOSE);
myMsg.setType(TcpMessageType.TCP_REPORT_CLIENT_PERMEATE_CLIENT_TRANSFER_CLOSE);
nextChannel.writeAndFlush(myMsg);
}
// 关闭 访客通信通道访客真实通道

View File

@ -7,7 +7,7 @@ import io.netty.channel.SimpleChannelInboundHandler;
import io.netty.handler.timeout.IdleState;
import io.netty.handler.timeout.IdleStateEvent;
import lombok.extern.slf4j.Slf4j;
import org.framework.lazy.cloud.network.heartbeat.common.MessageType;
import org.framework.lazy.cloud.network.heartbeat.common.constant.TcpMessageType;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.adapter.ChannelTypeAdapter;
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
@ -45,7 +45,7 @@ public class NettyTcpClientPermeateServerTransferHandler extends SimpleChannelIn
if (nextChannel != null) {
// 上报关闭服务端客户端真实通道
NettyProxyMsg closeVisitorMsg = new NettyProxyMsg();
closeVisitorMsg.setType(MessageType.TCP_TCP_REPORT_CLIENT_PERMEATE_SERVER_TRANSFER_CLOSE);
closeVisitorMsg.setType(TcpMessageType.TCP_TCP_REPORT_CLIENT_PERMEATE_SERVER_TRANSFER_CLOSE);
closeVisitorMsg.setVisitorId(visitorId);
nextChannel.writeAndFlush(closeVisitorMsg);
}
@ -77,7 +77,7 @@ public class NettyTcpClientPermeateServerTransferHandler extends SimpleChannelIn
if (obj instanceof IdleStateEvent event) {
if (IdleState.WRITER_IDLE.equals(event.state())) { //如果写通道处于空闲状态,就发送心跳命令
NettyProxyMsg nettyMsg = new NettyProxyMsg();
nettyMsg.setType(MessageType.TCP_TYPE_HEARTBEAT);
nettyMsg.setType(TcpMessageType.TCP_TYPE_HEARTBEAT);
ctx.writeAndFlush(nettyMsg);// 发送心跳数据
} else if (event.state() == IdleState.WRITER_IDLE) { // 如果检测到写空闲状态关闭连接
// 离线暂存通知

View File

@ -11,7 +11,7 @@ import lombok.extern.slf4j.Slf4j;
import org.framework.lazy.cloud.network.heartbeat.client.netty.InternalNetworkClientPermeateServerVisitor;
import org.framework.lazy.cloud.network.heartbeat.client.netty.tcp.advanced.ClientHandleTcpDistributeClientTransferServerPermeateChannelConnectionSuccessfulTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.client.netty.tcp.socket.NettyTcpClientPermeateServerVisitorTransferSocket;
import org.framework.lazy.cloud.network.heartbeat.common.MessageType;
import org.framework.lazy.cloud.network.heartbeat.common.constant.TcpMessageType;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
@ -70,7 +70,7 @@ public class NettyTcpClientPermeateServerVisitorHandler extends SimpleChannelInb
Integer visitorPort = internalNetworkClientPermeateServerVisitor.getVisitorPort();
String clientId = internalNetworkClientPermeateServerVisitor.getNettyClientProperties().getClientId();
NettyProxyMsg nettyProxyMsg = new NettyProxyMsg();
nettyProxyMsg.setType(MessageType.TCP_REPORT_CLIENT_PERMEATE_SERVER_TRANSFER);
nettyProxyMsg.setType(TcpMessageType.TCP_REPORT_CLIENT_PERMEATE_SERVER_TRANSFER);
nettyProxyMsg.setVisitorId(visitorId);
nettyProxyMsg.setClientId(clientId);
nettyProxyMsg.setVisitorPort(visitorPort);
@ -95,7 +95,7 @@ public class NettyTcpClientPermeateServerVisitorHandler extends SimpleChannelInb
if (nextChannel != null && nextChannel.isActive()) {
// 通知服务端 关闭访问通道真实通道
NettyProxyMsg myMsg = new NettyProxyMsg();
myMsg.setType(MessageType.TCP_TCP_REPORT_CLIENT_PERMEATE_SERVER_TRANSFER_CLOSE);
myMsg.setType(TcpMessageType.TCP_TCP_REPORT_CLIENT_PERMEATE_SERVER_TRANSFER_CLOSE);
myMsg.setVisitorId(visitorId);
nextChannel.writeAndFlush(myMsg);
//通信通道
@ -136,7 +136,7 @@ public class NettyTcpClientPermeateServerVisitorHandler extends SimpleChannelInb
if (nextChannel != null) {
// 下发关闭访客
NettyProxyMsg closeRealClient = new NettyProxyMsg();
closeRealClient.setType(MessageType.TCP_TCP_REPORT_CLIENT_PERMEATE_SERVER_TRANSFER_CLOSE);
closeRealClient.setType(TcpMessageType.TCP_TCP_REPORT_CLIENT_PERMEATE_SERVER_TRANSFER_CLOSE);
closeRealClient.setClientId(clientId);
closeRealClient.setVisitorId(visitorId);
nextChannel.writeAndFlush(closeRealClient);

View File

@ -6,7 +6,7 @@ import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelOption;
import io.netty.channel.SimpleChannelInboundHandler;
import lombok.extern.slf4j.Slf4j;
import org.framework.lazy.cloud.network.heartbeat.common.MessageType;
import org.framework.lazy.cloud.network.heartbeat.common.constant.TcpMessageType;
import org.framework.lazy.cloud.network.heartbeat.common.NettyByteBuf;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
@ -31,7 +31,7 @@ public class NettyTcpServerPermeateClientRealHandler extends SimpleChannelInboun
// 访客通信通道 上报服务端代理完成
Channel visitor = ChannelAttributeKeyUtils.getNextChannel(ctx.channel());
NettyProxyMsg returnMessage = new NettyProxyMsg();
returnMessage.setType(MessageType.TCP_REPORT_CLIENT_TRANSFER);
returnMessage.setType(TcpMessageType.TCP_REPORT_CLIENT_TRANSFER);
returnMessage.setVisitorId(visitorId);
returnMessage.setClientId(clientId);
returnMessage.setVisitorPort(visitorPort);
@ -55,7 +55,7 @@ public class NettyTcpServerPermeateClientRealHandler extends SimpleChannelInboun
if (visitor != null) {
// 上报关闭这个客户端的访客通道
NettyProxyMsg closeVisitorMsg = new NettyProxyMsg();
closeVisitorMsg.setType(MessageType.TCP_REPORT_SERVICE_PERMEATE_CLIENT_CLIENT_CLOSE_VISITOR);
closeVisitorMsg.setType(TcpMessageType.TCP_REPORT_SERVICE_PERMEATE_CLIENT_CLIENT_CLOSE_VISITOR);
closeVisitorMsg.setVisitorId(visitorId);
visitor.writeAndFlush(closeVisitorMsg);
}

View File

@ -8,6 +8,7 @@ import io.netty.channel.SimpleChannelInboundHandler;
import lombok.extern.slf4j.Slf4j;
import org.framework.lazy.cloud.network.heartbeat.common.*;
import org.framework.lazy.cloud.network.heartbeat.common.adapter.ChannelTypeAdapter;
import org.framework.lazy.cloud.network.heartbeat.common.constant.TcpMessageType;
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
import org.wu.framework.core.utils.ObjectUtils;
@ -44,7 +45,7 @@ public class NettyTcpServerPermeateClientTransferHandler extends SimpleChannelIn
if (nextChannel != null) {
// 上报关闭这个客户端的访客通道
NettyProxyMsg closeVisitorMsg = new NettyProxyMsg();
closeVisitorMsg.setType(MessageType.TCP_REPORT_SERVICE_PERMEATE_CLIENT_CLIENT_CLOSE_VISITOR);
closeVisitorMsg.setType(TcpMessageType.TCP_REPORT_SERVICE_PERMEATE_CLIENT_CLIENT_CLOSE_VISITOR);
closeVisitorMsg.setVisitorId(visitorId);
nextChannel.writeAndFlush(closeVisitorMsg);
}

View File

@ -12,6 +12,7 @@ import org.framework.lazy.cloud.network.heartbeat.client.netty.tcp.filter.NettyT
import org.framework.lazy.cloud.network.heartbeat.common.*;
import org.framework.lazy.cloud.network.heartbeat.common.adapter.ChannelTypeAdapter;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.constant.TcpMessageType;
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
import java.util.List;
@ -140,7 +141,7 @@ public class NettyTcpClientPermeateClientRealSocket {
nettyProxyMsg.setClientTargetIp(clientTargetIp);
nettyProxyMsg.setClientTargetPort(clientTargetPort);
nettyProxyMsg.setVisitorPort(visitorPort);
nettyProxyMsg.setType(MessageType.TCP_REPORT_CLIENT_PERMEATE_CLIENT_TRANSFER_CHANNEL_INIT_SUCCESSFUL);
nettyProxyMsg.setType(TcpMessageType.TCP_REPORT_CLIENT_PERMEATE_CLIENT_TRANSFER_CHANNEL_INIT_SUCCESSFUL);
transferChannel.writeAndFlush(nettyProxyMsg);
ChannelAttributeKeyUtils.buildNextChannel(transferChannel, realChannel);

View File

@ -9,7 +9,7 @@ import lombok.extern.slf4j.Slf4j;
import org.framework.lazy.cloud.network.heartbeat.client.config.NettyClientProperties;
import org.framework.lazy.cloud.network.heartbeat.client.netty.InternalNetworkClientPermeateClientVisitor;
import org.framework.lazy.cloud.network.heartbeat.client.netty.tcp.filter.NettyTcpClientPermeateClientTransferFilter;
import org.framework.lazy.cloud.network.heartbeat.common.MessageType;
import org.framework.lazy.cloud.network.heartbeat.common.constant.TcpMessageType;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.adapter.ChannelTypeAdapter;
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
@ -69,7 +69,7 @@ public class NettyTcpClientPermeateClientVisitorTransferSocket {
if (futureListener.isSuccess()) {
NettyProxyMsg nettyProxyMsg = new NettyProxyMsg();
nettyProxyMsg.setType(MessageType.TCP_REPORT_CLIENT_TRANSFER_CLIENT_PERMEATE_CHANNEL_CONNECTION_SUCCESSFUL);
nettyProxyMsg.setType(TcpMessageType.TCP_REPORT_CLIENT_TRANSFER_CLIENT_PERMEATE_CHANNEL_CONNECTION_SUCCESSFUL);
// other clientId
nettyProxyMsg.setClientId(toClientId);
nettyProxyMsg.setVisitorPort(visitorPort);

View File

@ -9,7 +9,7 @@ import lombok.extern.slf4j.Slf4j;
import org.framework.lazy.cloud.network.heartbeat.client.config.NettyClientProperties;
import org.framework.lazy.cloud.network.heartbeat.client.netty.InternalNetworkClientPermeateServerVisitor;
import org.framework.lazy.cloud.network.heartbeat.client.netty.tcp.filter.NettyTcpClientPermeateServerTransferFilter;
import org.framework.lazy.cloud.network.heartbeat.common.MessageType;
import org.framework.lazy.cloud.network.heartbeat.common.constant.TcpMessageType;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.adapter.ChannelTypeAdapter;
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
@ -71,7 +71,7 @@ public class NettyTcpClientPermeateServerVisitorTransferSocket {
if (futureListener.isSuccess()) {
NettyProxyMsg myMsg = new NettyProxyMsg();
myMsg.setType(MessageType.TCP_REPORT_CLIENT_TRANSFER_SERVER_PERMEATE_CHANNEL_CONNECTION_SUCCESSFUL);
myMsg.setType(TcpMessageType.TCP_REPORT_CLIENT_TRANSFER_SERVER_PERMEATE_CHANNEL_CONNECTION_SUCCESSFUL);
myMsg.setClientId(clientId);
myMsg.setVisitorPort(visitorPort);
myMsg.setClientTargetIp(targetIp);

View File

@ -7,9 +7,10 @@ import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.nio.NioSocketChannel;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
import org.framework.lazy.cloud.network.heartbeat.client.netty.NettyClientSocket;
import org.framework.lazy.cloud.network.heartbeat.client.netty.event.ClientChangeEvent;
import org.framework.lazy.cloud.network.heartbeat.client.netty.tcp.filter.NettyTcpClientFilter;
import org.framework.lazy.cloud.network.heartbeat.common.MessageType;
import org.framework.lazy.cloud.network.heartbeat.common.constant.TcpMessageType;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.NettyServerContext;
import org.framework.lazy.cloud.network.heartbeat.common.adapter.ChannelTypeAdapter;
@ -24,7 +25,7 @@ import java.util.concurrent.TimeUnit;
* 客户端连接服务端
*/
@Slf4j
public class NettyTcpClientSocket {
public class NettyTcpClientSocket implements NettyClientSocket {
private final EventLoopGroup eventLoopGroup = new NioEventLoopGroup();
/**
* 服务端host
@ -71,11 +72,8 @@ public class NettyTcpClientSocket {
this.handleChannelTypeAdvancedList = handleChannelTypeAdvancedList;
}
public void newConnect2Server() throws InterruptedException {
newConnect2Server(inetHost, inetPort, clientId, serverId, clientChangeEvent);
}
protected void newConnect2Server(String inetHost, int inetPort, String clientId, String serverId, ClientChangeEvent clientChangeEvent) throws InterruptedException {
protected void newTcpConnect2Server(String inetHost, int inetPort, String clientId, String serverId, ClientChangeEvent clientChangeEvent) throws InterruptedException {
Bootstrap bootstrap = new Bootstrap();
bootstrap.group(eventLoopGroup)
.channel(NioSocketChannel.class)
@ -101,7 +99,7 @@ public class NettyTcpClientSocket {
log.info("clientId:{},connect to server IP:{},server port :{} isSuccess ", clientId, inetHost, inetPort);
// 告诉服务端这条连接是client的连接
NettyProxyMsg nettyMsg = new NettyProxyMsg();
nettyMsg.setType(MessageType.TCP_REPORT_CLIENT_CONNECT_SUCCESS);
nettyMsg.setType(TcpMessageType.TCP_REPORT_CLIENT_CONNECT_SUCCESS);
nettyMsg.setClientId(clientId);
String hostAddress = InetAddress.getLocalHost().getHostAddress();
nettyMsg.setOriginalIpString(hostAddress);
@ -121,7 +119,7 @@ public class NettyTcpClientSocket {
clientChangeEvent.clientOffLine(inetHost, inetPort,serverId, clientId);
eventLoopGroup.schedule(() -> {
try {
newConnect2Server(inetHost, inetPort, clientId, serverId, clientChangeEvent);
newTcpConnect2Server(inetHost, inetPort, clientId, serverId, clientChangeEvent);
} catch (InterruptedException e) {
e.printStackTrace();
}
@ -140,4 +138,13 @@ public class NettyTcpClientSocket {
}
}
/**
* 创建客户端链接服务端
*
* @throws InterruptedException 异常信息
*/
@Override
public void newConnect2Server() throws InterruptedException {
newTcpConnect2Server(inetHost, inetPort, clientId, serverId, clientChangeEvent);
}
}

View File

@ -12,6 +12,7 @@ import org.framework.lazy.cloud.network.heartbeat.client.netty.tcp.filter.NettyT
import org.framework.lazy.cloud.network.heartbeat.common.*;
import org.framework.lazy.cloud.network.heartbeat.common.adapter.ChannelTypeAdapter;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.constant.TcpMessageType;
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
import java.util.List;
@ -176,7 +177,7 @@ public class NettyTcpServerPermeateClientRealSocket {
if (futureListener.isSuccess()) {
NettyProxyMsg myMsg = new NettyProxyMsg();
myMsg.setType(MessageType.TCP_REPORT_SINGLE_CLIENT_REAL_CONNECT);
myMsg.setType(TcpMessageType.TCP_REPORT_SINGLE_CLIENT_REAL_CONNECT);
myMsg.setClientId(visitorClientId);
myMsg.setVisitorPort(visitorPort);
myMsg.setClientTargetIp(clientTargetIp);

View File

@ -2,7 +2,7 @@ package org.framework.lazy.cloud.network.heartbeat.client.netty.udp.advanced;
import io.netty.channel.Channel;
import org.framework.lazy.cloud.network.heartbeat.common.UdpMessageType;
import org.framework.lazy.cloud.network.heartbeat.common.constant.UdpMessageType;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.udp.AbstractUdpHandleChannelHeartbeatTypeAdvanced;
@ -22,7 +22,7 @@ public class ClientHandleUdpChannelHeartbeatTypeAdvanced extends AbstractUdpHand
@Override
public void doHandler(Channel channel, NettyProxyMsg msg) {
NettyProxyMsg hb = new NettyProxyMsg();
hb.setType(UdpMessageType.TCP_TYPE_HEARTBEAT);
hb.setType(UdpMessageType.UDP_TYPE_HEARTBEAT);
// channel.writeAndFlush(hb);
}

View File

@ -17,11 +17,11 @@ import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeK
* @see UdpMessageTypeEnums#UDP_DISTRIBUTE_CLIENT_TRANSFER
*/
@Slf4j
public class ClientHandleUdpChannelTransferTypeAdvancedHandleDistributeUdpDistribute extends AbstractHandleUdpDistributeServicePermeateClientTransferTypeAdvanced<NettyProxyMsg> {
public class ClientHandleUdpChannelTransferTypeAdvancedHandleDistribute extends AbstractHandleUdpDistributeServicePermeateClientTransferTypeAdvanced<NettyProxyMsg> {
private final NettyClientProperties nettyClientProperties;
public ClientHandleUdpChannelTransferTypeAdvancedHandleDistributeUdpDistribute(NettyClientProperties nettyClientProperties) {
public ClientHandleUdpChannelTransferTypeAdvancedHandleDistribute(NettyClientProperties nettyClientProperties) {
this.nettyClientProperties = nettyClientProperties;
}

View File

@ -0,0 +1,73 @@
package org.framework.lazy.cloud.network.heartbeat.client.netty.udp.advanced;
import io.netty.channel.Channel;
import lombok.extern.slf4j.Slf4j;
import org.framework.lazy.cloud.network.heartbeat.client.config.NettyClientProperties;
import org.framework.lazy.cloud.network.heartbeat.client.netty.tcp.socket.NettyTcpClientPermeateClientVisitorSocket;
import org.framework.lazy.cloud.network.heartbeat.client.netty.udp.socket.NettyUdpClientPermeateClientVisitorSocket;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.tcp.client.AbstractHandleTcpDistributeClientPermeateClientInitTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.udp.client.AbstractHandleUdpDistributeClientPermeateClientInitTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
import org.wu.framework.spring.utils.SpringContextHolder;
import java.util.ArrayList;
import java.util.List;
/**
* 客户端渗透客户端init信息
*
* @see TcpMessageTypeEnums#TCP_DISTRIBUTE_CLIENT_PERMEATE_CLIENT_INIT
*/
@Slf4j
public class ClientHandleUdpDistributeClientPermeateClientInitTypeAdvanced extends AbstractHandleUdpDistributeClientPermeateClientInitTypeAdvanced<NettyProxyMsg> {
/**
* 处理当前数据
*
* @param channel 当前通道
* @param nettyProxyMsg 通道数据
*/
@Override
public void doHandler(Channel channel, NettyProxyMsg nettyProxyMsg) {
// 初始化 客户端渗透服务端socket
byte[] fromClientIdBytes = nettyProxyMsg.getClientId();
byte[] visitorPortBytes = nettyProxyMsg.getVisitorPort();
byte[] clientTargetIpBytes = nettyProxyMsg.getClientTargetIp();
byte[] clientTargetPortBytes = nettyProxyMsg.getClientTargetPort();
byte[] toClientIdBytes = nettyProxyMsg.getData();
String fromClientId = new String(fromClientIdBytes);
String toClientId = new String(toClientIdBytes);
Integer visitorPort = Integer.parseInt(new String(visitorPortBytes));
String clientTargetIp = new String(clientTargetIpBytes);
Integer clientTargetPort = Integer.parseInt(new String(clientTargetPortBytes));
List<HandleChannelTypeAdvanced> handleChannelTypeAdvancedList = new ArrayList<>(SpringContextHolder.getApplicationContext().getBeansOfType(HandleChannelTypeAdvanced.class).values());
// ChannelFlowAdapter channelFlowAdapter = SpringContextHolder.getBean(ChannelFlowAdapter.class);
NettyClientProperties nettyClientProperties = SpringContextHolder.getBean(NettyClientProperties.class);
log.info("client permeate client from client_id:【{}】 to_client_id【{}】with visitor_port【{}】, clientTargetIp:【{}】clientTargetPort:【{}】",
fromClientId, toClientId, visitorPort, clientTargetIp, clientTargetPort);
NettyUdpClientPermeateClientVisitorSocket nettyTcpClientPermeateClientVisitorSocket =
NettyUdpClientPermeateClientVisitorSocket.NettyClientPermeateClientVisitorSocketBuilder.builder()
.builderClientId(fromClientId)
.builderClientTargetIp(clientTargetIp)
.builderClientTargetPort(clientTargetPort)
.builderVisitorPort(visitorPort)
.builderNettyClientProperties(nettyClientProperties)
// .builderChannelFlowAdapter(channelFlowAdapter)
.builderToClientId(toClientId)
.builderHandleChannelTypeAdvancedList(handleChannelTypeAdvancedList)
.build();
try {
nettyTcpClientPermeateClientVisitorSocket.start();
} catch (Exception e) {
e.printStackTrace();
}
}
}

View File

@ -0,0 +1,65 @@
package org.framework.lazy.cloud.network.heartbeat.client.netty.udp.advanced;
import io.netty.channel.Channel;
import lombok.extern.slf4j.Slf4j;
import org.framework.lazy.cloud.network.heartbeat.client.config.NettyClientProperties;
import org.framework.lazy.cloud.network.heartbeat.client.netty.tcp.socket.NettyTcpClientPermeateServerVisitorSocket;
import org.framework.lazy.cloud.network.heartbeat.client.netty.udp.socket.NettyUdpClientPermeateServerVisitorSocket;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.tcp.client.AbstractHandleTcpDistributeClientPermeateServerInitTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.udp.client.AbstractHandleUdpDistributeClientPermeateServerInitTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
import org.wu.framework.spring.utils.SpringContextHolder;
import java.util.ArrayList;
import java.util.List;
/**
* 客户端渗透服务端init信息
*
* @see TcpMessageTypeEnums#TCP_DISTRIBUTE_CLIENT_PERMEATE_SERVER_INIT
*/
@Slf4j
public class ClientHandleUdpDistributeClientPermeateServerInitTypeAdvanced extends AbstractHandleUdpDistributeClientPermeateServerInitTypeAdvanced<NettyProxyMsg> {
private final NettyClientProperties nettyClientProperties;
public ClientHandleUdpDistributeClientPermeateServerInitTypeAdvanced(NettyClientProperties nettyClientProperties) {
this.nettyClientProperties = nettyClientProperties;
}
/**
* 处理当前数据
*
* @param channel 当前通道
* @param nettyProxyMsg 通道数据
*/
@Override
public void doHandler(Channel channel, NettyProxyMsg nettyProxyMsg) {
// 初始化 客户端渗透服务端socket
byte[] clientIdBytes = nettyProxyMsg.getClientId();
byte[] visitorPort = nettyProxyMsg.getVisitorPort();
byte[] clientTargetIp = nettyProxyMsg.getClientTargetIp();
byte[] clientTargetPort = nettyProxyMsg.getClientTargetPort();
List<HandleChannelTypeAdvanced> handleChannelTypeAdvancedList = new ArrayList<>(SpringContextHolder.getApplicationContext().getBeansOfType(HandleChannelTypeAdvanced.class).values());
NettyUdpClientPermeateServerVisitorSocket nettyTcpClientPermeateServerVisitorSocket = NettyUdpClientPermeateServerVisitorSocket.NettyVisitorSocketBuilder.builder()
.builderClientId(new String(clientIdBytes))
.builderClientTargetIp(new String(clientTargetIp))
.builderClientTargetPort(Integer.parseInt(new String(clientTargetPort)))
.builderVisitorPort(Integer.parseInt(new String(visitorPort)))
.builderNettyClientProperties(nettyClientProperties)
.builderHandleChannelTypeAdvancedList(handleChannelTypeAdvancedList)
.build();
try {
nettyTcpClientPermeateServerVisitorSocket.start();
} catch (Exception e) {
log.error(e.getMessage(), e);
e.printStackTrace();
}
}
}

View File

@ -8,7 +8,9 @@ import org.framework.lazy.cloud.network.heartbeat.common.InternalNetworkPenetrat
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.udp.client.AbstractHandleUdpDistributeServicePermeateClientRealConnectTypeAdvanced;
import org.wu.framework.spring.utils.SpringContextHolder;
import java.util.ArrayList;
import java.util.List;
/**
@ -18,11 +20,10 @@ import java.util.List;
public class ClientHandleUdpDistributeServicePermeateClientRealConnectTypeAdvanced extends AbstractHandleUdpDistributeServicePermeateClientRealConnectTypeAdvanced<NettyProxyMsg> {
private final NettyClientProperties nettyClientProperties;// 服务端地址信息
private final List<HandleChannelTypeAdvanced> handleChannelTypeAdvancedList;
public ClientHandleUdpDistributeServicePermeateClientRealConnectTypeAdvanced(NettyClientProperties nettyClientProperties, List<HandleChannelTypeAdvanced> handleChannelTypeAdvancedList) {
public ClientHandleUdpDistributeServicePermeateClientRealConnectTypeAdvanced(NettyClientProperties nettyClientProperties) {
this.nettyClientProperties = nettyClientProperties;
this.handleChannelTypeAdvancedList = handleChannelTypeAdvancedList;
}
/**
@ -49,6 +50,7 @@ public class ClientHandleUdpDistributeServicePermeateClientRealConnectTypeAdvanc
.visitorId(new String(visitorIdBytes))
.build();
List<HandleChannelTypeAdvanced> handleChannelTypeAdvancedList = new ArrayList<>(SpringContextHolder.getApplicationContext().getBeansOfType(HandleChannelTypeAdvanced.class).values());
// 绑定真实服务端口
NettyUdpServerPermeateClientRealSocket.buildRealServer(internalNetworkPenetrationRealClient, nettyClientProperties, handleChannelTypeAdvancedList);

View File

@ -9,7 +9,7 @@ import org.framework.lazy.cloud.network.heartbeat.common.advanced.udp.client.Abs
* 接收服务端发送过来的聊天信息
*/
@Slf4j
public class ClientHandleUdpDistributeSingleClientUdpMessageTypeAdvanced extends AbstractHandleUdpDistributeSingleClientMessageTypeAdvanced<NettyProxyMsg> {
public class ClientHandleUdpDistributeSingleClientMessageTypeAdvanced extends AbstractHandleUdpDistributeSingleClientMessageTypeAdvanced<NettyProxyMsg> {
/**
* 处理当前数据
*

View File

@ -8,7 +8,7 @@ import io.netty.handler.timeout.IdleState;
import io.netty.handler.timeout.IdleStateEvent;
import lombok.extern.slf4j.Slf4j;
import org.framework.lazy.cloud.network.heartbeat.client.netty.udp.socket.NettyUdpClientSocket;
import org.framework.lazy.cloud.network.heartbeat.common.UdpMessageType;
import org.framework.lazy.cloud.network.heartbeat.common.constant.UdpMessageType;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.adapter.ChannelTypeAdapter;

View File

@ -5,7 +5,7 @@ import io.netty.channel.Channel;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;
import lombok.extern.slf4j.Slf4j;
import org.framework.lazy.cloud.network.heartbeat.common.UdpMessageType;
import org.framework.lazy.cloud.network.heartbeat.common.constant.UdpMessageType;
import org.framework.lazy.cloud.network.heartbeat.common.NettyByteBuf;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;

View File

@ -5,7 +5,7 @@ import io.netty.channel.Channel;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;
import lombok.extern.slf4j.Slf4j;
import org.framework.lazy.cloud.network.heartbeat.common.UdpMessageType;
import org.framework.lazy.cloud.network.heartbeat.common.constant.UdpMessageType;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.adapter.ChannelTypeAdapter;
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;

View File

@ -5,7 +5,7 @@ import io.netty.channel.Channel;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;
import lombok.extern.slf4j.Slf4j;
import org.framework.lazy.cloud.network.heartbeat.common.UdpMessageType;
import org.framework.lazy.cloud.network.heartbeat.common.constant.UdpMessageType;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.adapter.ChannelTypeAdapter;
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;

View File

@ -12,7 +12,7 @@ import org.framework.lazy.cloud.network.heartbeat.client.netty.InternalNetworkCl
import org.framework.lazy.cloud.network.heartbeat.client.netty.udp.advanced.ClientHandleUdpDistributeClientTransferServerPermeateChannelConnectionSuccessfulTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.client.netty.udp.socket.NettyUdpClientPermeateClientVisitorTransferSocket;
import org.framework.lazy.cloud.network.heartbeat.client.netty.udp.socket.NettyUdpClientPermeateServerVisitorTransferSocket;
import org.framework.lazy.cloud.network.heartbeat.common.UdpMessageType;
import org.framework.lazy.cloud.network.heartbeat.common.constant.UdpMessageType;
import org.framework.lazy.cloud.network.heartbeat.common.NettyCommunicationIdContext;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.NettyRealIdContext;

View File

@ -7,7 +7,7 @@ import io.netty.channel.SimpleChannelInboundHandler;
import io.netty.handler.timeout.IdleState;
import io.netty.handler.timeout.IdleStateEvent;
import lombok.extern.slf4j.Slf4j;
import org.framework.lazy.cloud.network.heartbeat.common.UdpMessageType;
import org.framework.lazy.cloud.network.heartbeat.common.constant.UdpMessageType;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.adapter.ChannelTypeAdapter;
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;

View File

@ -11,7 +11,7 @@ import lombok.extern.slf4j.Slf4j;
import org.framework.lazy.cloud.network.heartbeat.client.netty.InternalNetworkClientPermeateServerVisitor;
import org.framework.lazy.cloud.network.heartbeat.client.netty.udp.advanced.ClientHandleUdpDistributeClientTransferServerPermeateChannelConnectionSuccessfulTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.client.netty.udp.socket.NettyUdpClientPermeateServerVisitorTransferSocket;
import org.framework.lazy.cloud.network.heartbeat.common.UdpMessageType;
import org.framework.lazy.cloud.network.heartbeat.common.constant.UdpMessageType;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;

View File

@ -6,7 +6,7 @@ import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelOption;
import io.netty.channel.SimpleChannelInboundHandler;
import lombok.extern.slf4j.Slf4j;
import org.framework.lazy.cloud.network.heartbeat.common.UdpMessageType;
import org.framework.lazy.cloud.network.heartbeat.common.constant.UdpMessageType;
import org.framework.lazy.cloud.network.heartbeat.common.NettyByteBuf;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;

View File

@ -7,7 +7,7 @@ import io.netty.channel.ChannelOption;
import io.netty.channel.SimpleChannelInboundHandler;
import lombok.extern.slf4j.Slf4j;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.UdpMessageType;
import org.framework.lazy.cloud.network.heartbeat.common.constant.UdpMessageType;
import org.framework.lazy.cloud.network.heartbeat.common.adapter.ChannelTypeAdapter;
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
import org.wu.framework.core.utils.ObjectUtils;

View File

@ -11,7 +11,7 @@ import org.framework.lazy.cloud.network.heartbeat.client.netty.udp.filter.NettyU
import org.framework.lazy.cloud.network.heartbeat.client.netty.udp.filter.NettyUdpClientPermeateClientTransferRealFilter;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.NettyRealIdContext;
import org.framework.lazy.cloud.network.heartbeat.common.UdpMessageType;
import org.framework.lazy.cloud.network.heartbeat.common.constant.UdpMessageType;
import org.framework.lazy.cloud.network.heartbeat.common.adapter.ChannelTypeAdapter;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;

View File

@ -9,7 +9,7 @@ import lombok.extern.slf4j.Slf4j;
import org.framework.lazy.cloud.network.heartbeat.client.config.NettyClientProperties;
import org.framework.lazy.cloud.network.heartbeat.client.netty.InternalNetworkClientPermeateClientVisitor;
import org.framework.lazy.cloud.network.heartbeat.client.netty.udp.filter.NettyUdpClientPermeateClientTransferFilter;
import org.framework.lazy.cloud.network.heartbeat.common.UdpMessageType;
import org.framework.lazy.cloud.network.heartbeat.common.constant.UdpMessageType;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.adapter.ChannelTypeAdapter;
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;

View File

@ -9,7 +9,7 @@ import lombok.extern.slf4j.Slf4j;
import org.framework.lazy.cloud.network.heartbeat.client.config.NettyClientProperties;
import org.framework.lazy.cloud.network.heartbeat.client.netty.InternalNetworkClientPermeateServerVisitor;
import org.framework.lazy.cloud.network.heartbeat.client.netty.udp.filter.NettyUdpClientPermeateServerTransferFilter;
import org.framework.lazy.cloud.network.heartbeat.common.UdpMessageType;
import org.framework.lazy.cloud.network.heartbeat.common.constant.UdpMessageType;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.adapter.ChannelTypeAdapter;
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;

View File

@ -4,12 +4,14 @@ package org.framework.lazy.cloud.network.heartbeat.client.netty.udp.socket;
import io.netty.bootstrap.Bootstrap;
import io.netty.channel.*;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.nio.NioDatagramChannel;
import io.netty.channel.socket.nio.NioSocketChannel;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
import org.framework.lazy.cloud.network.heartbeat.client.netty.NettyClientSocket;
import org.framework.lazy.cloud.network.heartbeat.client.netty.event.ClientChangeEvent;
import org.framework.lazy.cloud.network.heartbeat.client.netty.udp.filter.NettyUdpClientFilter;
import org.framework.lazy.cloud.network.heartbeat.common.UdpMessageType;
import org.framework.lazy.cloud.network.heartbeat.common.constant.UdpMessageType;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.NettyServerContext;
import org.framework.lazy.cloud.network.heartbeat.common.adapter.ChannelTypeAdapter;
@ -24,7 +26,7 @@ import java.util.concurrent.TimeUnit;
* 客户端连接服务端
*/
@Slf4j
public class NettyUdpClientSocket {
public class NettyUdpClientSocket implements NettyClientSocket {
private final EventLoopGroup eventLoopGroup = new NioEventLoopGroup();
/**
* 服务端host
@ -78,7 +80,7 @@ public class NettyUdpClientSocket {
protected void newConnect2Server(String inetHost, int inetPort, String clientId, String serverId, ClientChangeEvent clientChangeEvent) throws InterruptedException {
Bootstrap bootstrap = new Bootstrap();
bootstrap.group(eventLoopGroup)
.channel(NioSocketChannel.class)
.channel(NioDatagramChannel.class)
.option(ChannelOption.SO_RCVBUF, 2048 * 1024)
// 设置写缓冲区为1M
.option(ChannelOption.SO_SNDBUF, 1024 * 1024)

View File

@ -12,7 +12,7 @@ import org.framework.lazy.cloud.network.heartbeat.client.netty.udp.filter.NettyU
import org.framework.lazy.cloud.network.heartbeat.common.InternalNetworkPenetrationRealClient;
import org.framework.lazy.cloud.network.heartbeat.common.NettyCommunicationIdContext;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.UdpMessageType;
import org.framework.lazy.cloud.network.heartbeat.common.constant.UdpMessageType;
import org.framework.lazy.cloud.network.heartbeat.common.adapter.ChannelTypeAdapter;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;

View File

@ -2,6 +2,7 @@ package org.framework.lazy.cloud.network.heartbeat.common;
import lombok.Getter;
import lombok.Setter;
import org.framework.lazy.cloud.network.heartbeat.common.constant.TcpMessageType;
import java.util.Arrays;
@ -15,7 +16,7 @@ public class NettyMsg {
/**
* 数据类型
*
* @see MessageType
* @see TcpMessageType
* byte长度 1
*/
private byte type;

View File

@ -3,6 +3,7 @@ package org.framework.lazy.cloud.network.heartbeat.common;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.framework.lazy.cloud.network.heartbeat.common.constant.TcpMessageType;
import org.wu.framework.core.utils.ObjectUtils;
import java.nio.charset.StandardCharsets;
@ -21,7 +22,7 @@ public class NettyProxyMsg {
/**
* 数据类型
*
* @see MessageType
* @see TcpMessageType
* byte长度 1
*/
private byte type;

View File

@ -3,14 +3,14 @@ package org.framework.lazy.cloud.network.heartbeat.common.advanced;
import io.netty.channel.Channel;
import org.springframework.core.Ordered;
import org.framework.lazy.cloud.network.heartbeat.common.MessageType;
import org.framework.lazy.cloud.network.heartbeat.common.enums.MessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.constant.TcpMessageType;
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
/**
* 通道不同数据类型处理器
*
* @see MessageType
* @see MessageTypeEnums
* @see TcpMessageType
* @see TcpMessageTypeEnums
*/
public interface HandleChannelTypeAdvanced extends Ordered {

View File

@ -4,7 +4,7 @@ package org.framework.lazy.cloud.network.heartbeat.common.advanced.tcp;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.AbstractHandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.enums.MessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
/**
@ -23,6 +23,6 @@ public abstract class AbstractTcpHandleChannelHeartbeatTypeAdvanced<MSG> extends
*/
@Override
public boolean doSupport(NettyProxyMsg msg) {
return MessageTypeEnums.TCP_TYPE_HEARTBEAT.getTypeByte() == msg.getType();
return TcpMessageTypeEnums.TCP_TYPE_HEARTBEAT.getTypeByte() == msg.getType();
}
}

View File

@ -4,7 +4,7 @@ package org.framework.lazy.cloud.network.heartbeat.common.advanced.tcp.client;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.AbstractHandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.enums.MessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
/**
* 客户端通道 is active
@ -20,6 +20,6 @@ public abstract class AbstractHandleTcpClientChannelActiveAdvanced<MSG> extends
*/
@Override
public boolean doSupport(NettyProxyMsg msg) {
return MessageTypeEnums.TCP_CLIENT_CHANNEL_ACTIVE.getTypeByte() == msg.getType();
return TcpMessageTypeEnums.TCP_CLIENT_CHANNEL_ACTIVE.getTypeByte() == msg.getType();
}
}

View File

@ -4,13 +4,13 @@ package org.framework.lazy.cloud.network.heartbeat.common.advanced.tcp.client;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.AbstractHandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.enums.MessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
/**
* 下发 客户端渗透客户端init close 信息
*
* @see MessageTypeEnums#TCP_DISTRIBUTE_CLIENT_PERMEATE_CLIENT_CLOSE
* @see TcpMessageTypeEnums#TCP_DISTRIBUTE_CLIENT_PERMEATE_CLIENT_CLOSE
*/
public abstract class AbstractHandleTcpDistributeClientPermeateClientCloseTypeAdvanced<MSG> extends AbstractHandleChannelTypeAdvanced<NettyProxyMsg> implements HandleChannelTypeAdvanced {
@ -23,6 +23,6 @@ public abstract class AbstractHandleTcpDistributeClientPermeateClientCloseTypeAd
*/
@Override
public boolean doSupport(NettyProxyMsg msg) {
return MessageTypeEnums.TCP_DISTRIBUTE_CLIENT_PERMEATE_CLIENT_CLOSE.getTypeByte() == msg.getType();
return TcpMessageTypeEnums.TCP_DISTRIBUTE_CLIENT_PERMEATE_CLIENT_CLOSE.getTypeByte() == msg.getType();
}
}

View File

@ -4,13 +4,13 @@ package org.framework.lazy.cloud.network.heartbeat.common.advanced.tcp.client;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.AbstractHandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.enums.MessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
/**
* 下发 客户端渗透客户端init信息
*
* @see MessageTypeEnums#TCP_DISTRIBUTE_CLIENT_PERMEATE_CLIENT_INIT
* @see TcpMessageTypeEnums#TCP_DISTRIBUTE_CLIENT_PERMEATE_CLIENT_INIT
*/
public abstract class AbstractHandleTcpDistributeClientPermeateClientInitTypeAdvanced<MSG> extends AbstractHandleChannelTypeAdvanced<NettyProxyMsg> implements HandleChannelTypeAdvanced {
@ -23,6 +23,6 @@ public abstract class AbstractHandleTcpDistributeClientPermeateClientInitTypeAdv
*/
@Override
public boolean doSupport(NettyProxyMsg msg) {
return MessageTypeEnums.TCP_DISTRIBUTE_CLIENT_PERMEATE_CLIENT_INIT.getTypeByte() == msg.getType();
return TcpMessageTypeEnums.TCP_DISTRIBUTE_CLIENT_PERMEATE_CLIENT_INIT.getTypeByte() == msg.getType();
}
}

View File

@ -4,13 +4,13 @@ package org.framework.lazy.cloud.network.heartbeat.common.advanced.tcp.client;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.AbstractHandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.enums.MessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
/**
* 下发客户端渗透客户端通信通道关闭
*
* @see MessageTypeEnums#TCP_DISTRIBUTE_CLIENT_PERMEATE_CLIENT_TRANSFER_CLOSE
* @see TcpMessageTypeEnums#TCP_DISTRIBUTE_CLIENT_PERMEATE_CLIENT_TRANSFER_CLOSE
*/
public abstract class AbstractHandleTcpDistributeClientPermeateClientTransferCloseTypeAdvanced<MSG> extends AbstractHandleChannelTypeAdvanced<NettyProxyMsg> implements HandleChannelTypeAdvanced {
@ -23,6 +23,6 @@ public abstract class AbstractHandleTcpDistributeClientPermeateClientTransferClo
*/
@Override
public boolean doSupport(NettyProxyMsg msg) {
return MessageTypeEnums.TCP_DISTRIBUTE_CLIENT_PERMEATE_CLIENT_TRANSFER_CLOSE.getTypeByte() == msg.getType();
return TcpMessageTypeEnums.TCP_DISTRIBUTE_CLIENT_PERMEATE_CLIENT_TRANSFER_CLOSE.getTypeByte() == msg.getType();
}
}

View File

@ -4,13 +4,13 @@ package org.framework.lazy.cloud.network.heartbeat.common.advanced.tcp.client;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.AbstractHandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.enums.MessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
/**
* 下发 客户端渗透服务端init close 信息
*
* @see MessageTypeEnums#TCP_DISTRIBUTE_CLIENT_PERMEATE_SERVER_CLOSE
* @see TcpMessageTypeEnums#TCP_DISTRIBUTE_CLIENT_PERMEATE_SERVER_CLOSE
*/
public abstract class AbstractHandleTcpDistributeClientPermeateServerCloseTypeAdvanced<MSG> extends AbstractHandleChannelTypeAdvanced<NettyProxyMsg> implements HandleChannelTypeAdvanced {
@ -23,6 +23,6 @@ public abstract class AbstractHandleTcpDistributeClientPermeateServerCloseTypeAd
*/
@Override
public boolean doSupport(NettyProxyMsg msg) {
return MessageTypeEnums.TCP_DISTRIBUTE_CLIENT_PERMEATE_SERVER_CLOSE.getTypeByte() == msg.getType();
return TcpMessageTypeEnums.TCP_DISTRIBUTE_CLIENT_PERMEATE_SERVER_CLOSE.getTypeByte() == msg.getType();
}
}

View File

@ -4,13 +4,13 @@ package org.framework.lazy.cloud.network.heartbeat.common.advanced.tcp.client;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.AbstractHandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.enums.MessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
/**
* 下发 客户端渗透服务端init信息
*
* @see MessageTypeEnums#TCP_DISTRIBUTE_CLIENT_PERMEATE_SERVER_INIT
* @see TcpMessageTypeEnums#TCP_DISTRIBUTE_CLIENT_PERMEATE_SERVER_INIT
*/
public abstract class AbstractHandleTcpDistributeClientPermeateServerInitTypeAdvanced<MSG> extends AbstractHandleChannelTypeAdvanced<NettyProxyMsg> implements HandleChannelTypeAdvanced {
@ -23,6 +23,6 @@ public abstract class AbstractHandleTcpDistributeClientPermeateServerInitTypeAdv
*/
@Override
public boolean doSupport(NettyProxyMsg msg) {
return MessageTypeEnums.TCP_DISTRIBUTE_CLIENT_PERMEATE_SERVER_INIT.getTypeByte() == msg.getType();
return TcpMessageTypeEnums.TCP_DISTRIBUTE_CLIENT_PERMEATE_SERVER_INIT.getTypeByte() == msg.getType();
}
}

View File

@ -4,13 +4,13 @@ package org.framework.lazy.cloud.network.heartbeat.common.advanced.tcp.client;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.AbstractHandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.enums.MessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
/**
* 下发 客户端渗透服务端通信通道关闭
*
* @see MessageTypeEnums#TCP_DISTRIBUTE_CLIENT_PERMEATE_SERVER_TRANSFER_CLOSE
* @see TcpMessageTypeEnums#TCP_DISTRIBUTE_CLIENT_PERMEATE_SERVER_TRANSFER_CLOSE
*/
public abstract class AbstractHandleTcpDistributeClientPermeateServerTransferCloseTypeAdvanced<MSG> extends AbstractHandleChannelTypeAdvanced<NettyProxyMsg> implements HandleChannelTypeAdvanced {
@ -23,6 +23,6 @@ public abstract class AbstractHandleTcpDistributeClientPermeateServerTransferClo
*/
@Override
public boolean doSupport(NettyProxyMsg msg) {
return MessageTypeEnums.TCP_DISTRIBUTE_CLIENT_PERMEATE_SERVER_TRANSFER_CLOSE.getTypeByte() == msg.getType();
return TcpMessageTypeEnums.TCP_DISTRIBUTE_CLIENT_PERMEATE_SERVER_TRANSFER_CLOSE.getTypeByte() == msg.getType();
}
}

View File

@ -4,13 +4,13 @@ package org.framework.lazy.cloud.network.heartbeat.common.advanced.tcp.client;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.AbstractHandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.enums.MessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
/**
* 下发 客户端渗透服务端通信传输
*
* @see MessageTypeEnums#TCP_DISTRIBUTE_CLIENT_PERMEATE_SERVER_TRANSFER
* @see TcpMessageTypeEnums#TCP_DISTRIBUTE_CLIENT_PERMEATE_SERVER_TRANSFER
*/
public abstract class AbstractHandleTcpDistributeClientPermeateServerTransferTypeAdvanced<MSG> extends AbstractHandleChannelTypeAdvanced<NettyProxyMsg> implements HandleChannelTypeAdvanced {
@ -23,6 +23,6 @@ public abstract class AbstractHandleTcpDistributeClientPermeateServerTransferTyp
*/
@Override
public boolean doSupport(NettyProxyMsg msg) {
return MessageTypeEnums.TCP_DISTRIBUTE_CLIENT_PERMEATE_SERVER_TRANSFER.getTypeByte() == msg.getType();
return TcpMessageTypeEnums.TCP_DISTRIBUTE_CLIENT_PERMEATE_SERVER_TRANSFER.getTypeByte() == msg.getType();
}
}

View File

@ -4,13 +4,13 @@ package org.framework.lazy.cloud.network.heartbeat.common.advanced.tcp.client;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.AbstractHandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.enums.MessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
/**
* 下发 客户端渗透客户端数据传输通道连接成功
*
* @see MessageTypeEnums#TCP_DISTRIBUTE_CLIENT_TRANSFER_CLIENT_PERMEATE_CHANNEL_CONNECTION_SUCCESSFUL
* @see TcpMessageTypeEnums#TCP_DISTRIBUTE_CLIENT_TRANSFER_CLIENT_PERMEATE_CHANNEL_CONNECTION_SUCCESSFUL
*/
public abstract class AbstractHandleTcpDistributeClientTransferClientPermeateChannelConnectionSuccessfulTypeAdvanced<MSG> extends AbstractHandleChannelTypeAdvanced<NettyProxyMsg> implements HandleChannelTypeAdvanced {
@ -23,6 +23,6 @@ public abstract class AbstractHandleTcpDistributeClientTransferClientPermeateCha
*/
@Override
public boolean doSupport(NettyProxyMsg msg) {
return MessageTypeEnums.TCP_DISTRIBUTE_CLIENT_TRANSFER_CLIENT_PERMEATE_CHANNEL_CONNECTION_SUCCESSFUL.getTypeByte() == msg.getType();
return TcpMessageTypeEnums.TCP_DISTRIBUTE_CLIENT_TRANSFER_CLIENT_PERMEATE_CHANNEL_CONNECTION_SUCCESSFUL.getTypeByte() == msg.getType();
}
}

View File

@ -4,13 +4,13 @@ package org.framework.lazy.cloud.network.heartbeat.common.advanced.tcp.client;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.AbstractHandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.enums.MessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
/**
* 下发 客户端渗透客户端数据传输通道init 成功
*
* @see MessageTypeEnums#TCP_DISTRIBUTE_CLIENT_TRANSFER_CLIENT_PERMEATE_CHANNEL_CONNECTION_SUCCESSFUL
* @see TcpMessageTypeEnums#TCP_DISTRIBUTE_CLIENT_TRANSFER_CLIENT_PERMEATE_CHANNEL_CONNECTION_SUCCESSFUL
*/
public abstract class AbstractHandleTcpDistributeClientTransferClientPermeateChannelInitSuccessfulTypeAdvanced<MSG> extends AbstractHandleChannelTypeAdvanced<NettyProxyMsg> implements HandleChannelTypeAdvanced {
@ -23,6 +23,6 @@ public abstract class AbstractHandleTcpDistributeClientTransferClientPermeateCha
*/
@Override
public boolean doSupport(NettyProxyMsg msg) {
return MessageTypeEnums.TCP_DISTRIBUTE_CLIENT_PERMEATE_CLIENT_TRANSFER_CHANNEL_INIT_SUCCESSFUL.getTypeByte() == msg.getType();
return TcpMessageTypeEnums.TCP_DISTRIBUTE_CLIENT_PERMEATE_CLIENT_TRANSFER_CHANNEL_INIT_SUCCESSFUL.getTypeByte() == msg.getType();
}
}

View File

@ -4,13 +4,13 @@ package org.framework.lazy.cloud.network.heartbeat.common.advanced.tcp.client;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.AbstractHandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.enums.MessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
/**
* 下发客户端渗透客户端数据传输
*
* @see MessageTypeEnums#TCP_DISTRIBUTE_CLIENT_PERMEATE_CLIENT_TRANSFER_REQUEST
* @see TcpMessageTypeEnums#TCP_DISTRIBUTE_CLIENT_PERMEATE_CLIENT_TRANSFER_REQUEST
*/
public abstract class AbstractHandleTcpDistributeClientTransferClientRequestTypeAdvanced<MSG> extends AbstractHandleChannelTypeAdvanced<NettyProxyMsg> implements HandleChannelTypeAdvanced {
@ -23,6 +23,6 @@ public abstract class AbstractHandleTcpDistributeClientTransferClientRequestType
*/
@Override
public boolean doSupport(NettyProxyMsg msg) {
return MessageTypeEnums.TCP_DISTRIBUTE_CLIENT_PERMEATE_CLIENT_TRANSFER_REQUEST.getTypeByte() == msg.getType();
return TcpMessageTypeEnums.TCP_DISTRIBUTE_CLIENT_PERMEATE_CLIENT_TRANSFER_REQUEST.getTypeByte() == msg.getType();
}
}

View File

@ -4,13 +4,13 @@ package org.framework.lazy.cloud.network.heartbeat.common.advanced.tcp.client;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.AbstractHandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.enums.MessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
/**
* 下发 客户端渗透服务端数据传输通道连接成功
*
* @see MessageTypeEnums#TCP_DISTRIBUTE_CLIENT_TRANSFER_SERVER_PERMEATE_CHANNEL_CONNECTION_SUCCESSFUL
* @see TcpMessageTypeEnums#TCP_DISTRIBUTE_CLIENT_TRANSFER_SERVER_PERMEATE_CHANNEL_CONNECTION_SUCCESSFUL
*/
public abstract class AbstractHandleTcpDistributeClientTransferServerPermeateChannelConnectionSuccessfulTypeAdvanced<MSG> extends AbstractHandleChannelTypeAdvanced<NettyProxyMsg> implements HandleChannelTypeAdvanced {
@ -23,6 +23,6 @@ public abstract class AbstractHandleTcpDistributeClientTransferServerPermeateCha
*/
@Override
public boolean doSupport(NettyProxyMsg msg) {
return MessageTypeEnums.TCP_DISTRIBUTE_CLIENT_TRANSFER_SERVER_PERMEATE_CHANNEL_CONNECTION_SUCCESSFUL.getTypeByte() == msg.getType();
return TcpMessageTypeEnums.TCP_DISTRIBUTE_CLIENT_TRANSFER_SERVER_PERMEATE_CHANNEL_CONNECTION_SUCCESSFUL.getTypeByte() == msg.getType();
}
}

View File

@ -4,12 +4,12 @@ package org.framework.lazy.cloud.network.heartbeat.common.advanced.tcp.client;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.AbstractHandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.enums.MessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
/**
* 下发 集群注册
* @see MessageTypeEnums#TCP_DISTRIBUTE_CLUSTER_NODE_REGISTER_MESSAGE
* @see TcpMessageTypeEnums#TCP_DISTRIBUTE_CLUSTER_NODE_REGISTER_MESSAGE
*/
public abstract class AbstractHandleTcpDistributeClusterNodeRegisterTypeAdvanced<MSG> extends AbstractHandleChannelTypeAdvanced<NettyProxyMsg> implements HandleChannelTypeAdvanced {
@ -22,6 +22,6 @@ public abstract class AbstractHandleTcpDistributeClusterNodeRegisterTypeAdvanced
*/
@Override
public boolean doSupport(NettyProxyMsg msg) {
return MessageTypeEnums.TCP_DISTRIBUTE_CLUSTER_NODE_REGISTER_MESSAGE.getTypeByte() == msg.getType();
return TcpMessageTypeEnums.TCP_DISTRIBUTE_CLUSTER_NODE_REGISTER_MESSAGE.getTypeByte() == msg.getType();
}
}

View File

@ -3,7 +3,7 @@ package org.framework.lazy.cloud.network.heartbeat.common.advanced.tcp.client;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.AbstractHandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.enums.MessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
/**
* 下发 客户端连接成功通知
@ -18,6 +18,6 @@ public abstract class AbstractHandleTcpDistributeConnectSuccessNotificationTypeA
*/
@Override
public boolean doSupport(NettyProxyMsg msg) {
return MessageTypeEnums.TCP_DISTRIBUTE_CLIENT_CONNECTION_SUCCESS_NOTIFICATION.getTypeByte() == msg.getType();
return TcpMessageTypeEnums.TCP_DISTRIBUTE_CLIENT_CONNECTION_SUCCESS_NOTIFICATION.getTypeByte() == msg.getType();
}
}

View File

@ -4,7 +4,7 @@ package org.framework.lazy.cloud.network.heartbeat.common.advanced.tcp.client;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.AbstractHandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.enums.MessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
/**
* 下发客户端断开连接通知
@ -21,6 +21,6 @@ public abstract class AbstractHandleTcpDistributeDisconnectTypeAdvancedHandle<MS
@Override
public boolean doSupport(NettyProxyMsg msg) {
// 下发 客户端断开连接通知
return MessageTypeEnums.TCP_DISTRIBUTE_CLIENT_DISCONNECTION_NOTIFICATION.getTypeByte() == msg.getType();
return TcpMessageTypeEnums.TCP_DISTRIBUTE_CLIENT_DISCONNECTION_NOTIFICATION.getTypeByte() == msg.getType();
}
}

View File

@ -4,7 +4,7 @@ package org.framework.lazy.cloud.network.heartbeat.common.advanced.tcp.client;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.AbstractHandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.enums.MessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
/**
* 下发 客户端 创建真实连接
@ -20,6 +20,6 @@ public abstract class AbstractHandleTcpDistributeServicePermeateClientRealConnec
*/
@Override
public boolean doSupport(NettyProxyMsg msg) {
return MessageTypeEnums.TCP_DISTRIBUTE_SINGLE_CLIENT_REAL_CONNECT.getTypeByte() == msg.getType();
return TcpMessageTypeEnums.TCP_DISTRIBUTE_SINGLE_CLIENT_REAL_CONNECT.getTypeByte() == msg.getType();
}
}

View File

@ -4,13 +4,13 @@ package org.framework.lazy.cloud.network.heartbeat.common.advanced.tcp.client;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.AbstractHandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.enums.MessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
/**
* 下发客户端渗透客户端数据传输响应
*
* @see MessageTypeEnums#TCP_DISTRIBUTE_CLIENT_PERMEATE_CLIENT_TRANSFER_RESPONSE
* @see TcpMessageTypeEnums#TCP_DISTRIBUTE_CLIENT_PERMEATE_CLIENT_TRANSFER_RESPONSE
*/
public abstract class AbstractHandleTcpDistributeServicePermeateClientTransferClientResponseTypeAdvanced<MSG> extends AbstractHandleChannelTypeAdvanced<NettyProxyMsg> implements HandleChannelTypeAdvanced {
@ -23,6 +23,6 @@ public abstract class AbstractHandleTcpDistributeServicePermeateClientTransferCl
*/
@Override
public boolean doSupport(NettyProxyMsg msg) {
return MessageTypeEnums.TCP_DISTRIBUTE_CLIENT_PERMEATE_CLIENT_TRANSFER_RESPONSE.getTypeByte() == msg.getType();
return TcpMessageTypeEnums.TCP_DISTRIBUTE_CLIENT_PERMEATE_CLIENT_TRANSFER_RESPONSE.getTypeByte() == msg.getType();
}
}

View File

@ -4,7 +4,7 @@ package org.framework.lazy.cloud.network.heartbeat.common.advanced.tcp.client;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.AbstractHandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.enums.MessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
/**
@ -22,6 +22,6 @@ public abstract class AbstractHandleTcpDistributeServicePermeateClientTransferTy
*/
@Override
public boolean doSupport(NettyProxyMsg msg) {
return MessageTypeEnums.TCP_DISTRIBUTE_CLIENT_TRANSFER.getTypeByte() == msg.getType();
return TcpMessageTypeEnums.TCP_DISTRIBUTE_CLIENT_TRANSFER.getTypeByte() == msg.getType();
}
}

View File

@ -4,7 +4,7 @@ package org.framework.lazy.cloud.network.heartbeat.common.advanced.tcp.client;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.AbstractHandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.enums.MessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
/**
* 下发 客户端关闭代理服务通道
@ -20,6 +20,6 @@ public abstract class AbstractHandleTcpDistributeSingleClientMessageTypeAdvanced
*/
@Override
public boolean doSupport(NettyProxyMsg msg) {
return MessageTypeEnums.TCP_DISTRIBUTE_SINGLE_CLIENT_MESSAGE.getTypeByte() == msg.getType();
return TcpMessageTypeEnums.TCP_DISTRIBUTE_SINGLE_CLIENT_MESSAGE.getTypeByte() == msg.getType();
}
}

View File

@ -4,12 +4,12 @@ package org.framework.lazy.cloud.network.heartbeat.common.advanced.tcp.client;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.AbstractHandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.enums.MessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
/**
* 下发 客户端代理的真实端口自动读写
*
* @see MessageTypeEnums#TCP_DISTRIBUTE_SINGLE_CLIENT_REAL_CONNECT_AUTO_READ
* @see TcpMessageTypeEnums#TCP_DISTRIBUTE_SINGLE_CLIENT_REAL_CONNECT_AUTO_READ
*/
public abstract class AbstractHandleTcpDistributeSingleClientRealAutoReadConnectTypeAdvanced<MSG> extends AbstractHandleChannelTypeAdvanced<NettyProxyMsg> implements HandleChannelTypeAdvanced {
@ -22,6 +22,6 @@ public abstract class AbstractHandleTcpDistributeSingleClientRealAutoReadConnect
*/
@Override
public boolean doSupport(NettyProxyMsg msg) {
return MessageTypeEnums.TCP_DISTRIBUTE_SINGLE_CLIENT_REAL_CONNECT_AUTO_READ.getTypeByte() == msg.getType();
return TcpMessageTypeEnums.TCP_DISTRIBUTE_SINGLE_CLIENT_REAL_CONNECT_AUTO_READ.getTypeByte() == msg.getType();
}
}

View File

@ -4,7 +4,7 @@ package org.framework.lazy.cloud.network.heartbeat.common.advanced.tcp.client;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.AbstractHandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.enums.MessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
/**
* 下发 客户端关闭代理服务通道
@ -20,6 +20,6 @@ public abstract class AbstractHandleTcpDistributeSingleClientRealCloseVisitorTyp
*/
@Override
public boolean doSupport(NettyProxyMsg msg) {
return MessageTypeEnums.TCP_DISTRIBUTE_SINGLE_CLIENT_REAL_CLOSE_VISITOR.getTypeByte() == msg.getType();
return TcpMessageTypeEnums.TCP_DISTRIBUTE_SINGLE_CLIENT_REAL_CLOSE_VISITOR.getTypeByte() == msg.getType();
}
}

View File

@ -4,7 +4,7 @@ package org.framework.lazy.cloud.network.heartbeat.common.advanced.tcp.client;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.AbstractHandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.enums.MessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
/**
* 下发 客户端暂存关闭
@ -20,6 +20,6 @@ public abstract class AbstractHandleTcpDistributeStagingClosedTypeAdvanced<MSG>
*/
@Override
public boolean doSupport(NettyProxyMsg msg) {
return MessageTypeEnums.TCP_DISTRIBUTE_CLIENT_STAGING_CLOSED_NOTIFICATION.getTypeByte() == msg.getType();
return TcpMessageTypeEnums.TCP_DISTRIBUTE_CLIENT_STAGING_CLOSED_NOTIFICATION.getTypeByte() == msg.getType();
}
}

View File

@ -4,7 +4,7 @@ package org.framework.lazy.cloud.network.heartbeat.common.advanced.tcp.client;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.AbstractHandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.enums.MessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
/**
* 下发 客户端暂存开启
@ -20,6 +20,6 @@ public abstract class AbstractHandleTcpDistributeStagingOpenedTypeAdvanced<MSG>
*/
@Override
public boolean doSupport(NettyProxyMsg msg) {
return MessageTypeEnums.TCP_DISTRIBUTE_CLIENT_STAGING_OPENED_NOTIFICATION.getTypeByte() == msg.getType();
return TcpMessageTypeEnums.TCP_DISTRIBUTE_CLIENT_STAGING_OPENED_NOTIFICATION.getTypeByte() == msg.getType();
}
}

View File

@ -3,7 +3,7 @@ package org.framework.lazy.cloud.network.heartbeat.common.advanced.tcp.server;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.AbstractHandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.enums.MessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
/**
* 服务端处理客户端连接成功
@ -20,6 +20,6 @@ public abstract class AbstractHandleTcpClientConnectSuccessTypeAdvanced<MSG> ext
*/
@Override
public boolean doSupport(NettyProxyMsg msg) {
return MessageTypeEnums.TCP_REPORT_CLIENT_CONNECT_SUCCESS.getTypeByte() == msg.getType();
return TcpMessageTypeEnums.TCP_REPORT_CLIENT_CONNECT_SUCCESS.getTypeByte() == msg.getType();
}
}

View File

@ -4,7 +4,7 @@ package org.framework.lazy.cloud.network.heartbeat.common.advanced.tcp.server;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.AbstractHandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.enums.MessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
/**
@ -22,6 +22,6 @@ public abstract class AbstractHandleTcpReportClientPermeateClientCloseTypeAdvanc
*/
@Override
public boolean doSupport(NettyProxyMsg msg) {
return MessageTypeEnums.TCP_REPORT_CLIENT_PERMEATE_CLIENT_CLOSE.getTypeByte() == msg.getType();
return TcpMessageTypeEnums.TCP_REPORT_CLIENT_PERMEATE_CLIENT_CLOSE.getTypeByte() == msg.getType();
}
}

View File

@ -4,7 +4,7 @@ package org.framework.lazy.cloud.network.heartbeat.common.advanced.tcp.server;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.AbstractHandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.enums.MessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
/**
@ -22,6 +22,6 @@ public abstract class AbstractHandleTcpReportClientPermeateClientInitTypeAdvance
*/
@Override
public boolean doSupport(NettyProxyMsg msg) {
return MessageTypeEnums.TCP_REPORT_CLIENT_PERMEATE_CLIENT_INIT.getTypeByte() == msg.getType();
return TcpMessageTypeEnums.TCP_REPORT_CLIENT_PERMEATE_CLIENT_INIT.getTypeByte() == msg.getType();
}
}

View File

@ -4,12 +4,12 @@ package org.framework.lazy.cloud.network.heartbeat.common.advanced.tcp.server;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.AbstractHandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.enums.MessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
/**
* 上报客户端渗透客户端通信通道关闭
*@see MessageTypeEnums#TCP_REPORT_CLIENT_PERMEATE_CLIENT_TRANSFER_CLOSE
*@see TcpMessageTypeEnums#TCP_REPORT_CLIENT_PERMEATE_CLIENT_TRANSFER_CLOSE
*/
public abstract class AbstractHandleTcpReportClientPermeateClientTransferCloseTypeAdvanced<MSG> extends AbstractHandleChannelTypeAdvanced<NettyProxyMsg> implements HandleChannelTypeAdvanced {
@ -22,6 +22,6 @@ public abstract class AbstractHandleTcpReportClientPermeateClientTransferCloseTy
*/
@Override
public boolean doSupport(NettyProxyMsg msg) {
return MessageTypeEnums.TCP_REPORT_CLIENT_PERMEATE_CLIENT_TRANSFER_CLOSE.getTypeByte() == msg.getType();
return TcpMessageTypeEnums.TCP_REPORT_CLIENT_PERMEATE_CLIENT_TRANSFER_CLOSE.getTypeByte() == msg.getType();
}
}

View File

@ -4,7 +4,7 @@ package org.framework.lazy.cloud.network.heartbeat.common.advanced.tcp.server;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.AbstractHandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.enums.MessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
/**
@ -22,6 +22,6 @@ public abstract class AbstractHandleTcpReportClientPermeateServerCloseTypeAdvanc
*/
@Override
public boolean doSupport(NettyProxyMsg msg) {
return MessageTypeEnums.TCP_REPORT_CLIENT_PERMEATE_SERVER_CLOSE.getTypeByte() == msg.getType();
return TcpMessageTypeEnums.TCP_REPORT_CLIENT_PERMEATE_SERVER_CLOSE.getTypeByte() == msg.getType();
}
}

View File

@ -4,7 +4,7 @@ package org.framework.lazy.cloud.network.heartbeat.common.advanced.tcp.server;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.AbstractHandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.enums.MessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
/**
@ -22,6 +22,6 @@ public abstract class AbstractHandleTcpReportClientPermeateServerInitTypeAdvance
*/
@Override
public boolean doSupport(NettyProxyMsg msg) {
return MessageTypeEnums.TCP_REPORT_CLIENT_PERMEATE_SERVER_INIT.getTypeByte() == msg.getType();
return TcpMessageTypeEnums.TCP_REPORT_CLIENT_PERMEATE_SERVER_INIT.getTypeByte() == msg.getType();
}
}

View File

@ -4,7 +4,7 @@ package org.framework.lazy.cloud.network.heartbeat.common.advanced.tcp.server;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.AbstractHandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.enums.MessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
/**
@ -22,6 +22,6 @@ public abstract class AbstractHandleTcpReportClientPermeateServerTransferCloseTy
*/
@Override
public boolean doSupport(NettyProxyMsg msg) {
return MessageTypeEnums.TCP_TCP_REPORT_CLIENT_PERMEATE_SERVER_TRANSFER_CLOSE.getTypeByte() == msg.getType();
return TcpMessageTypeEnums.TCP_TCP_REPORT_CLIENT_PERMEATE_SERVER_TRANSFER_CLOSE.getTypeByte() == msg.getType();
}
}

View File

@ -4,7 +4,7 @@ package org.framework.lazy.cloud.network.heartbeat.common.advanced.tcp.server;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.AbstractHandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.enums.MessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
/**
@ -22,6 +22,6 @@ public abstract class AbstractHandleTcpReportClientPermeateServerTransferTypeAdv
*/
@Override
public boolean doSupport(NettyProxyMsg msg) {
return MessageTypeEnums.TCP_REPORT_CLIENT_PERMEATE_SERVER_TRANSFER.getTypeByte() == msg.getType();
return TcpMessageTypeEnums.TCP_REPORT_CLIENT_PERMEATE_SERVER_TRANSFER.getTypeByte() == msg.getType();
}
}

View File

@ -4,7 +4,7 @@ package org.framework.lazy.cloud.network.heartbeat.common.advanced.tcp.server;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.AbstractHandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.enums.MessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
/**
@ -22,6 +22,6 @@ public abstract class AbstractHandleTcpReportClientTransferClientPermeateChannel
*/
@Override
public boolean doSupport(NettyProxyMsg msg) {
return MessageTypeEnums.TCP_REPORT_CLIENT_TRANSFER_CLIENT_PERMEATE_CHANNEL_CONNECTION_SUCCESSFUL.getTypeByte() == msg.getType();
return TcpMessageTypeEnums.TCP_REPORT_CLIENT_TRANSFER_CLIENT_PERMEATE_CHANNEL_CONNECTION_SUCCESSFUL.getTypeByte() == msg.getType();
}
}

View File

@ -4,7 +4,7 @@ package org.framework.lazy.cloud.network.heartbeat.common.advanced.tcp.server;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.AbstractHandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.enums.MessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
/**
@ -22,6 +22,6 @@ public abstract class AbstractHandleTcpReportClientTransferClientPermeateChannel
*/
@Override
public boolean doSupport(NettyProxyMsg msg) {
return MessageTypeEnums.TCP_REPORT_CLIENT_TRANSFER_CLIENT_PERMEATE_CHANNEL_INIT_SUCCESSFUL.getTypeByte() == msg.getType();
return TcpMessageTypeEnums.TCP_REPORT_CLIENT_TRANSFER_CLIENT_PERMEATE_CHANNEL_INIT_SUCCESSFUL.getTypeByte() == msg.getType();
}
}

View File

@ -4,7 +4,7 @@ package org.framework.lazy.cloud.network.heartbeat.common.advanced.tcp.server;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.AbstractHandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.enums.MessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
/**
@ -22,6 +22,6 @@ public abstract class AbstractHandleTcpReportClientTransferClientResponseTypeAdv
*/
@Override
public boolean doSupport(NettyProxyMsg msg) {
return MessageTypeEnums.TCP_REPORT_CLIENT_TRANSFER_CLIENT_RESPONSE.getTypeByte() == msg.getType();
return TcpMessageTypeEnums.TCP_REPORT_CLIENT_TRANSFER_CLIENT_RESPONSE.getTypeByte() == msg.getType();
}
}

View File

@ -4,7 +4,7 @@ package org.framework.lazy.cloud.network.heartbeat.common.advanced.tcp.server;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.AbstractHandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.enums.MessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
/**
@ -22,6 +22,6 @@ public abstract class AbstractHandleTcpReportClientTransferClientTypeAdvanced<MS
*/
@Override
public boolean doSupport(NettyProxyMsg msg) {
return MessageTypeEnums.TCP_REPORT_CLIENT_TRANSFER_CLIENT_REQUEST.getTypeByte() == msg.getType();
return TcpMessageTypeEnums.TCP_REPORT_CLIENT_TRANSFER_CLIENT_REQUEST.getTypeByte() == msg.getType();
}
}

View File

@ -4,7 +4,7 @@ package org.framework.lazy.cloud.network.heartbeat.common.advanced.tcp.server;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.AbstractHandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.enums.MessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
/**
@ -22,6 +22,6 @@ public abstract class AbstractHandleTcpReportClientTransferServerPermeateChannel
*/
@Override
public boolean doSupport(NettyProxyMsg msg) {
return MessageTypeEnums.TCP_REPORT_CLIENT_TRANSFER_SERVER_PERMEATE_CHANNEL_CONNECTION_SUCCESSFUL.getTypeByte() == msg.getType();
return TcpMessageTypeEnums.TCP_REPORT_CLIENT_TRANSFER_SERVER_PERMEATE_CHANNEL_CONNECTION_SUCCESSFUL.getTypeByte() == msg.getType();
}
}

View File

@ -4,7 +4,7 @@ package org.framework.lazy.cloud.network.heartbeat.common.advanced.tcp.server;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.AbstractHandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.enums.MessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
/**
@ -22,6 +22,6 @@ public abstract class AbstractHandleTcpReportClusterNodeRegisterTypeAdvanced<MSG
*/
@Override
public boolean doSupport(NettyProxyMsg msg) {
return MessageTypeEnums.TCP_REPORT_CLUSTER_NODE_REGISTER_MESSAGE.getTypeByte() == msg.getType();
return TcpMessageTypeEnums.TCP_REPORT_CLUSTER_NODE_REGISTER_MESSAGE.getTypeByte() == msg.getType();
}
}

View File

@ -4,7 +4,7 @@ package org.framework.lazy.cloud.network.heartbeat.common.advanced.tcp.server;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.AbstractHandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.enums.MessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
/**
* 客户端上报断开连接通知
@ -22,6 +22,6 @@ public abstract class AbstractHandleTcpReportDisconnectTypeAdvanced<MSG> extends
@Override
public boolean doSupport(NettyProxyMsg msg) {
// 下发 客户端断开连接通知
return MessageTypeEnums.TCP_REPORT_CLIENT_DISCONNECTION.getTypeByte() == msg.getType();
return TcpMessageTypeEnums.TCP_REPORT_CLIENT_DISCONNECTION.getTypeByte() == msg.getType();
}
}

View File

@ -4,7 +4,7 @@ package org.framework.lazy.cloud.network.heartbeat.common.advanced.tcp.server;
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.AbstractHandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.enums.MessageTypeEnums;
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
/**
@ -22,6 +22,6 @@ public abstract class AbstractHandleTcpReportServerChannelActiveTypeAdvanced<MSG
*/
@Override
public boolean doSupport(NettyProxyMsg msg) {
return MessageTypeEnums.TCP_SERVER_CHANNEL_ACTIVE.getTypeByte() == msg.getType();
return TcpMessageTypeEnums.TCP_SERVER_CHANNEL_ACTIVE.getTypeByte() == msg.getType();
}
}

Some files were not shown because too many files have changed in this diff Show More