Compare commits
2 Commits
ca87968469
...
1.3.0-JDK7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6f8e6cd8a9 | ||
|
|
cf22211114 |
@@ -7,15 +7,15 @@
|
||||
|
||||
#### 操作步骤:拥有公网ip的服务器开发6001(web)、7001端口(tcp),然后执行命令启动服务端
|
||||
```shell
|
||||
docker run -d -it -p 6001:6001 -p 7001:7001 -e spring.profiles.active=prod -e MAIN_DB_HOST=localhost:3306 -e MAIN_DB_PASSWORD=root -e MAIN_DB_PASSWORD=root --name wu-lazy-cloud-heartbeat-server-start registry.cn-hangzhou.aliyuncs.com/wu-lazy/wu-lazy-cloud-heartbeat-server-start:1.3.1-JDK17-SNAPSHOT
|
||||
docker run -d -it -p 6001:6001 -p 7001:7001 -e spring.profiles.active=prod -e MAIN_DB_HOST=localhost:3306 -e MAIN_DB_PASSWORD=root -e MAIN_DB_PASSWORD=root --name wu-lazy-cloud-heartbeat-server-start registry.cn-hangzhou.aliyuncs.com/wu-lazy/wu-lazy-cloud-heartbeat-server-start:1.3.0-JDK17-SNAPSHOT
|
||||
```
|
||||
|
||||
#### 操作步骤:杭州本地机房所在网络服务器启动客户端、你老家所在网络中启动客户端,命令如下
|
||||
```shell
|
||||
docker run -d -it --privileged --name hangzhou-client --restart=always -e spring.lazy.netty.client.inet-host=公网IP -e spring.lazy.netty.client.inet-port=7001 -e spring.lazy.netty.client.client-id="hangzhou-jifang" registry.cn-hangzhou.aliyuncs.com/wu-lazy/wu-lazy-cloud-heartbeat-client-start:1.3.1-JDK17-SNAPSHOT
|
||||
docker run -d -it --privileged --name hangzhou-client --restart=always -e spring.lazy.netty.client.inet-host=公网IP -e spring.lazy.netty.client.inet-port=7001 -e spring.lazy.netty.client.client-id="hangzhou-jifang" registry.cn-hangzhou.aliyuncs.com/wu-lazy/wu-lazy-cloud-heartbeat-client-start:1.3.0-JDK17-SNAPSHOT
|
||||
```
|
||||
```shell
|
||||
docker run -d -it --privileged --name my-home-client --restart=always -e spring.lazy.netty.client.inet-host=公网IP -e spring.lazy.netty.client.inet-port=7001 -e spring.lazy.netty.client.client-id="my-home" registry.cn-hangzhou.aliyuncs.com/wu-lazy/wu-lazy-cloud-heartbeat-client-start:1.3.1-JDK17-SNAPSHOT
|
||||
docker run -d -it --privileged --name my-home-client --restart=always -e spring.lazy.netty.client.inet-host=公网IP -e spring.lazy.netty.client.inet-port=7001 -e spring.lazy.netty.client.client-id="my-home" registry.cn-hangzhou.aliyuncs.com/wu-lazy/wu-lazy-cloud-heartbeat-client-start:1.3.0-JDK17-SNAPSHOT
|
||||
```
|
||||
#### 操作步骤:配置端口
|
||||

|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
#### 模块说明
|
||||
|
||||
| 模块 | 所属层级 | 描述 | 端口 |
|
||||
|------------------------------------------------------------------|------|------------------------|----------------------------------------------------------------|
|
||||
| 模块 | 所属层级 | 描述 | 端口 |
|
||||
|------------------------------------------------------------------------------------|------|------------------------|----------------------------------------------------------------|
|
||||
| [wu-lazy-cloud-heartbeat-common](wu-lazy-cloud-heartbeat-common) | 基础模块 | 基于Netty数据解码、编码、通道处理器声明 | 无 |
|
||||
| [wu-lazy-cloud-heartbeat-server](wu-lazy-cloud-heartbeat-server) | 启动模块 | 内网穿透服务端 | http端口:6001、tcp端口:7001 (默认tcp端口=http端口+1000 如:6001+1000=7001) |
|
||||
| [wu-lazy-cloud-heartbeat-client](wu-lazy-cloud-heartbeat-client) | 启动模块 | 内网穿透客户端 | 6004 |
|
||||
|
||||
|
Before Width: | Height: | Size: 542 KiB |
|
Before Width: | Height: | Size: 528 KiB |
|
Before Width: | Height: | Size: 547 KiB |
|
Before Width: | Height: | Size: 553 KiB |
33
Proxy.md
@@ -1,33 +0,0 @@
|
||||
### 使用手册
|
||||
#### Mac 使用方式
|
||||
##### 获取socks或者http代理服务器信息
|
||||
如:ip:127.0.0.1 port:9001(socks)、8001(http)
|
||||
##### 使用Wi-Fi代理
|
||||
注意如下方式只能代理浏览器请求,无法代理其他应用请求
|
||||

|
||||

|
||||
|
||||
##### 使用第三方软件全局代理[Proxifier3.8.0.dmg](Proxifier3.8.0.dmg)
|
||||
注册码
|
||||
# Proxifier Mac
|
||||
cracked@macked.app
|
||||
8TB85-UWT64-AKK2R-XGBDY-F2UP5
|
||||
# Proxifier Standard Edition
|
||||
cracked@macked.app
|
||||
4JB8X-9YMEZ-BD332-PPNN3-46P48
|
||||
# Proxifier Portable Edition
|
||||
cracked@macked.app
|
||||
FXBZZ-U2FPK-G5KW9-KAANW-TLGPL
|
||||
- Proxifier配置
|
||||

|
||||
- 配置socks服务器地址
|
||||

|
||||

|
||||
- 配置代理路由
|
||||

|
||||
- 展示效果
|
||||

|
||||
|
||||
#### Windows 使用方式
|
||||
##### 使用Wi-Fi代理
|
||||

|
||||
238
README.md
@@ -33,7 +33,7 @@
|
||||
|
||||
wu-lazy-cloud-network
|
||||
是一款基于([wu-framework-parent](https://gitee.com/wujiawei1207537021/wu-framework-parent))孵化出的项目,内部使用Lazy
|
||||
ORM操作数据库,使用环境JDK17 Spring Boot 3.0.2。的网络穿透、渗透工具支持Tcp、Http、Socks
|
||||
ORM操作数据库,使用环境JDK17 Spring Boot 3.0.2。
|
||||
主要功能:
|
||||
- 服务端渗透客户端(网络穿透),对于没有公网IP的服务进行公网IP映射
|
||||
- 
|
||||
@@ -43,22 +43,10 @@ ORM操作数据库,使用环境JDK17 Spring Boot 3.0.2。的网络穿透、渗
|
||||
- 
|
||||
- 客户端渗透客户端----本地端口映射到另一个局域网端口
|
||||
- 
|
||||
- 客户端代理服务端、客户端代理客户端、服务端代理服务端、服务端代理客户端(VPN)----异地组网搭建代理
|
||||
- 
|
||||
|
||||
|
||||
[UI](https://gitee.com/wujiawei1207537021/wu-lazy-cloud-network-server-ui)
|
||||
|
||||
### 内网穿透
|
||||
|
||||
| 模块 | 所属层级 | 描述 | 快照版本 | 发布版本 |
|
||||
|--------------------------------------|------|------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| wu-lazy-cloud-heartbeat-common | 组件 | 内网穿透公共模块(声明接口、枚举、常量、适配器、解析器) | <a target="_blank" href="https://search.maven.org/search?q=wu-lazy-cloud-heartbeat-common%20wu-bionic-parent"><img src="https://img.shields.io/nexus/s/top.wu2020/wu-bionic-parent?server=https%3A%2F%2Foss.sonatype.org&style=flat&logo=log" alt="Maven" /></a> | <a target="_blank" href="https://search.maven.org/search?q=wu-lazy-cloud-heartbeat-common%20wu-lazy-cloud-heartbeat-common"><img src="https://img.shields.io/maven-central/v/top.wu2020/wu-lazy-cloud-heartbeat-common" alt="Maven" /></a> |
|
||||
| wu-lazy-cloud-heartbeat-client | 组件 | 客户端(支持二次开发) | <a target="_blank" href="https://search.maven.org/search?q=wu-lazy-cloud-heartbeat-client%20wu-lazy-cloud-heartbeat-client"><img src="https://img.shields.io/nexus/s/top.wu2020/wu-lazy-cloud-heartbeat-client?server=https%3A%2F%2Foss.sonatype.org&style=flat&logo=log" alt="Maven" /></a> | <a target="_blank" href="https://search.maven.org/search?q=wu-lazy-cloud-heartbeat-client%20wu-lazy-cloud-heartbeat-client"><img src="https://img.shields.io/maven-central/v/top.wu2020/wu-lazy-cloud-heartbeat-client" alt="Maven" /></a> |
|
||||
| wu-lazy-cloud-heartbeat-server | 组件 | 服务端(支持二次开发) | <a target="_blank" href="https://search.maven.org/search?q=wu-lazy-cloud-heartbeat-server%20wu-lazy-cloud-heartbeat-server"><img src="https://img.shields.io/nexus/s/top.wu2020/wu-lazy-cloud-heartbeat-server?server=https%3A%2F%2Foss.sonatype.org&style=flat&logo=log" alt="Maven" /></a> | <a target="_blank" href="https://search.maven.org/search?q=wu-lazy-cloud-heartbeat-server%20wu-lazy-cloud-heartbeat-server"><img src="https://img.shields.io/maven-central/v/top.wu2020/wu-lazy-cloud-heartbeat-server" alt="Maven" /></a> |
|
||||
| wu-lazy-cloud-ui | ui | 服务端页面 | | |
|
||||
| wu-lazy-cloud-heartbeat-client-start | 客户端 | 客户端 | <a target="_blank" href="https://search.maven.org/search?q=wu-lazy-cloud-heartbeat-client-start%20wu-lazy-cloud-heartbeat-client-start"><img src="https://img.shields.io/nexus/s/top.wu2020/wu-lazy-cloud-heartbeat-client-start?server=https%3A%2F%2Foss.sonatype.org&style=flat&logo=log" alt="Maven" /></a> | <a target="_blank" href="https://search.maven.org/search?q=wu-lazy-cloud-heartbeat-client-start%20wu-lazy-cloud-heartbeat-client-start"><img src="https://img.shields.io/maven-central/v/top.wu2020/wu-lazy-cloud-heartbeat-client-start" alt="Maven" /></a> |
|
||||
| wu-lazy-cloud-heartbeat-server-start | 服务端 | 服务端 | <a target="_blank" href="https://search.maven.org/search?q=wu-lazy-cloud-heartbeat-server-start%20wu-lazy-cloud-heartbeat-server-start"><img src="https://img.shields.io/nexus/s/top.wu2020/wu-lazy-cloud-heartbeat-server-start?server=https%3A%2F%2Foss.sonatype.org&style=flat&logo=log" alt="Maven" /></a> | <a target="_blank" href="https://search.maven.org/search?q=wu-lazy-cloud-heartbeat-server-start%20wu-lazy-cloud-heartbeat-server-start"><img src="https://img.shields.io/maven-central/v/top.wu2020/wu-lazy-cloud-heartbeat-server-start" alt="Maven" /></a> |
|
||||
|
||||
#### 项目地址
|
||||
|
||||
[Gitee](https://gitee.com/wujiawei1207537021/wu-lazy-cloud-network)
|
||||
@@ -69,6 +57,191 @@ ORM操作数据库,使用环境JDK17 Spring Boot 3.0.2。的网络穿透、渗
|
||||
|
||||

|
||||
|
||||
#### 实现原理
|
||||
|
||||
##### 服务端创建socket服务端绑定本地端口(用于客户端连接)
|
||||
|
||||
```java
|
||||
package org.framework.lazy.cloud.network.heartbeat.server.netty.socket;
|
||||
|
||||
|
||||
import io.netty.bootstrap.ServerBootstrap;
|
||||
import io.netty.channel.ChannelFuture;
|
||||
import io.netty.channel.ChannelFutureListener;
|
||||
import io.netty.channel.ChannelOption;
|
||||
import io.netty.channel.EventLoopGroup;
|
||||
import io.netty.channel.nio.NioEventLoopGroup;
|
||||
import io.netty.channel.socket.nio.NioServerSocketChannel;
|
||||
import filter.netty.org.framework.lazy.cloud.network.heartbeat.server.NettyServerFilter;
|
||||
|
||||
public class NettyOnCloudNettyServerSocket {
|
||||
private final EventLoopGroup bossGroup = new NioEventLoopGroup();
|
||||
private final EventLoopGroup workerGroup = new NioEventLoopGroup();
|
||||
private final NettyServerFilter nettyServerFilter;// 通道业务处理
|
||||
private ChannelFuture channelFuture;
|
||||
|
||||
public NettyOnCloudNettyServerSocket(NettyServerFilter nettyServerFilter) {
|
||||
this.nettyServerFilter = nettyServerFilter;
|
||||
}
|
||||
|
||||
/**
|
||||
* 启动服务端
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public void startServer(int serverPort) throws Exception {
|
||||
try {
|
||||
|
||||
ServerBootstrap b = new ServerBootstrap();
|
||||
b.group(bossGroup, workerGroup).channel(NioServerSocketChannel.class)
|
||||
// 给服务端channel设置属性
|
||||
.option(ChannelOption.SO_BACKLOG, 128)
|
||||
|
||||
.childOption(ChannelOption.SO_KEEPALIVE, true)
|
||||
.childHandler(nettyServerFilter)
|
||||
;
|
||||
channelFuture = b.bind(serverPort).sync();
|
||||
|
||||
channelFuture.addListener((ChannelFutureListener) channelFuture -> {
|
||||
// 服务器已启动
|
||||
});
|
||||
channelFuture.channel().closeFuture().sync();
|
||||
} finally {
|
||||
shutdown();
|
||||
// 服务器已关闭
|
||||
}
|
||||
}
|
||||
|
||||
public void shutdown() {
|
||||
if (channelFuture != null) {
|
||||
channelFuture.channel().close().syncUninterruptibly();
|
||||
}
|
||||
if ((bossGroup != null) && (!bossGroup.isShutdown())) {
|
||||
bossGroup.shutdownGracefully();
|
||||
}
|
||||
if ((workerGroup != null) && (!workerGroup.isShutdown())) {
|
||||
workerGroup.shutdownGracefully();
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
##### 客户端通过class NettyClientSocket 连接服务端
|
||||
|
||||
```java
|
||||
package org.framework.lazy.cloud.network.heartbeat.client.netty.socket;
|
||||
|
||||
|
||||
import io.netty.bootstrap.Bootstrap;
|
||||
import io.netty.channel.Channel;
|
||||
import io.netty.channel.ChannelFuture;
|
||||
import io.netty.channel.ChannelFutureListener;
|
||||
import io.netty.channel.EventLoopGroup;
|
||||
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.application.ClientChangeEvent;
|
||||
import filter.netty.org.framework.lazy.cloud.heartbeat.client.NettyClientFilter;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.MessageType;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
|
||||
import adapter.org.framework.lazy.cloud.network.heartbeat.common.ChannelTypeAdapter;
|
||||
import advanced.org.framework.lazy.cloud.network.heartbeat.common.HandleChannelTypeAdvanced;
|
||||
import utils.org.framework.lazy.cloud.network.heartbeat.common.ChannelAttributeKeyUtils;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* 客户端连接服务端
|
||||
*/
|
||||
@Slf4j
|
||||
public class NettyClientSocket {
|
||||
private static final EventLoopGroup eventLoopGroup = new NioEventLoopGroup();
|
||||
/**
|
||||
* 服务端host
|
||||
*/
|
||||
private final String inetHost;
|
||||
/**
|
||||
* 服务端端口
|
||||
*/
|
||||
private final int inetPort;
|
||||
/**
|
||||
* 当前客户端id
|
||||
*/
|
||||
@Getter
|
||||
private final String clientId;
|
||||
/**
|
||||
* nacos配置信息处理应用
|
||||
*/
|
||||
@Getter
|
||||
private final ClientNettyConfigApplication clientChangeEvent;
|
||||
private final List<HandleChannelTypeAdvanced> handleChannelTypeAdvancedList; // 处理服务端发送过来的数据类型
|
||||
|
||||
public NettyClientSocket(String inetHost, int inetPort, String clientId, ClientNettyConfigApplication clientChangeEvent, List<HandleChannelTypeAdvanced> handleChannelTypeAdvancedList) {
|
||||
this.inetHost = inetHost;
|
||||
this.inetPort = inetPort;
|
||||
this.clientId = clientId;
|
||||
this.clientChangeEvent = clientChangeEvent;
|
||||
this.handleChannelTypeAdvancedList = handleChannelTypeAdvancedList;
|
||||
}
|
||||
|
||||
public void newConnect2Server() throws InterruptedException {
|
||||
newConnect2Server(inetHost, inetPort, clientId, clientChangeEvent);
|
||||
}
|
||||
|
||||
protected void newConnect2Server(String inetHost, int inetPort, String clientId, ClientNettyConfigApplication clientChangeEvent) throws InterruptedException {
|
||||
Bootstrap bootstrap = new Bootstrap();
|
||||
bootstrap.group(eventLoopGroup)
|
||||
.channel(NioSocketChannel.class)
|
||||
.handler(new NettyClientFilter(new ChannelTypeAdapter(handleChannelTypeAdvancedList), this))
|
||||
;
|
||||
|
||||
log.info("连接服务端IP:{},连接服务端端口:{}", inetHost, inetPort);
|
||||
ChannelFuture future = bootstrap.connect(inetHost, inetPort);
|
||||
Channel channel = future.channel();
|
||||
|
||||
log.info("使用的客户端ID:" + clientId);
|
||||
future.addListener((ChannelFutureListener) futureListener -> {
|
||||
if (futureListener.isSuccess()) {
|
||||
|
||||
log.info("连接服务端成功");
|
||||
// 告诉服务端这条连接是client的连接
|
||||
NettyProxyMsg nettyMsg = new NettyProxyMsg();
|
||||
nettyMsg.setType(MessageType.TCP_REPORT_CLIENT_CONNECT_SUCCESS);
|
||||
nettyMsg.setClientId(clientId);
|
||||
nettyMsg.setData((clientId).getBytes());
|
||||
ChannelAttributeKeyUtils.buildClientId(channel, clientId);
|
||||
channel.writeAndFlush(nettyMsg);
|
||||
// 在线
|
||||
clientChangeEvent.clientOnLine(clientId);
|
||||
} else {
|
||||
log.info("每隔2s重连....");
|
||||
// 离线
|
||||
clientChangeEvent.clientOffLine(clientId);
|
||||
futureListener.channel().eventLoop().schedule(() -> {
|
||||
try {
|
||||
newConnect2Server(inetHost, inetPort, clientId, clientChangeEvent);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}, 2, TimeUnit.SECONDS);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 关闭连接
|
||||
*/
|
||||
|
||||
public void shutdown() {
|
||||
if ((eventLoopGroup != null) && (!eventLoopGroup.isShutdown())) {
|
||||
eventLoopGroup.shutdownGracefully();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
##### 通过客户端与服务端建立的连接进行访客端口绑定
|
||||
|
||||
@@ -82,27 +255,26 @@ ORM操作数据库,使用环境JDK17 Spring Boot 3.0.2。的网络穿透、渗
|
||||
1.内网穿透
|
||||
2.服务端自主下发数据到客户端
|
||||
3.流量监控
|
||||
4.网络代理(socks、http)
|
||||
|
||||
### 项目结构
|
||||
|
||||
| 模块 | 版本 | 描述 |
|
||||
|------------------------------------------------------------------------------------------------------------|----------------------|------------------------------|
|
||||
| [wu-lazy-cloud-heartbeat-common](wu-lazy-cloud-heartbeat-common) | 1.3.1-JDK17-SNAPSHOT | 内网穿透公共模块(声明接口、枚举、常量、适配器、解析器) |
|
||||
| [wu-lazy-cloud-heartbeat-client](wu-lazy-cloud-heartbeat-client) | 1.3.1-JDK17-SNAPSHOT | 客户端(支持二次开发) |
|
||||
| [wu-lazy-cloud-heartbeat-server](wu-lazy-cloud-heartbeat-server) | 1.3.1-JDK17-SNAPSHOT | 服务端(支持二次开发) |
|
||||
| [wu-lazy-cloud-heartbeat-client-start](wu-lazy-cloud-heartbeat-start/wu-lazy-cloud-heartbeat-server-start) | 1.3.1-JDK17-SNAPSHOT | 客户端样例 |
|
||||
| [wu-lazy-cloud-heartbeat-server-start](wu-lazy-cloud-heartbeat-start/wu-lazy-cloud-heartbeat-client-start) | 1.3.1-JDK17-SNAPSHOT | 服务端样例 |
|
||||
| [wu-lazy-cloud-heartbeat-common](wu-lazy-cloud-heartbeat-common) | 1.3.0-JDK17-SNAPSHOT | 内网穿透公共模块(声明接口、枚举、常量、适配器、解析器) |
|
||||
| [wu-lazy-cloud-heartbeat-client](wu-lazy-cloud-heartbeat-client) | 1.3.0-JDK17-SNAPSHOT | 客户端(支持二次开发) |
|
||||
| [wu-lazy-cloud-heartbeat-server](wu-lazy-cloud-heartbeat-server) | 1.3.0-JDK17-SNAPSHOT | 服务端(支持二次开发) |
|
||||
| [wu-lazy-cloud-heartbeat-client-start](wu-lazy-cloud-heartbeat-start/wu-lazy-cloud-heartbeat-server-start) | 1.3.0-JDK17-SNAPSHOT | 客户端样例 |
|
||||
| [wu-lazy-cloud-heartbeat-server-start](wu-lazy-cloud-heartbeat-start/wu-lazy-cloud-heartbeat-client-start) | 1.3.0-JDK17-SNAPSHOT | 服务端样例 |
|
||||
|
||||
### 使用技术
|
||||
|
||||
| 框架 | 版本 | 描述 |
|
||||
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------|--------------|
|
||||
| spring-boot | 3.0.7 | springboot框架 |
|
||||
| [wu-framework-web](https://gitee.com/wujiawei1207537021/wu-framework-parent/tree/master/wu-framework-web) | 1.3.1-JDK17-SNAPSHOT | web容器 |
|
||||
| [Lazy -ORM](https://gitee.com/wujiawei1207537021/wu-framework-parent/tree/master/wu-inner-intergration/wu-database-parent) | 1.3.1-JDK17-SNAPSHOT | ORM |
|
||||
| [wu-framework-web](https://gitee.com/wujiawei1207537021/wu-framework-parent/tree/master/wu-framework-web) | 1.3.0-JDK17-SNAPSHOT | web容器 |
|
||||
| [Lazy -ORM](https://gitee.com/wujiawei1207537021/wu-framework-parent/tree/master/wu-inner-intergration/wu-database-parent) | 1.3.0-JDK17-SNAPSHOT | ORM |
|
||||
| mysql-connector-j | 8.0.33 | mysql驱动 |
|
||||
| [wu-authorization-server-platform-starter](https://gitee.com/wujiawei1207537021/wu-framework-parent/tree/master/wu-smart-platform/wu-authorization-server-platform-starter) | 1.3.1-JDK17-SNAPSHOT | 用户授权体系 |
|
||||
| [wu-authorization-server-platform-starter](https://gitee.com/wujiawei1207537021/wu-framework-parent/tree/master/wu-smart-platform/wu-authorization-server-platform-starter) | 1.3.0-JDK17-SNAPSHOT | 用户授权体系 |
|
||||
|
||||
### 使用环境
|
||||
|
||||
@@ -111,16 +283,15 @@ ORM操作数据库,使用环境JDK17 Spring Boot 3.0.2。的网络穿透、渗
|
||||
JAVA >=13
|
||||
MAVEN
|
||||
|
||||
### 启动[install.md](install.md)
|
||||
### 启动
|
||||
|
||||
docker启动
|
||||
|
||||
docker run -d -it -p 18080:18080 --name wu-lazy-cloud-heartbeat-server registry.cn-hangzhou.aliyuncs.com/wu-lazy/wu-lazy-cloud-heartbeat-server:1.3.1-JDK17-SNAPSHOT
|
||||
docker run -d -it -p 18080:18080 --name wu-lazy-cloud-heartbeat-server registry.cn-hangzhou.aliyuncs.com/wu-lazy/wu-lazy-cloud-heartbeat-server:1.3.0-JDK17-SNAPSHOT
|
||||
|
||||
http://127.0.0.1:18080/swagger-ui/index.html
|
||||
|
||||
源码启动
|
||||
### 代理工具使用[Proxy.md](Proxy.md)
|
||||
|
||||
#### 页面操作
|
||||
|
||||
@@ -170,17 +341,4 @@ ORM操作数据库,使用环境JDK17 Spring Boot 3.0.2。的网络穿透、渗
|
||||

|
||||
|
||||
客户端近七天使用流量
|
||||

|
||||
|
||||
## 路由
|
||||
- 客户端路由管理
|
||||

|
||||
- 客户端虚拟路由管理
|
||||
- 创建一个虚拟的不存在的IP,代理到指定的IP
|
||||

|
||||
|
||||
- 服务端路由管理
|
||||

|
||||
- 服务端虚拟路由管理
|
||||
- 创建一个虚拟的不存在的IP,代理到指定的IP
|
||||

|
||||

|
||||
@@ -28,7 +28,7 @@ spec:
|
||||
containers:
|
||||
- name: wu-lazy-cloud-heartbeat-local-client-start
|
||||
image: >-
|
||||
registry.cn-hangzhou.aliyuncs.com/wu-lazy/wu-lazy-cloud-heartbeat-client-start:1.3.1-JDK17-SNAPSHOT
|
||||
registry.cn-hangzhou.aliyuncs.com/wu-lazy/wu-lazy-cloud-heartbeat-client-start:1.3.0-JDK17-SNAPSHOT
|
||||
env:
|
||||
- name: spring.lazy.netty.client.inet-host
|
||||
value: 124.222.48.62
|
||||
|
||||
BIN
client_route.png
|
Before Width: | Height: | Size: 108 KiB |
|
Before Width: | Height: | Size: 115 KiB |
28
install.md
@@ -1,28 +0,0 @@
|
||||
#### docker环境安装wlcn
|
||||
##### 启动服务端
|
||||
- 6001端口 webui
|
||||
- 7001端口 tcp连接端口
|
||||
- 8001端口 http代理端口
|
||||
- 9001端口 socks代理端口
|
||||
- 1001端口 自定义需要代理到客户端端口
|
||||
- 打开浏览器访问界面 http://127.0.0.1:6001/netty-server-ui/index.html
|
||||
|
||||
```shell
|
||||
|
||||
docker run -d -it -p 6001:6001 -p 7001:7001 -p 8001:8001 -p 9001:9001 --name wlcn-s registry.cn-hangzhou.aliyuncs.com/wu-lazy/wu-lazy-cloud-heartbeat-server:1.3.1-JDK17-SNAPSHOT
|
||||
|
||||
```
|
||||
##### 启动客户端
|
||||
|
||||
- 6004端口 webui
|
||||
- 8001端口 http代理端口
|
||||
- 9001端口 socks代理端口
|
||||
- 环境变量
|
||||
- spring.lazy.netty.client.inet-host 服务端IP
|
||||
- spring.lazy.netty.client.inet-port 服务端tcp端口
|
||||
- spring.lazy.netty.client.client-id 客户端ID
|
||||
- 打开浏览器访问界面 http://127.0.0.1:6004/netty-client-local-ui/index.html
|
||||
|
||||
```shell
|
||||
docker run -d -it --privileged -p 6004:6004 --name wlcn-c --restart=always -e spring.lazy.netty.client.inet-host=192.168.xx.xx -e spring.lazy.netty.client.inet-port=7001 -e spring.lazy.netty.client.client-id="wlcn-c" registry.cn-hangzhou.aliyuncs.com/wu-lazy/wu-lazy-cloud-heartbeat-client-start:1.3.1-JDK17-SNAPSHOT
|
||||
```
|
||||
|
Before Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 46 KiB |
10
pom.xml
@@ -8,12 +8,12 @@
|
||||
<parent>
|
||||
<artifactId>wu-framework-parent</artifactId>
|
||||
<groupId>top.wu2020</groupId>
|
||||
<version>1.3.1-JDK17-SNAPSHOT</version>
|
||||
<version>1.3.0-JDK17</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>wu-lazy-cloud-network</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<version>1.3.1-JDK17-SNAPSHOT</version>
|
||||
<version>1.3.0-JDK17</version>
|
||||
<description>云上云下</description>
|
||||
|
||||
|
||||
@@ -48,12 +48,12 @@
|
||||
<dependency>
|
||||
<groupId>org.mapstruct</groupId>
|
||||
<artifactId>mapstruct</artifactId>
|
||||
<version>1.6.3</version>
|
||||
<version>1.6.0.Beta1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mapstruct</groupId>
|
||||
<artifactId>mapstruct-processor</artifactId>
|
||||
<version>1.6.3</version>
|
||||
<version>1.6.0.Beta1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
@@ -72,7 +72,7 @@
|
||||
<dependency>
|
||||
<groupId>top.wu2020</groupId>
|
||||
<artifactId>wu-framework-dependencies</artifactId>
|
||||
<version>1.3.1-JDK17-SNAPSHOT</version>
|
||||
<version>1.3.0-JDK17</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
|
||||
|
Before Width: | Height: | Size: 71 KiB |
BIN
server_route.png
|
Before Width: | Height: | Size: 122 KiB |
|
Before Width: | Height: | Size: 119 KiB |
10
version.md
@@ -24,16 +24,10 @@
|
||||
[change] 新增服务端渗透服务端----本地同局域网内端口映射
|
||||
[change] 新增客户端渗透服务端----本地端口映射到另一个服务端中的局域网端口
|
||||
[change] 新增客户端渗透客户端----本地端口映射到另一个局域网端口
|
||||
#### 1.2.9-JDK17-SNAPSHOT
|
||||
#### 1.3.0-JDK17-SNAPSHOT
|
||||
[change] 添加appkey&appsecret 验证
|
||||
[change] 支持同一个客户端ID多次注册
|
||||
[change] 修复通道关闭导致调度线程池submit异常问题
|
||||
[change] 添加记录客户端IP
|
||||
[change] 1.2.9为大版本,报文中添加数据无法向下兼容,建议服务端与客户端保持版本一致
|
||||
#### 1.3.1-JDK17-SNAPSHOT
|
||||
[add] 新增http代理(客户端代理服务端、客户端代理客户杜安、服务端代理客户端、服务端代理服务端)
|
||||
[add] 新增socks代理(客户端代理服务端、客户端代理客户杜安、服务端代理客户端、服务端代理服务端)
|
||||
[add] 新增客户端路由管理、新增服务端路由管理
|
||||
[add] 支持新增虚拟IP,代理到指定的IP
|
||||
[add] 通过页面配置,代理支持控制端口代理控制
|
||||
#### 下一版本计划
|
||||
#### 下一版本计划https
|
||||
|
Before Width: | Height: | Size: 309 KiB |
|
Before Width: | Height: | Size: 76 KiB |
@@ -1,84 +0,0 @@
|
||||
|
||||
|
||||
@startuml
|
||||
|
||||
title 网络代理
|
||||
|
||||
|
||||
|
||||
package "服务端" as "服务端"{
|
||||
node "12.16.5.xx"{
|
||||
[12.16.5.1]
|
||||
[wlcn_s_a] as "wlcn服务端"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
package "杭州客户端"{
|
||||
node "172.16.5.xx"{
|
||||
[172.16.5.1]
|
||||
[wlcn_c_a] as "wlcn客户端9001"
|
||||
|
||||
|
||||
actor Navicat_c_a as "本地Navicat"
|
||||
actor App_c_a as "本地App"
|
||||
actor Chrome_c_a as "本地浏览器"
|
||||
[socks_proxy_a] as "杭州本地用户socks代理软件"
|
||||
|
||||
[socks_proxy_a]<--up--> [wlcn_c_a]:访客通过软件代理本地socks网络
|
||||
|
||||
[Navicat_c_a]<..up..> [socks_proxy_a]:访问服务端所在网段(12.16.5.xx)
|
||||
[App_c_a]<..up..> [socks_proxy_a]:访问访问本地所在网段(172.16.5.xx)
|
||||
[Chrome_c_a]<..up..> [socks_proxy_a]:访问访问另一个客户端所在网段(162.16.5.xx)
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
package "上海客户端" as "上海客户端"{
|
||||
|
||||
node "162.16.5.xx"{
|
||||
[162.16.5.1]
|
||||
[wlcn_c_b] as "wlcn客户端9001"
|
||||
|
||||
actor Navicat_c_b as "本地Navicat"
|
||||
actor App_c_b as "本地App"
|
||||
actor Chrome_c_b as "本地浏览器"
|
||||
[socks_proxy_b] as "上海本地用户socks代理软件"
|
||||
|
||||
[socks_proxy_b]<--up--> [wlcn_c_b]:访客通过软件代理本地socks网络
|
||||
|
||||
[Navicat_c_b]<..up..> [socks_proxy_b]:访问服务端所在网段(12.16.5.xx)
|
||||
[App_c_b]<..up..> [socks_proxy_b]:访问访问本地所在网段(172.16.5.xx)
|
||||
[Chrome_c_b]<..up..> [socks_proxy_b]:访问访问另一个客户端所在网段(162.16.5.xx)
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
package "第三方局域网"{
|
||||
|
||||
node "152.16.5.xx"{
|
||||
[152.16.5.1]
|
||||
|
||||
actor Navicat_c_c as "本地Navicat"
|
||||
actor App_c_c as "本地App"
|
||||
actor Chrome_c_c as "本地浏览器"
|
||||
[socks_proxy_c] as "上海本地用户socks代理软件"
|
||||
|
||||
|
||||
[Navicat_c_c]<..up..> [socks_proxy_c]:访问服务端所在网段(12.16.5.xx)
|
||||
[App_c_c]<..up..> [socks_proxy_c]:访问访问上海在网段(172.16.5.xx)
|
||||
[Chrome_c_c]<..up..> [socks_proxy_c]:访问访问杭州客户端所在网段(162.16.5.xx)
|
||||
}
|
||||
}
|
||||
|
||||
[wlcn_s_a] <==down==> [wlcn_c_a]: 客户端连接服务端
|
||||
[wlcn_s_a] <==down==> [wlcn_c_b]: 客户端连接服务端
|
||||
[wlcn_s_a]<--down--> [socks_proxy_c]:访客通过软件代理本地socks网络
|
||||
|
||||
|
||||
@enduml
|
||||
@@ -10,8 +10,8 @@ mvn native:build -Pnative
|
||||
### 构建docker镜像
|
||||
|
||||
```shell
|
||||
docker build -t docker-registry.wujiawei.com/lazy/lazy-under-cloud-heartbeat-client:lazy-2.4.2-NATIVE-SNAPSHOT_latest -f Native-Dockerfile .
|
||||
docker push docker-registry.wujiawei.com/lazy/lazy-under-cloud-heartbeat-client:lazy-2.4.2-NATIVE-SNAPSHOT_latest
|
||||
docker build -t docker-registry.wujiawei.com/lazy/lazy-under-cloud-heartbeat-client:lazy-2.4.2-native-SNAPSHOT_latest -f Native-Dockerfile .
|
||||
docker push docker-registry.wujiawei.com/lazy/lazy-under-cloud-heartbeat-client:lazy-2.4.2-native-SNAPSHOT_latest
|
||||
```
|
||||
|
||||
## BUILD IMAGE
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>top.wu2020</groupId>
|
||||
<artifactId>wu-lazy-cloud-network</artifactId>
|
||||
<version>1.3.1-JDK17-SNAPSHOT</version>
|
||||
<version>1.3.0-JDK17</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
@@ -26,13 +26,17 @@
|
||||
<dependency>
|
||||
<groupId>top.wu2020</groupId>
|
||||
<artifactId>wu-lazy-cloud-heartbeat-protocol-proxy</artifactId>
|
||||
<version>1.3.1-JDK17-SNAPSHOT</version>
|
||||
<version>1.3.0-JDK17</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>2.0.50</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>top.wu2020</groupId>
|
||||
<artifactId>wu-framework-web-spring-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- h2数据库驱动 -->
|
||||
<dependency>
|
||||
@@ -41,11 +45,7 @@
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>top.wu2020</groupId>
|
||||
<artifactId>wu-framework-web-spring-starter</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>top.wu2020</groupId>
|
||||
<artifactId>wu-database-lazy-orm-plus-starter</artifactId>
|
||||
<artifactId>wu-database-lazy-plus-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -18,8 +18,8 @@ import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelT
|
||||
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;
|
||||
import org.wu.framework.lazy.orm.web.plus.stereotype.LazyApplication;
|
||||
import org.wu.framework.web.response.Result;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -6,7 +6,6 @@ import org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.event.Cl
|
||||
import org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.tcp.advanced.*;
|
||||
import org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.udp.advanced.*;
|
||||
import org.framework.lazy.cloud.network.heartbeat.client.netty.proxy.http.advanced.*;
|
||||
import org.framework.lazy.cloud.network.heartbeat.client.netty.proxy.socks.advanced.*;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
@@ -352,20 +351,12 @@ public class ClientAutoConfiguration {
|
||||
public ClientHandleDistributeHttpClientProxyServerServerRouteTypeAdvanced clientHandleDistributeHttpClientProxyServerServerRouteTypeAdvanced() {
|
||||
return new ClientHandleDistributeHttpClientProxyServerServerRouteTypeAdvanced();
|
||||
}
|
||||
@Bean
|
||||
public ClientHandleDistributeHttpClientProxyServerServerRouteCloseTypeAdvanced clientHandleDistributeHttpClientProxyServerServerRouteCloseTypeAdvanced(){
|
||||
return new ClientHandleDistributeHttpClientProxyServerServerRouteCloseTypeAdvanced();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public ClientHandleDistributeHttpClientProxyServerClientRouteTypeAdvanced clientHandleDistributeHttpClientProxyServerClientRouteTypeAdvanced() {
|
||||
return new ClientHandleDistributeHttpClientProxyServerClientRouteTypeAdvanced();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public ClientHandleDistributeHttpClientProxyServerClientRouteCloseTypeAdvanced clientHandleDistributeHttpClientProxyServerClientRouteCloseTypeAdvanced(){
|
||||
return new ClientHandleDistributeHttpClientProxyServerClientRouteCloseTypeAdvanced();
|
||||
}
|
||||
@Bean
|
||||
public ClientHandleDistributeHttpClientProxyClientConnectionTransferSuccessfulAdvanced clientHandleDistributeHttpClientProxyClientConnectionTransferSuccessfulAdvanced() {
|
||||
return new ClientHandleDistributeHttpClientProxyClientConnectionTransferSuccessfulAdvanced();
|
||||
@@ -392,68 +383,4 @@ public class ClientAutoConfiguration {
|
||||
return new ClientHandleDistributeHttpServerProxyClientTransferRequestAdvanced();
|
||||
}
|
||||
}
|
||||
|
||||
@Configuration
|
||||
static class SocksProxyConfiguration {
|
||||
@Bean
|
||||
public ClientHandleNettySocketProtocolHandleSocketClientProxyServerStartTypeAdvanced nettySocketProtocolHandleSocketClientProxyServerTypeAdvanced() {
|
||||
return new ClientHandleNettySocketProtocolHandleSocketClientProxyServerStartTypeAdvanced();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public ClientHandleDistributeSocksClientProxyServerConnectionTransferSuccessfulAdvanced clientHandleDistributeSocksClientProxyServerConnectionTransferSuccessfulAdvanced() {
|
||||
return new ClientHandleDistributeSocksClientProxyServerConnectionTransferSuccessfulAdvanced();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public ClientHandleDistributeSocksClientProxyServerConnectionTransferFailAdvanced clientHandleDistributeSocksClientProxyServerConnectionTransferFailAdvanced() {
|
||||
return new ClientHandleDistributeSocksClientProxyServerConnectionTransferFailAdvanced();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public ClientHandleDistributeSocksClientProxyServerTransferTransferResponseAdvanced clientHandleDistributeSocksClientProxyServerTransferTransferResponseAdvanced() {
|
||||
return new ClientHandleDistributeSocksClientProxyServerTransferTransferResponseAdvanced();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public ClientHandleDistributeSocksClientProxyServerTransferCloseAdvanced clientHandleDistributeSocksClientProxyServerTransferCloseAdvanced() {
|
||||
return new ClientHandleDistributeSocksClientProxyServerTransferCloseAdvanced();
|
||||
}
|
||||
@Bean
|
||||
public ClientHandleDistributeSocksClientProxyClientConnectionTransferFailAdvanced clientHandleDistributeSocksClientProxyClientConnectionTransferFailAdvanced(){
|
||||
return new ClientHandleDistributeSocksClientProxyClientConnectionTransferFailAdvanced();
|
||||
}
|
||||
@Bean
|
||||
public ClientHandleDistributeSocksClientProxyClientConnectionTransferSuccessfulAdvanced clientHandleDistributeSocksClientProxyClientConnectionTransferSuccessfulAdvanced(){
|
||||
return new ClientHandleDistributeSocksClientProxyClientConnectionTransferSuccessfulAdvanced();
|
||||
}
|
||||
@Bean
|
||||
public ClientHandleDistributeSocksClientProxyClientTransferCloseAdvanced clientHandleDistributeSocksClientProxyClientTransferCloseAdvanced(){
|
||||
return new ClientHandleDistributeSocksClientProxyClientTransferCloseAdvanced();
|
||||
}
|
||||
@Bean
|
||||
public ClientHandleDistributeSocksClientProxyClientTransferTransferResponseAdvanced clientHandleDistributeSocksClientProxyClientTransferTransferResponseAdvanced(){
|
||||
return new ClientHandleDistributeSocksClientProxyClientTransferTransferResponseAdvanced();
|
||||
}
|
||||
@Bean
|
||||
public ClientHandleDistributeSocksClientProxyClientOtherConnectionTransferAdvanced clientHandleDistributeSocksClientProxyClientOtherConnectionTransferAdvanced1(){
|
||||
return new ClientHandleDistributeSocksClientProxyClientOtherConnectionTransferAdvanced();
|
||||
}
|
||||
@Bean
|
||||
public ClientHandleDistributeSocksClientProxyClientTransferTransferRequestAdvanced clientHandleDistributeSocksClientProxyClientTransferTransferRequestAdvanced(){
|
||||
return new ClientHandleDistributeSocksClientProxyClientTransferTransferRequestAdvanced();
|
||||
}
|
||||
@Bean
|
||||
public ClientHandleSocksDistributeServerProxyClientConnectionInitTypeAdvanced clientHandleSocksDistributeServerProxyClientConnectionInitTypeAdvanced(){
|
||||
return new ClientHandleSocksDistributeServerProxyClientConnectionInitTypeAdvanced();
|
||||
}
|
||||
@Bean
|
||||
public ClientHandleSocksDistributeServerProxyClientRequestTypeAdvanced clientHandleSocksDistributeServerProxyClientRequestTypeAdvanced(){
|
||||
return new ClientHandleSocksDistributeServerProxyClientRequestTypeAdvanced();
|
||||
}
|
||||
@Bean
|
||||
public ClientHandleSocksDistributeServerProxyClientTransferCloseAdvanced clientHandleSocksDistributeServerProxyClientTransferCloseAdvanced(){
|
||||
return new ClientHandleSocksDistributeServerProxyClientTransferCloseAdvanced();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,32 +1,29 @@
|
||||
package org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.tcp.advanced;
|
||||
|
||||
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyChannelContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.permeate.tcp.AbstractTcpHandleChannelHeartbeatTypeAdvanced;
|
||||
import io.netty.channel.Channel;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.constant.TcpMessageType;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.context.annotation.Role;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.permeate.tcp.AbstractTcpHandleChannelHeartbeatTypeAdvanced;
|
||||
|
||||
|
||||
/**
|
||||
* 服务端 处理客户端心跳
|
||||
* TCP_TYPE_HEARTBEAT
|
||||
*/
|
||||
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
||||
public class ClientHandleTcpChannelHeartbeatTypeAdvanced extends AbstractTcpHandleChannelHeartbeatTypeAdvanced<NettyProxyMsg> {
|
||||
|
||||
/**
|
||||
* 处理当前数据
|
||||
*
|
||||
* @param nettyChannelContext 当前通道
|
||||
* @param channel 当前通道
|
||||
* @param msg 通道数据
|
||||
*/
|
||||
@Override
|
||||
public void doHandler(NettyChannelContext nettyChannelContext, NettyProxyMsg msg) {
|
||||
public void doHandler(Channel channel, NettyProxyMsg msg) {
|
||||
NettyProxyMsg hb = new NettyProxyMsg();
|
||||
hb.setType(TcpMessageType.TCP_TYPE_HEARTBEAT);
|
||||
// nettyChannelContext.writeAndFlush(hb);
|
||||
// channel.writeAndFlush(hb);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -5,13 +5,10 @@ import io.netty.buffer.ByteBuf;
|
||||
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.common.advanced.payload.NettyChannelContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.permeate.tcp.client.AbstractHandleTcpDistributeServicePermeateClientTransferTypeAdvanced;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.context.annotation.Role;
|
||||
|
||||
|
||||
/**
|
||||
@@ -19,7 +16,6 @@ import org.springframework.context.annotation.Role;
|
||||
*
|
||||
* @see TcpMessageTypeEnums#TCP_DISTRIBUTE_CLIENT_TRANSFER
|
||||
*/
|
||||
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
||||
@Slf4j
|
||||
public class ClientHandleTcpChannelTransferTypeAdvancedHandleDistributeTcpDistribute extends AbstractHandleTcpDistributeServicePermeateClientTransferTypeAdvanced<NettyProxyMsg> {
|
||||
|
||||
@@ -32,12 +28,11 @@ public class ClientHandleTcpChannelTransferTypeAdvancedHandleDistributeTcpDistri
|
||||
/**
|
||||
* 处理当前数据
|
||||
*
|
||||
* @param nettyChannelContext 当前通道
|
||||
* @param channel 当前通道
|
||||
* @param nettyProxyMsg 通道数据
|
||||
*/
|
||||
@Override
|
||||
public void doHandler(NettyChannelContext nettyChannelContext, NettyProxyMsg nettyProxyMsg) {
|
||||
Channel channel = nettyChannelContext.channel();
|
||||
public void doHandler(Channel channel, NettyProxyMsg nettyProxyMsg) {
|
||||
log.debug("接收到服务端需要内网穿透的数据:{}" , nettyProxyMsg);
|
||||
String clientId = nettyClientProperties.getClientId();
|
||||
byte[] visitorPort = nettyProxyMsg.getVisitorPort();
|
||||
|
||||
@@ -3,17 +3,13 @@ package org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.tcp.adv
|
||||
import io.netty.channel.Channel;
|
||||
import org.framework.lazy.cloud.network.heartbeat.client.config.NettyClientProperties;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.ChannelContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyChannelContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.permeate.tcp.client.AbstractHandleTcpClientChannelActiveAdvanced;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.context.annotation.Role;
|
||||
|
||||
/**
|
||||
* 客户端通道 is active
|
||||
*/
|
||||
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
||||
public class ClientHandleTcpClientChannelActiveAdvanced extends AbstractHandleTcpClientChannelActiveAdvanced<NettyProxyMsg> {
|
||||
private final NettyClientProperties nettyClientProperties;
|
||||
|
||||
@@ -24,12 +20,11 @@ public class ClientHandleTcpClientChannelActiveAdvanced extends AbstractHandleTc
|
||||
/**
|
||||
* 处理当前数据
|
||||
*
|
||||
* @param nettyChannelContext 当前通道
|
||||
* @param channel 当前通道
|
||||
* @param nettyProxyMsg 通道数据
|
||||
*/
|
||||
@Override
|
||||
protected void doHandler(NettyChannelContext nettyChannelContext, NettyProxyMsg nettyProxyMsg) {
|
||||
Channel channel = nettyChannelContext.channel();
|
||||
protected void doHandler(Channel channel, NettyProxyMsg nettyProxyMsg) {
|
||||
// 缓存当前通道
|
||||
byte[] clientIdByte = nettyProxyMsg.getClientId();
|
||||
String clientId = new String(clientIdByte);
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
package org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.tcp.advanced;
|
||||
|
||||
|
||||
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.NettyVisitorPortContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyChannelContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.permeate.tcp.client.AbstractHandleTcpDistributeClientPermeateClientCloseTypeAdvanced;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.socket.PermeateVisitorSocket;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.context.annotation.Role;
|
||||
|
||||
|
||||
/**
|
||||
@@ -17,7 +15,6 @@ import org.springframework.context.annotation.Role;
|
||||
*
|
||||
* @see TcpMessageTypeEnums#TCP_DISTRIBUTE_CLIENT_PERMEATE_CLIENT_CLOSE
|
||||
*/
|
||||
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
||||
@Slf4j
|
||||
public class ClientHandleTcpDistributeClientPermeateClientCloseTypeAdvanced extends AbstractHandleTcpDistributeClientPermeateClientCloseTypeAdvanced<NettyProxyMsg> {
|
||||
|
||||
@@ -25,11 +22,11 @@ public class ClientHandleTcpDistributeClientPermeateClientCloseTypeAdvanced exte
|
||||
/**
|
||||
* 处理当前数据
|
||||
*
|
||||
* @param nettyChannelContext 当前通道
|
||||
* @param channel 当前通道
|
||||
* @param nettyProxyMsg 通道数据
|
||||
*/
|
||||
@Override
|
||||
public void doHandler(NettyChannelContext nettyChannelContext, NettyProxyMsg nettyProxyMsg) {
|
||||
public void doHandler(Channel channel, NettyProxyMsg nettyProxyMsg) {
|
||||
// 初始化 客户端渗透服务端socket
|
||||
byte[] msgVisitorPort = nettyProxyMsg.getVisitorPort();
|
||||
Integer visitorPort = Integer.parseInt(new String(msgVisitorPort));
|
||||
|
||||
@@ -1,16 +1,14 @@
|
||||
package org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.tcp.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.permeate.tcp.socket.NettyTcpClientPermeateClientVisitorSocket;
|
||||
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.payload.NettyChannelContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.permeate.tcp.client.AbstractHandleTcpDistributeClientPermeateClientInitTypeAdvanced;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.context.annotation.Role;
|
||||
import org.wu.framework.spring.utils.SpringContextHolder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -22,18 +20,17 @@ import java.util.List;
|
||||
*
|
||||
* @see TcpMessageTypeEnums#TCP_DISTRIBUTE_CLIENT_PERMEATE_CLIENT_INIT
|
||||
*/
|
||||
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
||||
@Slf4j
|
||||
public class ClientHandleTcpDistributeClientPermeateClientInitTypeAdvanced extends AbstractHandleTcpDistributeClientPermeateClientInitTypeAdvanced<NettyProxyMsg> {
|
||||
|
||||
/**
|
||||
* 处理当前数据
|
||||
*
|
||||
* @param nettyChannelContext 当前通道
|
||||
* @param channel 当前通道
|
||||
* @param nettyProxyMsg 通道数据
|
||||
*/
|
||||
@Override
|
||||
public void doHandler(NettyChannelContext nettyChannelContext, NettyProxyMsg nettyProxyMsg) {
|
||||
public void doHandler(Channel channel, NettyProxyMsg nettyProxyMsg) {
|
||||
// 初始化 客户端渗透服务端socket
|
||||
byte[] fromClientIdBytes = nettyProxyMsg.getClientId();
|
||||
byte[] visitorPortBytes = nettyProxyMsg.getVisitorPort();
|
||||
|
||||
@@ -3,13 +3,10 @@ package org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.tcp.adv
|
||||
|
||||
import io.netty.channel.Channel;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyChannelContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.permeate.tcp.client.AbstractHandleTcpDistributeClientPermeateClientTransferCloseTypeAdvanced;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.context.annotation.Role;
|
||||
|
||||
|
||||
/**
|
||||
@@ -17,19 +14,17 @@ import org.springframework.context.annotation.Role;
|
||||
*
|
||||
* @see TcpMessageTypeEnums#TCP_DISTRIBUTE_CLIENT_PERMEATE_CLIENT_TRANSFER_CLOSE
|
||||
*/
|
||||
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
||||
@Slf4j
|
||||
public class ClientHandleTcpDistributeClientPermeateClientTransferCloseTypeAdvanced extends AbstractHandleTcpDistributeClientPermeateClientTransferCloseTypeAdvanced<NettyProxyMsg> {
|
||||
|
||||
/**
|
||||
* 处理当前数据
|
||||
*
|
||||
* @param nettyChannelContext 当前通道
|
||||
* @param channel 当前通道
|
||||
* @param nettyProxyMsg 通道数据
|
||||
*/
|
||||
@Override
|
||||
public void doHandler(NettyChannelContext nettyChannelContext, NettyProxyMsg nettyProxyMsg) {
|
||||
Channel channel = nettyChannelContext.channel();
|
||||
public void doHandler(Channel channel, NettyProxyMsg nettyProxyMsg) {
|
||||
// 关闭客户端真实通道、访客通道
|
||||
Channel realChannel = ChannelAttributeKeyUtils.getNextChannel(channel);
|
||||
realChannel.close();// 真实通道关闭
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
package org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.tcp.advanced;
|
||||
|
||||
|
||||
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.NettyVisitorPortContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyChannelContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.permeate.tcp.client.AbstractHandleTcpDistributeClientPermeateServerCloseTypeAdvanced;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.socket.PermeateVisitorSocket;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.context.annotation.Role;
|
||||
|
||||
|
||||
/**
|
||||
@@ -17,7 +15,6 @@ import org.springframework.context.annotation.Role;
|
||||
*
|
||||
* @see TcpMessageTypeEnums#TCP_DISTRIBUTE_CLIENT_PERMEATE_SERVER_CLOSE
|
||||
*/
|
||||
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
||||
@Slf4j
|
||||
public class ClientHandleTcpDistributeClientPermeateServerCloseTypeAdvanced extends AbstractHandleTcpDistributeClientPermeateServerCloseTypeAdvanced<NettyProxyMsg> {
|
||||
|
||||
@@ -25,11 +22,11 @@ public class ClientHandleTcpDistributeClientPermeateServerCloseTypeAdvanced exte
|
||||
/**
|
||||
* 处理当前数据
|
||||
*
|
||||
* @param nettyChannelContext 当前通道
|
||||
* @param channel 当前通道
|
||||
* @param nettyProxyMsg 通道数据
|
||||
*/
|
||||
@Override
|
||||
public void doHandler(NettyChannelContext nettyChannelContext, NettyProxyMsg nettyProxyMsg) {
|
||||
public void doHandler(Channel channel, NettyProxyMsg nettyProxyMsg) {
|
||||
// 初始化 客户端渗透服务端socket
|
||||
byte[] msgVisitorPort = nettyProxyMsg.getVisitorPort();
|
||||
Integer visitorPort = Integer.parseInt(new String(msgVisitorPort));
|
||||
|
||||
@@ -1,16 +1,14 @@
|
||||
package org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.tcp.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.permeate.tcp.socket.NettyTcpClientPermeateServerVisitorSocket;
|
||||
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.payload.NettyChannelContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.permeate.tcp.client.AbstractHandleTcpDistributeClientPermeateServerInitTypeAdvanced;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.context.annotation.Role;
|
||||
import org.wu.framework.spring.utils.SpringContextHolder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -22,7 +20,6 @@ import java.util.List;
|
||||
*
|
||||
* @see TcpMessageTypeEnums#TCP_DISTRIBUTE_CLIENT_PERMEATE_SERVER_INIT
|
||||
*/
|
||||
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
||||
@Slf4j
|
||||
public class ClientHandleTcpDistributeClientPermeateServerInitTypeAdvanced extends AbstractHandleTcpDistributeClientPermeateServerInitTypeAdvanced<NettyProxyMsg> {
|
||||
|
||||
@@ -35,11 +32,11 @@ public class ClientHandleTcpDistributeClientPermeateServerInitTypeAdvanced exten
|
||||
/**
|
||||
* 处理当前数据
|
||||
*
|
||||
* @param nettyChannelContext 当前通道
|
||||
* @param channel 当前通道
|
||||
* @param nettyProxyMsg 通道数据
|
||||
*/
|
||||
@Override
|
||||
public void doHandler(NettyChannelContext nettyChannelContext, NettyProxyMsg nettyProxyMsg) {
|
||||
public void doHandler(Channel channel, NettyProxyMsg nettyProxyMsg) {
|
||||
// 初始化 客户端渗透服务端socket
|
||||
byte[] clientIdBytes = nettyProxyMsg.getClientId();
|
||||
byte[] visitorPort = nettyProxyMsg.getVisitorPort();
|
||||
|
||||
@@ -3,13 +3,10 @@ package org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.tcp.adv
|
||||
|
||||
import io.netty.channel.Channel;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyChannelContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.permeate.tcp.client.AbstractHandleTcpDistributeClientPermeateServerTransferCloseTypeAdvanced;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.context.annotation.Role;
|
||||
|
||||
|
||||
/**
|
||||
@@ -17,19 +14,17 @@ import org.springframework.context.annotation.Role;
|
||||
*
|
||||
* @see TcpMessageTypeEnums#TCP_DISTRIBUTE_CLIENT_PERMEATE_SERVER_TRANSFER_CLOSE
|
||||
*/
|
||||
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
||||
@Slf4j
|
||||
public class ClientHandleTcpDistributeClientPermeateServerTransferCloseTypeAdvanced extends AbstractHandleTcpDistributeClientPermeateServerTransferCloseTypeAdvanced<NettyProxyMsg> {
|
||||
|
||||
/**
|
||||
* 处理当前数据
|
||||
*
|
||||
* @param nettyChannelContext 当前通道
|
||||
* @param channel 当前通道
|
||||
* @param nettyProxyMsg 通道数据
|
||||
*/
|
||||
@Override
|
||||
public void doHandler(NettyChannelContext nettyChannelContext, NettyProxyMsg nettyProxyMsg) {
|
||||
Channel channel = nettyChannelContext.channel();
|
||||
public void doHandler(Channel channel, NettyProxyMsg nettyProxyMsg) {
|
||||
// 关闭本地通信通道
|
||||
Channel nextChannel = ChannelAttributeKeyUtils.getNextChannel(channel);
|
||||
channel.close();
|
||||
|
||||
@@ -4,13 +4,10 @@ package org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.tcp.adv
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.channel.Channel;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyChannelContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.permeate.tcp.client.AbstractHandleTcpDistributeClientPermeateServerTransferTypeAdvanced;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.context.annotation.Role;
|
||||
|
||||
|
||||
/**
|
||||
@@ -18,7 +15,6 @@ import org.springframework.context.annotation.Role;
|
||||
*
|
||||
* @see TcpMessageTypeEnums#TCP_DISTRIBUTE_CLIENT_TRANSFER
|
||||
*/
|
||||
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
||||
@Slf4j
|
||||
public class ClientHandleTcpDistributeClientPermeateServerTransferTypeAdvanced extends AbstractHandleTcpDistributeClientPermeateServerTransferTypeAdvanced<NettyProxyMsg> {
|
||||
|
||||
@@ -26,12 +22,11 @@ public class ClientHandleTcpDistributeClientPermeateServerTransferTypeAdvanced e
|
||||
/**
|
||||
* 处理当前数据
|
||||
*
|
||||
* @param nettyChannelContext 当前通道
|
||||
* @param channel 当前通道
|
||||
* @param nettyProxyMsg 通道数据
|
||||
*/
|
||||
@Override
|
||||
public void doHandler(NettyChannelContext nettyChannelContext, NettyProxyMsg nettyProxyMsg) {
|
||||
Channel channel = nettyChannelContext.channel();
|
||||
public void doHandler(Channel channel, NettyProxyMsg nettyProxyMsg) {
|
||||
log.debug("客户端渗透服务端返回数据:{}" , new String(nettyProxyMsg.getData()));
|
||||
byte[] visitorPort = nettyProxyMsg.getVisitorPort();
|
||||
byte[] clientTargetIp = nettyProxyMsg.getClientTargetIp();
|
||||
|
||||
@@ -1,16 +1,14 @@
|
||||
package org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.tcp.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.permeate.tcp.socket.NettyTcpClientPermeateClientRealSocket;
|
||||
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.payload.NettyChannelContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.permeate.tcp.client.AbstractHandleTcpDistributeClientTransferClientPermeateChannelConnectionSuccessfulTypeAdvanced;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.context.annotation.Role;
|
||||
import org.wu.framework.spring.utils.SpringContextHolder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -23,18 +21,17 @@ import java.util.List;
|
||||
*
|
||||
* @see TcpMessageTypeEnums#TCP_DISTRIBUTE_CLIENT_TRANSFER_CLIENT_PERMEATE_CHANNEL_CONNECTION_SUCCESSFUL
|
||||
*/
|
||||
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
||||
@Slf4j
|
||||
public class ClientHandleTcpDistributeClientTransferClientPermeateChannelConnectionSuccessfulTypeAdvanced extends AbstractHandleTcpDistributeClientTransferClientPermeateChannelConnectionSuccessfulTypeAdvanced<NettyProxyMsg> {
|
||||
|
||||
/**
|
||||
* 处理当前数据
|
||||
*
|
||||
* @param nettyChannelContext 当前通道
|
||||
* @param channel 当前通道
|
||||
* @param nettyProxyMsg 通道数据
|
||||
*/
|
||||
@Override
|
||||
public void doHandler(NettyChannelContext nettyChannelContext, NettyProxyMsg nettyProxyMsg) {
|
||||
public void doHandler(Channel channel, NettyProxyMsg nettyProxyMsg) {
|
||||
// 创建connect 然后发送创建成功
|
||||
byte[] msgClientId = nettyProxyMsg.getClientId();
|
||||
byte[] msgClientTargetIp = nettyProxyMsg.getClientTargetIp();
|
||||
|
||||
@@ -4,13 +4,10 @@ package org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.tcp.adv
|
||||
import io.netty.channel.Channel;
|
||||
import io.netty.channel.ChannelOption;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyChannelContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.permeate.tcp.client.AbstractHandleTcpDistributeClientTransferClientPermeateChannelInitSuccessfulTypeAdvanced;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.context.annotation.Role;
|
||||
|
||||
|
||||
/**
|
||||
@@ -19,7 +16,6 @@ import org.springframework.context.annotation.Role;
|
||||
*
|
||||
* @see TcpMessageTypeEnums#TCP_DISTRIBUTE_CLIENT_TRANSFER_CLIENT_PERMEATE_CHANNEL_CONNECTION_SUCCESSFUL
|
||||
*/
|
||||
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
||||
@Slf4j
|
||||
public class ClientHandleTcpDistributeClientTransferClientPermeateChannelInitSuccessfulTypeAdvanced extends AbstractHandleTcpDistributeClientTransferClientPermeateChannelInitSuccessfulTypeAdvanced<NettyProxyMsg> {
|
||||
|
||||
@@ -28,12 +24,11 @@ public class ClientHandleTcpDistributeClientTransferClientPermeateChannelInitSuc
|
||||
/**
|
||||
* 处理当前数据
|
||||
*
|
||||
* @param nettyChannelContext 当前通道
|
||||
* @param channel 当前通道
|
||||
* @param nettyProxyMsg 通道数据
|
||||
*/
|
||||
@Override
|
||||
public void doHandler(NettyChannelContext nettyChannelContext, NettyProxyMsg nettyProxyMsg) {
|
||||
Channel channel = nettyChannelContext.channel();
|
||||
public void doHandler(Channel channel, NettyProxyMsg nettyProxyMsg) {
|
||||
// 连接成功 开启自动读取写
|
||||
byte[] msgClientId = nettyProxyMsg.getClientId();
|
||||
byte[] msgClientTargetIp = nettyProxyMsg.getClientTargetIp();
|
||||
|
||||
@@ -4,13 +4,10 @@ package org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.tcp.adv
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.channel.Channel;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyChannelContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.permeate.tcp.client.AbstractHandleTcpDistributeClientTransferClientRequestTypeAdvanced;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.context.annotation.Role;
|
||||
|
||||
|
||||
/**
|
||||
@@ -19,7 +16,6 @@ import org.springframework.context.annotation.Role;
|
||||
*
|
||||
* @see TcpMessageTypeEnums#TCP_DISTRIBUTE_CLIENT_PERMEATE_CLIENT_TRANSFER_REQUEST
|
||||
*/
|
||||
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
||||
@Slf4j
|
||||
public class ClientHandleTcpDistributeClientTransferClientRequestTypeAdvanced extends AbstractHandleTcpDistributeClientTransferClientRequestTypeAdvanced<NettyProxyMsg> {
|
||||
|
||||
@@ -28,12 +24,11 @@ public class ClientHandleTcpDistributeClientTransferClientRequestTypeAdvanced ex
|
||||
/**
|
||||
* 处理当前数据
|
||||
*
|
||||
* @param nettyChannelContext 当前通道
|
||||
* @param channel 当前通道
|
||||
* @param nettyProxyMsg 通道数据
|
||||
*/
|
||||
@Override
|
||||
public void doHandler(NettyChannelContext nettyChannelContext, NettyProxyMsg nettyProxyMsg) {
|
||||
Channel channel = nettyChannelContext.channel();
|
||||
public void doHandler(Channel channel, NettyProxyMsg nettyProxyMsg) {
|
||||
Channel nextChannel = ChannelAttributeKeyUtils.getNextChannel(channel);
|
||||
// 把数据转到真实服务
|
||||
ByteBuf buf = channel.config().getAllocator().buffer(nettyProxyMsg.getData().length);
|
||||
|
||||
@@ -6,13 +6,10 @@ import io.netty.channel.ChannelOption;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.tcp.handler.NettyTcpClientPermeateServerVisitorHandler;
|
||||
import org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.tcp.socket.NettyTcpClientPermeateServerVisitorTransferSocket;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyChannelContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.permeate.tcp.client.AbstractHandleTcpDistributeClientTransferServerPermeateChannelConnectionSuccessfulTypeAdvanced;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.context.annotation.Role;
|
||||
|
||||
|
||||
/**
|
||||
@@ -22,7 +19,6 @@ import org.springframework.context.annotation.Role;
|
||||
*
|
||||
* @see TcpMessageTypeEnums#TCP_DISTRIBUTE_CLIENT_TRANSFER_SERVER_PERMEATE_CHANNEL_CONNECTION_SUCCESSFUL
|
||||
*/
|
||||
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
||||
@Slf4j
|
||||
public class ClientHandleTcpDistributeClientTransferServerPermeateChannelConnectionSuccessfulTypeAdvanced extends AbstractHandleTcpDistributeClientTransferServerPermeateChannelConnectionSuccessfulTypeAdvanced<NettyProxyMsg> {
|
||||
|
||||
@@ -31,16 +27,15 @@ public class ClientHandleTcpDistributeClientTransferServerPermeateChannelConnect
|
||||
/**
|
||||
* 处理当前数据
|
||||
*
|
||||
* @param nettyChannelContext 当前通道
|
||||
* @param transferChannel 当前通道
|
||||
* @param nettyProxyMsg 通道数据
|
||||
*/
|
||||
@Override
|
||||
public void doHandler(NettyChannelContext nettyChannelContext, NettyProxyMsg nettyProxyMsg) {
|
||||
Channel channel = nettyChannelContext.channel();
|
||||
public void doHandler(Channel transferChannel, NettyProxyMsg nettyProxyMsg) {
|
||||
// 连接成功 开启自动读取写
|
||||
byte[] msgVisitorId = nettyProxyMsg.getVisitorId();
|
||||
String visitorId = new String(msgVisitorId);
|
||||
Channel nextChannel = ChannelAttributeKeyUtils.getNextChannel(channel);
|
||||
Channel nextChannel = ChannelAttributeKeyUtils.getNextChannel(transferChannel);
|
||||
nextChannel.config().setOption(ChannelOption.AUTO_READ, true);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,20 +1,17 @@
|
||||
package org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.tcp.advanced;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import io.netty.channel.Channel;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.event.ClientChangeEvent;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyChannelContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.permeate.tcp.client.AbstractHandleTcpDistributeConnectSuccessNotificationTypeAdvancedHandle;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.context.annotation.Role;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 客户端连接成功通知
|
||||
*/
|
||||
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
||||
@Slf4j
|
||||
public class ClientHandleTcpDistributeConnectSuccessNotificationTypeAdvancedHandle extends AbstractHandleTcpDistributeConnectSuccessNotificationTypeAdvancedHandle<NettyProxyMsg> {
|
||||
|
||||
@@ -28,11 +25,11 @@ public class ClientHandleTcpDistributeConnectSuccessNotificationTypeAdvancedHand
|
||||
/**
|
||||
* 处理当前数据
|
||||
*
|
||||
* @param nettyChannelContext 当前通道
|
||||
* @param channel 当前通道
|
||||
* @param msg 通道数据
|
||||
*/
|
||||
@Override
|
||||
protected void doHandler(NettyChannelContext nettyChannelContext, NettyProxyMsg msg) {
|
||||
protected void doHandler(Channel channel, NettyProxyMsg msg) {
|
||||
// 客户端ID:{},客户端:{}连接成功
|
||||
log.warn("Client ID: {}, Client Data : {} Connection successful", new String(msg.getClientId()), new String(msg.getData()));
|
||||
|
||||
|
||||
@@ -1,20 +1,17 @@
|
||||
package org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.tcp.advanced;
|
||||
|
||||
|
||||
import io.netty.channel.Channel;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.event.ClientChangeEvent;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyChannelContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.permeate.tcp.client.AbstractHandleTcpDistributeDisconnectTypeAdvancedHandle;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.context.annotation.Role;
|
||||
|
||||
|
||||
/**
|
||||
* 服务端处理客户端断开连接处理
|
||||
* TYPE_DISCONNECT
|
||||
*/
|
||||
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
||||
@Slf4j
|
||||
public class ClientHandleTcpDistributeDisconnectTypeAdvancedHandle extends AbstractHandleTcpDistributeDisconnectTypeAdvancedHandle<NettyProxyMsg> {
|
||||
|
||||
@@ -28,11 +25,11 @@ public class ClientHandleTcpDistributeDisconnectTypeAdvancedHandle extends Abstr
|
||||
/**
|
||||
* 处理当前数据
|
||||
*
|
||||
* @param nettyChannelContext 当前通道
|
||||
* @param channel 当前通道
|
||||
* @param msg 通道数据
|
||||
*/
|
||||
@Override
|
||||
public void doHandler(NettyChannelContext nettyChannelContext, NettyProxyMsg msg) {
|
||||
public void doHandler(Channel channel, NettyProxyMsg msg) {
|
||||
// 服务下线
|
||||
byte[] data = msg.getData();
|
||||
byte[] clientId = msg.getClientId();
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
package org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.tcp.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.permeate.tcp.socket.NettyTcpServerPermeateClientRealSocket;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.InternalNetworkPenetrationRealClient;
|
||||
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.payload.NettyChannelContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.permeate.tcp.client.AbstractHandleTcpDistributeServicePermeateClientRealConnectTypeAdvanced;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.context.annotation.Role;
|
||||
import org.wu.framework.spring.utils.SpringContextHolder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -18,7 +16,6 @@ import java.util.List;
|
||||
/**
|
||||
* 客户端创建真实代理同奥
|
||||
*/
|
||||
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
||||
@Slf4j
|
||||
public class ClientHandleTcpDistributeServicePermeateClientRealConnectTypeAdvanced extends AbstractHandleTcpDistributeServicePermeateClientRealConnectTypeAdvanced<NettyProxyMsg> {
|
||||
|
||||
@@ -33,11 +30,11 @@ public class ClientHandleTcpDistributeServicePermeateClientRealConnectTypeAdvanc
|
||||
/**
|
||||
* 处理当前数据
|
||||
*
|
||||
* @param nettyChannelContext 当前通道
|
||||
* @param channel 当前通道
|
||||
* @param msg 通道数据
|
||||
*/
|
||||
@Override
|
||||
protected void doHandler(NettyChannelContext nettyChannelContext, NettyProxyMsg msg) {
|
||||
protected void doHandler(Channel channel, NettyProxyMsg msg) {
|
||||
// 创建真实端口监听
|
||||
byte[] clientIdBytes = msg.getClientId();
|
||||
byte[] visitorPort = msg.getVisitorPort();
|
||||
|
||||
@@ -4,13 +4,10 @@ package org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.tcp.adv
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.channel.Channel;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyChannelContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.permeate.tcp.client.AbstractHandleTcpDistributeServicePermeateClientTransferClientResponseTypeAdvanced;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.context.annotation.Role;
|
||||
|
||||
|
||||
/**
|
||||
@@ -19,7 +16,6 @@ import org.springframework.context.annotation.Role;
|
||||
*
|
||||
* @see TcpMessageTypeEnums#TCP_DISTRIBUTE_CLIENT_PERMEATE_CLIENT_TRANSFER_RESPONSE
|
||||
*/
|
||||
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
||||
@Slf4j
|
||||
public class ClientHandleTcpDistributeServicePermeateClientTransferClientResponseTypeAdvanced extends AbstractHandleTcpDistributeServicePermeateClientTransferClientResponseTypeAdvanced<NettyProxyMsg> {
|
||||
|
||||
@@ -28,12 +24,11 @@ public class ClientHandleTcpDistributeServicePermeateClientTransferClientRespons
|
||||
/**
|
||||
* 处理当前数据
|
||||
*
|
||||
* @param nettyChannelContext 当前通道
|
||||
* @param channel 当前通道
|
||||
* @param nettyProxyMsg 通道数据
|
||||
*/
|
||||
@Override
|
||||
public void doHandler(NettyChannelContext nettyChannelContext, NettyProxyMsg nettyProxyMsg) {
|
||||
Channel channel = nettyChannelContext.channel();
|
||||
public void doHandler(Channel channel, NettyProxyMsg nettyProxyMsg) {
|
||||
Channel nextChannel = ChannelAttributeKeyUtils.getNextChannel(channel);
|
||||
// 把数据转到真实服务
|
||||
ByteBuf buf = channel.config().getAllocator().buffer(nettyProxyMsg.getData().length);
|
||||
|
||||
@@ -1,26 +1,23 @@
|
||||
package org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.tcp.advanced;
|
||||
|
||||
import io.netty.channel.Channel;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyChannelContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.permeate.tcp.client.AbstractHandleTcpDistributeSingleClientMessageTypeAdvanced;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.context.annotation.Role;
|
||||
|
||||
/**
|
||||
* 接收服务端发送过来的聊天信息
|
||||
*/
|
||||
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
||||
@Slf4j
|
||||
public class ClientHandleTcpDistributeSingleClientMessageTypeAdvanced extends AbstractHandleTcpDistributeSingleClientMessageTypeAdvanced<NettyProxyMsg> {
|
||||
/**
|
||||
* 处理当前数据
|
||||
*
|
||||
* @param nettyChannelContext 当前通道
|
||||
* @param channel 当前通道
|
||||
* @param nettyProxyMsg 通道数据
|
||||
*/
|
||||
@Override
|
||||
protected void doHandler(NettyChannelContext nettyChannelContext, NettyProxyMsg nettyProxyMsg) {
|
||||
protected void doHandler(Channel channel, NettyProxyMsg nettyProxyMsg) {
|
||||
byte[] clientId = nettyProxyMsg.getClientId();
|
||||
byte[] data = nettyProxyMsg.getData();
|
||||
log.info("接收客户端:{},发送过来的聊天信息:{}", new String(clientId), new String(data));
|
||||
|
||||
@@ -3,26 +3,21 @@ package org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.tcp.adv
|
||||
import io.netty.channel.Channel;
|
||||
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.NettyRealIdContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyChannelContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.permeate.tcp.client.AbstractHandleTcpDistributeSingleClientRealAutoReadConnectTypeAdvanced;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.context.annotation.Role;
|
||||
|
||||
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
||||
@Slf4j
|
||||
public class ClientHandleTcpDistributeSingleClientRealAutoReadConnectTypeAdvanced extends AbstractHandleTcpDistributeSingleClientRealAutoReadConnectTypeAdvanced<NettyProxyMsg> {
|
||||
/**
|
||||
* 处理当前数据
|
||||
*
|
||||
* @param nettyChannelContext 当前通道
|
||||
* @param channel 当前通道
|
||||
* @param nettyProxyMsg 通道数据
|
||||
*/
|
||||
@Override
|
||||
protected void doHandler(NettyChannelContext nettyChannelContext, NettyProxyMsg nettyProxyMsg) {
|
||||
Channel channel = nettyChannelContext.channel();
|
||||
protected void doHandler(Channel channel, NettyProxyMsg nettyProxyMsg) {
|
||||
// 获取访客ID
|
||||
byte[] visitorId = nettyProxyMsg.getVisitorId();
|
||||
// 获取访客对应的真实代理通道
|
||||
|
||||
@@ -1,25 +1,22 @@
|
||||
package org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.tcp.advanced;
|
||||
|
||||
import io.netty.channel.Channel;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
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;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyChannelContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.permeate.tcp.client.AbstractHandleTcpDistributeSingleClientRealCloseVisitorTypeAdvanced;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.context.annotation.Role;
|
||||
|
||||
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
||||
@Slf4j
|
||||
public class ClientHandleTcpDistributeSingleClientRealCloseVisitorTypeAdvanced extends AbstractHandleTcpDistributeSingleClientRealCloseVisitorTypeAdvanced<NettyProxyMsg> {
|
||||
/**
|
||||
* 处理当前数据
|
||||
*
|
||||
* @param nettyChannelContext 当前通道
|
||||
* @param channel 当前通道
|
||||
* @param nettyProxyMsg 通道数据
|
||||
*/
|
||||
@Override
|
||||
protected void doHandler(NettyChannelContext nettyChannelContext, NettyProxyMsg nettyProxyMsg) {
|
||||
protected void doHandler(Channel channel, NettyProxyMsg nettyProxyMsg) {
|
||||
// 关闭代理的真实通道
|
||||
byte[] visitorId = nettyProxyMsg.getVisitorId();
|
||||
NettyRealIdContext.clear(visitorId);
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
package org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.tcp.advanced;
|
||||
|
||||
import io.netty.channel.Channel;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyChannelContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.permeate.tcp.client.AbstractHandleTcpDistributeStagingClosedTypeAdvanced;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.context.annotation.Role;
|
||||
|
||||
/**
|
||||
* 服务端下发暂存关闭消息处理
|
||||
*/
|
||||
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
||||
@Slf4j
|
||||
public class ClientHandleTcpDistributeStagingClosedTypeAdvanced extends AbstractHandleTcpDistributeStagingClosedTypeAdvanced<NettyProxyMsg> {
|
||||
|
||||
@@ -18,11 +15,11 @@ public class ClientHandleTcpDistributeStagingClosedTypeAdvanced extends Abstract
|
||||
/**
|
||||
* 处理当前数据
|
||||
*
|
||||
* @param nettyChannelContext 当前通道
|
||||
* @param channel 当前通道
|
||||
* @param msg 通道数据
|
||||
*/
|
||||
@Override
|
||||
protected void doHandler(NettyChannelContext nettyChannelContext, NettyProxyMsg msg) {
|
||||
protected void doHandler(Channel channel, NettyProxyMsg msg) {
|
||||
String clientId = new String(msg.getClientId());
|
||||
log.info("客户端:{}离线暂存关闭", clientId);
|
||||
// 修改redis 客户端暂存状态
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
package org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.tcp.advanced;
|
||||
|
||||
import io.netty.channel.Channel;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyChannelContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.permeate.tcp.client.AbstractHandleTcpDistributeStagingOpenedTypeAdvanced;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.context.annotation.Role;
|
||||
|
||||
/**
|
||||
* 服务端下发暂存开启消息处理
|
||||
*/
|
||||
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
||||
@Slf4j
|
||||
public class ClientHandleTcpDistributeStagingOpenedTypeAdvanced extends AbstractHandleTcpDistributeStagingOpenedTypeAdvanced<NettyProxyMsg> {
|
||||
|
||||
@@ -22,11 +19,11 @@ public class ClientHandleTcpDistributeStagingOpenedTypeAdvanced extends Abstract
|
||||
/**
|
||||
* 处理当前数据
|
||||
*
|
||||
* @param nettyChannelContext 当前通道
|
||||
* @param channel 当前通道
|
||||
* @param msg 通道数据
|
||||
*/
|
||||
@Override
|
||||
protected void doHandler(NettyChannelContext nettyChannelContext, NettyProxyMsg msg) {
|
||||
protected void doHandler(Channel channel, NettyProxyMsg msg) {
|
||||
String clientId = new String(msg.getClientId());
|
||||
//客户端:{}离线暂存开启
|
||||
log.warn("Client: {} Offline temporary storage enabled", new String(msg.getClientId()));
|
||||
|
||||
@@ -9,7 +9,7 @@ import io.netty.handler.timeout.IdleStateEvent;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.tcp.socket.NettyTcpClientSocket;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.constant.TcpMessageType;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.adapter.ChannelTypeAdapter;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
@@ -47,7 +47,7 @@ public class NettyTcpClientHandler extends SimpleChannelInboundHandler<NettyProx
|
||||
// 接收服务端、或者是代理端的信息
|
||||
Channel channel = ctx.channel();
|
||||
// log.info("type:{},clientId:{},data:{}",msg.getMysqlType(),new String(msg.getClientId()),new String(msg.getData()));
|
||||
channelTypeAdapter.handler(ctx, msg);
|
||||
channelTypeAdapter.handler(channel, msg);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -64,7 +64,7 @@ public class NettyTcpClientHandler extends SimpleChannelInboundHandler<NettyProx
|
||||
NettyProxyMsg nettyMsg = new NettyProxyMsg();
|
||||
nettyMsg.setType(TcpMessageType.TCP_CLIENT_CHANNEL_ACTIVE);
|
||||
nettyMsg.setClientId(clientId);
|
||||
channelTypeAdapter.handler(ctx, nettyMsg);
|
||||
channelTypeAdapter.handler(channel, nettyMsg);
|
||||
|
||||
|
||||
}
|
||||
@@ -108,7 +108,7 @@ public class NettyTcpClientHandler extends SimpleChannelInboundHandler<NettyProx
|
||||
NettyProxyMsg nettyMsg = new NettyProxyMsg();
|
||||
nettyMsg.setType(TcpMessageType.TCP_DISTRIBUTE_CLIENT_DISCONNECTION_NOTIFICATION);
|
||||
nettyMsg.setClientId(clientId.getBytes(StandardCharsets.UTF_8));
|
||||
channelTypeAdapter.handler(ctx, nettyMsg);
|
||||
channelTypeAdapter.handler(channel, nettyMsg);
|
||||
ctx.close();
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import io.netty.channel.SimpleChannelInboundHandler;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
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.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
|
||||
|
||||
/**
|
||||
|
||||
@@ -6,7 +6,7 @@ import io.netty.channel.ChannelHandlerContext;
|
||||
import io.netty.channel.SimpleChannelInboundHandler;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.constant.TcpMessageType;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
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;
|
||||
|
||||
@@ -29,7 +29,7 @@ public class NettyTcpClientPermeateClientTransferHandler extends SimpleChannelIn
|
||||
@Override
|
||||
public void channelRead0(ChannelHandlerContext ctx, NettyProxyMsg nettyProxyMsg) throws Exception {
|
||||
Channel channel = ctx.channel();
|
||||
channelTypeAdapter.handler(ctx, nettyProxyMsg);
|
||||
channelTypeAdapter.handler(channel, nettyProxyMsg);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import io.netty.channel.ChannelHandlerContext;
|
||||
import io.netty.channel.SimpleChannelInboundHandler;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.constant.TcpMessageType;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
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;
|
||||
|
||||
@@ -29,7 +29,7 @@ public class NettyTcpClientPermeateClientTransferRealHandler extends SimpleChann
|
||||
@Override
|
||||
public void channelRead0(ChannelHandlerContext ctx, NettyProxyMsg nettyProxyMsg) throws Exception {
|
||||
Channel channel = ctx.channel();
|
||||
channelTypeAdapter.handler(ctx, nettyProxyMsg);
|
||||
channelTypeAdapter.handler(channel, nettyProxyMsg);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ import org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.tcp.sock
|
||||
import org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.tcp.socket.NettyTcpClientPermeateServerVisitorTransferSocket;
|
||||
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.advanced.payload.NettyProxyMsg;
|
||||
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.utils.ChannelAttributeKeyUtils;
|
||||
|
||||
|
||||
@@ -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.common.constant.TcpMessageType;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
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;
|
||||
|
||||
@@ -31,7 +31,7 @@ public class NettyTcpClientPermeateServerTransferHandler extends SimpleChannelIn
|
||||
@Override
|
||||
public void channelRead0(ChannelHandlerContext ctx, NettyProxyMsg nettyProxyMsg) throws Exception {
|
||||
Channel channel = ctx.channel();
|
||||
channelTypeAdapter.handler(ctx, nettyProxyMsg);
|
||||
channelTypeAdapter.handler(channel, nettyProxyMsg);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.NettyCli
|
||||
import org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.tcp.advanced.ClientHandleTcpDistributeClientTransferServerPermeateChannelConnectionSuccessfulTypeAdvanced;
|
||||
import org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.tcp.socket.NettyTcpClientPermeateServerVisitorTransferSocket;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.constant.TcpMessageType;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
@@ -8,7 +8,7 @@ import io.netty.channel.SimpleChannelInboundHandler;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
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.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
|
||||
import org.wu.framework.core.utils.ObjectUtils;
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@ 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.*;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.adapter.ChannelTypeAdapter;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
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;
|
||||
@@ -31,7 +31,7 @@ public class NettyTcpServerPermeateClientTransferHandler extends SimpleChannelIn
|
||||
@Override
|
||||
public void channelRead0(ChannelHandlerContext ctx, NettyProxyMsg nettyProxyMsg) throws Exception {
|
||||
Channel channel = ctx.channel();
|
||||
channelTypeAdapter.handler(ctx, nettyProxyMsg);
|
||||
channelTypeAdapter.handler(channel, nettyProxyMsg);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@ import org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.tcp.filt
|
||||
import org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.tcp.filter.NettyTcpClientPermeateClientTransferRealFilter;
|
||||
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.payload.NettyProxyMsg;
|
||||
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;
|
||||
|
||||
@@ -10,7 +10,7 @@ import org.framework.lazy.cloud.network.heartbeat.client.config.NettyClientPrope
|
||||
import org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.NettyClientPermeateClientVisitor;
|
||||
import org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.tcp.filter.NettyTcpClientPermeateClientTransferFilter;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.constant.TcpMessageType;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
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;
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import org.framework.lazy.cloud.network.heartbeat.client.config.NettyClientPrope
|
||||
import org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.NettyClientPermeateServerVisitor;
|
||||
import org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.tcp.filter.NettyTcpClientPermeateServerTransferFilter;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.constant.TcpMessageType;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
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;
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ import org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.NettyCli
|
||||
import org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.event.ClientChangeEvent;
|
||||
import org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.tcp.filter.NettyTcpClientFilter;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.constant.TcpMessageType;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
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;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelTypeAdvanced;
|
||||
|
||||
@@ -11,7 +11,6 @@ import org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.tcp.filt
|
||||
import org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.tcp.filter.NettyTcpServerPermeateClientTransferFilter;
|
||||
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.payload.NettyProxyMsg;
|
||||
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;
|
||||
|
||||
@@ -1,32 +1,29 @@
|
||||
package org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.udp.advanced;
|
||||
|
||||
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyChannelContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.permeate.udp.AbstractUdpHandleChannelHeartbeatTypeAdvanced;
|
||||
import io.netty.channel.Channel;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.constant.UdpMessageType;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.context.annotation.Role;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.permeate.udp.AbstractUdpHandleChannelHeartbeatTypeAdvanced;
|
||||
|
||||
|
||||
/**
|
||||
* 服务端 处理客户端心跳
|
||||
* UDP_TYPE_HEARTBEAT
|
||||
*/
|
||||
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
||||
public class ClientHandleUdpChannelHeartbeatTypeAdvanced extends AbstractUdpHandleChannelHeartbeatTypeAdvanced<NettyProxyMsg> {
|
||||
|
||||
/**
|
||||
* 处理当前数据
|
||||
*
|
||||
* @param nettyChannelContext 当前通道
|
||||
* @param channel 当前通道
|
||||
* @param msg 通道数据
|
||||
*/
|
||||
@Override
|
||||
public void doHandler(NettyChannelContext nettyChannelContext, NettyProxyMsg msg) {
|
||||
NettyProxyMsg nettyProxyMsg = new NettyProxyMsg();
|
||||
nettyProxyMsg.setType(UdpMessageType.UDP_TYPE_HEARTBEAT);
|
||||
// nettyChannelContext.writeAndFlush(nettyProxyMsg);
|
||||
public void doHandler(Channel channel, NettyProxyMsg msg) {
|
||||
NettyProxyMsg hb = new NettyProxyMsg();
|
||||
hb.setType(UdpMessageType.UDP_TYPE_HEARTBEAT);
|
||||
// channel.writeAndFlush(hb);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -5,13 +5,10 @@ import io.netty.buffer.ByteBuf;
|
||||
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.common.advanced.payload.NettyChannelContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.permeate.udp.client.AbstractHandleUdpDistributeServicePermeateClientTransferTypeAdvanced;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.UdpMessageTypeEnums;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.context.annotation.Role;
|
||||
|
||||
|
||||
/**
|
||||
@@ -19,7 +16,6 @@ import org.springframework.context.annotation.Role;
|
||||
*
|
||||
* @see UdpMessageTypeEnums#UDP_DISTRIBUTE_CLIENT_TRANSFER
|
||||
*/
|
||||
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
||||
@Slf4j
|
||||
public class ClientHandleUdpChannelTransferTypeAdvancedHandleDistribute extends AbstractHandleUdpDistributeServicePermeateClientTransferTypeAdvanced<NettyProxyMsg> {
|
||||
|
||||
@@ -32,12 +28,11 @@ public class ClientHandleUdpChannelTransferTypeAdvancedHandleDistribute extends
|
||||
/**
|
||||
* 处理当前数据
|
||||
*
|
||||
* @param nettyChannelContext 当前通道
|
||||
* @param channel 当前通道
|
||||
* @param nettyProxyMsg 通道数据
|
||||
*/
|
||||
@Override
|
||||
public void doHandler(NettyChannelContext nettyChannelContext, NettyProxyMsg nettyProxyMsg) {
|
||||
Channel channel = nettyChannelContext.channel();
|
||||
public void doHandler(Channel channel, NettyProxyMsg nettyProxyMsg) {
|
||||
log.debug("接收到服务端需要内网穿透的数据:{}" , nettyProxyMsg);
|
||||
String clientId = nettyClientProperties.getClientId();
|
||||
byte[] visitorPort = nettyProxyMsg.getVisitorPort();
|
||||
|
||||
@@ -3,17 +3,13 @@ package org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.udp.adv
|
||||
import io.netty.channel.Channel;
|
||||
import org.framework.lazy.cloud.network.heartbeat.client.config.NettyClientProperties;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.ChannelContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyChannelContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.permeate.udp.client.AbstractHandleUdpClientChannelActiveAdvanced;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.context.annotation.Role;
|
||||
|
||||
/**
|
||||
* 客户端通道 is active
|
||||
*/
|
||||
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
||||
public class ClientHandleUdpClientChannelActiveAdvanced extends AbstractHandleUdpClientChannelActiveAdvanced<NettyProxyMsg> {
|
||||
private final NettyClientProperties nettyClientProperties;
|
||||
|
||||
@@ -24,12 +20,11 @@ public class ClientHandleUdpClientChannelActiveAdvanced extends AbstractHandleUd
|
||||
/**
|
||||
* 处理当前数据
|
||||
*
|
||||
* @param nettyChannelContext 当前通道
|
||||
* @param channel 当前通道
|
||||
* @param nettyProxyMsg 通道数据
|
||||
*/
|
||||
@Override
|
||||
protected void doHandler(NettyChannelContext nettyChannelContext, NettyProxyMsg nettyProxyMsg) {
|
||||
Channel channel = nettyChannelContext.channel();
|
||||
protected void doHandler(Channel channel, NettyProxyMsg nettyProxyMsg) {
|
||||
// 缓存当前通道
|
||||
byte[] clientIdByte = nettyProxyMsg.getClientId();
|
||||
String clientId = new String(clientIdByte);
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
package org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.udp.advanced;
|
||||
|
||||
|
||||
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.NettyVisitorPortContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyChannelContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.permeate.udp.client.AbstractHandleUdpDistributeClientPermeateClientCloseTypeAdvanced;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.UdpMessageTypeEnums;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.socket.PermeateVisitorSocket;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.context.annotation.Role;
|
||||
|
||||
|
||||
/**
|
||||
@@ -17,7 +15,6 @@ import org.springframework.context.annotation.Role;
|
||||
*
|
||||
* @see UdpMessageTypeEnums#UDP_DISTRIBUTE_CLIENT_PERMEATE_CLIENT_CLOSE
|
||||
*/
|
||||
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
||||
@Slf4j
|
||||
public class ClientHandleUdpDistributeClientPermeateClientCloseTypeAdvanced extends AbstractHandleUdpDistributeClientPermeateClientCloseTypeAdvanced<NettyProxyMsg> {
|
||||
|
||||
@@ -25,11 +22,11 @@ public class ClientHandleUdpDistributeClientPermeateClientCloseTypeAdvanced exte
|
||||
/**
|
||||
* 处理当前数据
|
||||
*
|
||||
* @param nettyChannelContext 当前通道
|
||||
* @param channel 当前通道
|
||||
* @param nettyProxyMsg 通道数据
|
||||
*/
|
||||
@Override
|
||||
public void doHandler(NettyChannelContext nettyChannelContext, NettyProxyMsg nettyProxyMsg) {
|
||||
public void doHandler(Channel channel, NettyProxyMsg nettyProxyMsg) {
|
||||
// 初始化 客户端渗透服务端socket
|
||||
byte[] msgVisitorPort = nettyProxyMsg.getVisitorPort();
|
||||
Integer visitorPort = Integer.parseInt(new String(msgVisitorPort));
|
||||
|
||||
@@ -1,16 +1,14 @@
|
||||
package org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.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.permeate.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.payload.NettyChannelContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.permeate.udp.client.AbstractHandleUdpDistributeClientPermeateClientInitTypeAdvanced;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.context.annotation.Role;
|
||||
import org.wu.framework.spring.utils.SpringContextHolder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -22,18 +20,17 @@ import java.util.List;
|
||||
*
|
||||
* @see TcpMessageTypeEnums#TCP_DISTRIBUTE_CLIENT_PERMEATE_CLIENT_INIT
|
||||
*/
|
||||
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
||||
@Slf4j
|
||||
public class ClientHandleUdpDistributeClientPermeateClientInitTypeAdvanced extends AbstractHandleUdpDistributeClientPermeateClientInitTypeAdvanced<NettyProxyMsg> {
|
||||
|
||||
/**
|
||||
* 处理当前数据
|
||||
*
|
||||
* @param nettyChannelContext 当前通道
|
||||
* @param channel 当前通道
|
||||
* @param nettyProxyMsg 通道数据
|
||||
*/
|
||||
@Override
|
||||
public void doHandler(NettyChannelContext nettyChannelContext, NettyProxyMsg nettyProxyMsg) {
|
||||
public void doHandler(Channel channel, NettyProxyMsg nettyProxyMsg) {
|
||||
// 初始化 客户端渗透服务端socket
|
||||
byte[] fromClientIdBytes = nettyProxyMsg.getClientId();
|
||||
byte[] visitorPortBytes = nettyProxyMsg.getVisitorPort();
|
||||
|
||||
@@ -3,13 +3,10 @@ package org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.udp.adv
|
||||
|
||||
import io.netty.channel.Channel;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyChannelContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.permeate.udp.client.AbstractHandleUdpDistributeClientPermeateClientTransferCloseTypeAdvanced;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.UdpMessageTypeEnums;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.context.annotation.Role;
|
||||
|
||||
|
||||
/**
|
||||
@@ -17,19 +14,17 @@ import org.springframework.context.annotation.Role;
|
||||
*
|
||||
* @see UdpMessageTypeEnums#UDP_DISTRIBUTE_CLIENT_PERMEATE_CLIENT_TRANSFER_CLOSE
|
||||
*/
|
||||
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
||||
@Slf4j
|
||||
public class ClientHandleUdpDistributeClientPermeateClientTransferCloseTypeAdvanced extends AbstractHandleUdpDistributeClientPermeateClientTransferCloseTypeAdvanced<NettyProxyMsg> {
|
||||
|
||||
/**
|
||||
* 处理当前数据
|
||||
*
|
||||
* @param nettyChannelContext 当前通道
|
||||
* @param channel 当前通道
|
||||
* @param nettyProxyMsg 通道数据
|
||||
*/
|
||||
@Override
|
||||
public void doHandler(NettyChannelContext nettyChannelContext, NettyProxyMsg nettyProxyMsg) {
|
||||
Channel channel = nettyChannelContext.channel();
|
||||
public void doHandler(Channel channel, NettyProxyMsg nettyProxyMsg) {
|
||||
// 关闭客户端真实通道、访客通道
|
||||
Channel realChannel = ChannelAttributeKeyUtils.getNextChannel(channel);
|
||||
realChannel.close();// 真实通道关闭
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
package org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.udp.advanced;
|
||||
|
||||
|
||||
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.NettyVisitorPortContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyChannelContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.permeate.udp.client.AbstractHandleUdpDistributeClientPermeateServerCloseTypeAdvanced;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.UdpMessageTypeEnums;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.socket.PermeateVisitorSocket;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.context.annotation.Role;
|
||||
|
||||
|
||||
/**
|
||||
@@ -17,7 +15,6 @@ import org.springframework.context.annotation.Role;
|
||||
*
|
||||
* @see UdpMessageTypeEnums#UDP_DISTRIBUTE_CLIENT_PERMEATE_SERVER_CLOSE
|
||||
*/
|
||||
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
||||
@Slf4j
|
||||
public class ClientHandleUdpDistributeClientPermeateServerCloseTypeAdvanced extends AbstractHandleUdpDistributeClientPermeateServerCloseTypeAdvanced<NettyProxyMsg> {
|
||||
|
||||
@@ -25,11 +22,11 @@ public class ClientHandleUdpDistributeClientPermeateServerCloseTypeAdvanced exte
|
||||
/**
|
||||
* 处理当前数据
|
||||
*
|
||||
* @param nettyChannelContext 当前通道
|
||||
* @param channel 当前通道
|
||||
* @param nettyProxyMsg 通道数据
|
||||
*/
|
||||
@Override
|
||||
public void doHandler(NettyChannelContext nettyChannelContext, NettyProxyMsg nettyProxyMsg) {
|
||||
public void doHandler(Channel channel, NettyProxyMsg nettyProxyMsg) {
|
||||
// 初始化 客户端渗透服务端socket
|
||||
byte[] msgVisitorPort = nettyProxyMsg.getVisitorPort();
|
||||
Integer visitorPort = Integer.parseInt(new String(msgVisitorPort));
|
||||
|
||||
@@ -1,16 +1,14 @@
|
||||
package org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.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.permeate.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.payload.NettyChannelContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.permeate.udp.client.AbstractHandleUdpDistributeClientPermeateServerInitTypeAdvanced;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.TcpMessageTypeEnums;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.context.annotation.Role;
|
||||
import org.wu.framework.spring.utils.SpringContextHolder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -22,7 +20,6 @@ import java.util.List;
|
||||
*
|
||||
* @see TcpMessageTypeEnums#TCP_DISTRIBUTE_CLIENT_PERMEATE_SERVER_INIT
|
||||
*/
|
||||
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
||||
@Slf4j
|
||||
public class ClientHandleUdpDistributeClientPermeateServerInitTypeAdvanced extends AbstractHandleUdpDistributeClientPermeateServerInitTypeAdvanced<NettyProxyMsg> {
|
||||
|
||||
@@ -35,11 +32,11 @@ public class ClientHandleUdpDistributeClientPermeateServerInitTypeAdvanced exten
|
||||
/**
|
||||
* 处理当前数据
|
||||
*
|
||||
* @param nettyChannelContext 当前通道
|
||||
* @param channel 当前通道
|
||||
* @param nettyProxyMsg 通道数据
|
||||
*/
|
||||
@Override
|
||||
public void doHandler(NettyChannelContext nettyChannelContext, NettyProxyMsg nettyProxyMsg) {
|
||||
public void doHandler(Channel channel, NettyProxyMsg nettyProxyMsg) {
|
||||
// 初始化 客户端渗透服务端socket
|
||||
byte[] clientIdBytes = nettyProxyMsg.getClientId();
|
||||
byte[] visitorPort = nettyProxyMsg.getVisitorPort();
|
||||
|
||||
@@ -3,13 +3,10 @@ package org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.udp.adv
|
||||
|
||||
import io.netty.channel.Channel;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyChannelContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.permeate.udp.client.AbstractHandleUdpDistributeClientPermeateServerTransferCloseTypeAdvanced;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.UdpMessageTypeEnums;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.context.annotation.Role;
|
||||
|
||||
|
||||
/**
|
||||
@@ -17,19 +14,17 @@ import org.springframework.context.annotation.Role;
|
||||
*
|
||||
* @see UdpMessageTypeEnums#UDP_DISTRIBUTE_CLIENT_PERMEATE_SERVER_TRANSFER_CLOSE
|
||||
*/
|
||||
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
||||
@Slf4j
|
||||
public class ClientHandleUdpDistributeClientPermeateServerTransferCloseTypeAdvanced extends AbstractHandleUdpDistributeClientPermeateServerTransferCloseTypeAdvanced<NettyProxyMsg> {
|
||||
|
||||
/**
|
||||
* 处理当前数据
|
||||
*
|
||||
* @param nettyChannelContext 当前通道
|
||||
* @param channel 当前通道
|
||||
* @param nettyProxyMsg 通道数据
|
||||
*/
|
||||
@Override
|
||||
public void doHandler(NettyChannelContext nettyChannelContext, NettyProxyMsg nettyProxyMsg) {
|
||||
Channel channel = nettyChannelContext.channel();
|
||||
public void doHandler(Channel channel, NettyProxyMsg nettyProxyMsg) {
|
||||
// 关闭本地通信通道
|
||||
Channel nextChannel = ChannelAttributeKeyUtils.getNextChannel(channel);
|
||||
channel.close();
|
||||
|
||||
@@ -4,13 +4,10 @@ package org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.udp.adv
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.channel.Channel;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyChannelContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.permeate.udp.client.AbstractHandleUdpDistributeClientPermeateServerTransferTypeAdvanced;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.UdpMessageTypeEnums;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.context.annotation.Role;
|
||||
|
||||
|
||||
/**
|
||||
@@ -18,7 +15,6 @@ import org.springframework.context.annotation.Role;
|
||||
*
|
||||
* @see UdpMessageTypeEnums#UDP_DISTRIBUTE_CLIENT_TRANSFER
|
||||
*/
|
||||
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
||||
@Slf4j
|
||||
public class ClientHandleUdpDistributeClientPermeateServerTransferTypeAdvanced extends AbstractHandleUdpDistributeClientPermeateServerTransferTypeAdvanced<NettyProxyMsg> {
|
||||
|
||||
@@ -26,12 +22,11 @@ public class ClientHandleUdpDistributeClientPermeateServerTransferTypeAdvanced e
|
||||
/**
|
||||
* 处理当前数据
|
||||
*
|
||||
* @param nettyChannelContext 当前通道
|
||||
* @param channel 当前通道
|
||||
* @param nettyProxyMsg 通道数据
|
||||
*/
|
||||
@Override
|
||||
public void doHandler(NettyChannelContext nettyChannelContext, NettyProxyMsg nettyProxyMsg) {
|
||||
Channel channel = nettyChannelContext.channel();
|
||||
public void doHandler(Channel channel, NettyProxyMsg nettyProxyMsg) {
|
||||
log.debug("客户端渗透服务端返回数据:{}" , new String(nettyProxyMsg.getData()));
|
||||
byte[] visitorPort = nettyProxyMsg.getVisitorPort();
|
||||
byte[] clientTargetIp = nettyProxyMsg.getClientTargetIp();
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
package org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.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.permeate.udp.socket.NettyUdpClientPermeateClientRealSocket;
|
||||
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.payload.NettyChannelContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.permeate.udp.client.AbstractHandleUdpDistributeClientTransferClientPermeateChannelConnectionSuccessfulTypeAdvanced;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.context.annotation.Role;
|
||||
import org.wu.framework.spring.utils.SpringContextHolder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -22,18 +20,17 @@ import java.util.List;
|
||||
*
|
||||
* @see MessageTypeEnums#UDP_DISTRIBUTE_CLIENT_TRANSFER_CLIENT_PERMEATE_CHANNEL_CONNECTION_SUCCESSFUL
|
||||
*/
|
||||
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
||||
@Slf4j
|
||||
public class ClientHandleUdpDistributeClientTransferClientPermeateChannelConnectionSuccessfulTypeAdvanced extends AbstractHandleUdpDistributeClientTransferClientPermeateChannelConnectionSuccessfulTypeAdvanced<NettyProxyMsg> {
|
||||
|
||||
/**
|
||||
* 处理当前数据
|
||||
*
|
||||
* @param nettyChannelContext 当前通道
|
||||
* @param channel 当前通道
|
||||
* @param nettyProxyMsg 通道数据
|
||||
*/
|
||||
@Override
|
||||
public void doHandler(NettyChannelContext nettyChannelContext, NettyProxyMsg nettyProxyMsg) {
|
||||
public void doHandler(Channel channel, NettyProxyMsg nettyProxyMsg) {
|
||||
// 创建connect 然后发送创建成功
|
||||
byte[] msgClientId = nettyProxyMsg.getClientId();
|
||||
byte[] msgClientTargetIp = nettyProxyMsg.getClientTargetIp();
|
||||
|
||||
@@ -4,13 +4,10 @@ package org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.udp.adv
|
||||
import io.netty.channel.Channel;
|
||||
import io.netty.channel.ChannelOption;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyChannelContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.permeate.udp.client.AbstractHandleUdpDistributeClientTransferClientPermeateChannelInitSuccessfulTypeAdvanced;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.UdpMessageTypeEnums;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.context.annotation.Role;
|
||||
|
||||
|
||||
/**
|
||||
@@ -19,7 +16,6 @@ import org.springframework.context.annotation.Role;
|
||||
*
|
||||
* @see UdpMessageTypeEnums#UDP_DISTRIBUTE_CLIENT_TRANSFER_CLIENT_PERMEATE_CHANNEL_CONNECTION_SUCCESSFUL
|
||||
*/
|
||||
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
||||
@Slf4j
|
||||
public class ClientHandleUdpDistributeClientTransferClientPermeateChannelInitSuccessfulTypeAdvanced extends AbstractHandleUdpDistributeClientTransferClientPermeateChannelInitSuccessfulTypeAdvanced<NettyProxyMsg> {
|
||||
|
||||
@@ -28,12 +24,11 @@ public class ClientHandleUdpDistributeClientTransferClientPermeateChannelInitSuc
|
||||
/**
|
||||
* 处理当前数据
|
||||
*
|
||||
* @param nettyChannelContext 当前通道
|
||||
* @param channel 当前通道
|
||||
* @param nettyProxyMsg 通道数据
|
||||
*/
|
||||
@Override
|
||||
public void doHandler(NettyChannelContext nettyChannelContext, NettyProxyMsg nettyProxyMsg) {
|
||||
Channel channel = nettyChannelContext.channel();
|
||||
public void doHandler(Channel channel, NettyProxyMsg nettyProxyMsg) {
|
||||
// 连接成功 开启自动读取写
|
||||
byte[] msgClientId = nettyProxyMsg.getClientId();
|
||||
byte[] msgClientTargetIp = nettyProxyMsg.getClientTargetIp();
|
||||
|
||||
@@ -4,13 +4,10 @@ package org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.udp.adv
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.channel.Channel;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyChannelContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.permeate.udp.client.AbstractHandleUdpDistributeClientTransferClientRequestTypeAdvanced;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.UdpMessageTypeEnums;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.context.annotation.Role;
|
||||
|
||||
|
||||
/**
|
||||
@@ -19,7 +16,6 @@ import org.springframework.context.annotation.Role;
|
||||
*
|
||||
* @see UdpMessageTypeEnums#UDP_DISTRIBUTE_CLIENT_PERMEATE_CLIENT_TRANSFER_REQUEST
|
||||
*/
|
||||
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
||||
@Slf4j
|
||||
public class ClientHandleUdpDistributeClientTransferClientRequestTypeAdvanced extends AbstractHandleUdpDistributeClientTransferClientRequestTypeAdvanced<NettyProxyMsg> {
|
||||
|
||||
@@ -28,12 +24,11 @@ public class ClientHandleUdpDistributeClientTransferClientRequestTypeAdvanced ex
|
||||
/**
|
||||
* 处理当前数据
|
||||
*
|
||||
* @param nettyChannelContext 当前通道
|
||||
* @param channel 当前通道
|
||||
* @param nettyProxyMsg 通道数据
|
||||
*/
|
||||
@Override
|
||||
public void doHandler(NettyChannelContext nettyChannelContext, NettyProxyMsg nettyProxyMsg) {
|
||||
Channel channel = nettyChannelContext.channel();
|
||||
public void doHandler(Channel channel, NettyProxyMsg nettyProxyMsg) {
|
||||
Channel nextChannel = ChannelAttributeKeyUtils.getNextChannel(channel);
|
||||
// 把数据转到真实服务
|
||||
ByteBuf buf = channel.config().getAllocator().buffer(nettyProxyMsg.getData().length);
|
||||
|
||||
@@ -6,13 +6,10 @@ import io.netty.channel.ChannelOption;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.udp.handler.NettyUdpClientPermeateServerVisitorHandler;
|
||||
import org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.udp.socket.NettyUdpClientPermeateServerVisitorTransferSocket;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyChannelContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.permeate.udp.client.AbstractHandleUdpDistributeClientTransferServerPermeateChannelConnectionSuccessfulTypeAdvanced;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.UdpMessageTypeEnums;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.context.annotation.Role;
|
||||
|
||||
|
||||
/**
|
||||
@@ -22,7 +19,6 @@ import org.springframework.context.annotation.Role;
|
||||
*
|
||||
* @see UdpMessageTypeEnums#UDP_DISTRIBUTE_CLIENT_TRANSFER_SERVER_PERMEATE_CHANNEL_CONNECTION_SUCCESSFUL
|
||||
*/
|
||||
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
||||
@Slf4j
|
||||
public class ClientHandleUdpDistributeClientTransferServerPermeateChannelConnectionSuccessfulTypeAdvanced extends AbstractHandleUdpDistributeClientTransferServerPermeateChannelConnectionSuccessfulTypeAdvanced<NettyProxyMsg> {
|
||||
|
||||
@@ -31,16 +27,15 @@ public class ClientHandleUdpDistributeClientTransferServerPermeateChannelConnect
|
||||
/**
|
||||
* 处理当前数据
|
||||
*
|
||||
* @param nettyChannelContext 当前通道
|
||||
* @param transferChannel 当前通道
|
||||
* @param nettyProxyMsg 通道数据
|
||||
*/
|
||||
@Override
|
||||
public void doHandler(NettyChannelContext nettyChannelContext, NettyProxyMsg nettyProxyMsg) {
|
||||
Channel channel = nettyChannelContext.channel();
|
||||
public void doHandler(Channel transferChannel, NettyProxyMsg nettyProxyMsg) {
|
||||
// 连接成功 开启自动读取写
|
||||
byte[] msgVisitorId = nettyProxyMsg.getVisitorId();
|
||||
String visitorId = new String(msgVisitorId);
|
||||
Channel nextChannel = ChannelAttributeKeyUtils.getNextChannel(channel);
|
||||
Channel nextChannel = ChannelAttributeKeyUtils.getNextChannel(transferChannel);
|
||||
nextChannel.config().setOption(ChannelOption.AUTO_READ, true);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,20 +1,17 @@
|
||||
package org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.udp.advanced;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import io.netty.channel.Channel;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.event.ClientChangeEvent;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyChannelContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.permeate.udp.client.AbstractHandleUdpDistributeConnectSuccessNotificationTypeAdvancedHandle;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.context.annotation.Role;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 客户端连接成功通知
|
||||
*/
|
||||
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
||||
@Slf4j
|
||||
public class ClientHandleUdpDistributeConnectSuccessNotificationTypeAdvancedHandle extends AbstractHandleUdpDistributeConnectSuccessNotificationTypeAdvancedHandle<NettyProxyMsg> {
|
||||
|
||||
@@ -28,11 +25,11 @@ public class ClientHandleUdpDistributeConnectSuccessNotificationTypeAdvancedHand
|
||||
/**
|
||||
* 处理当前数据
|
||||
*
|
||||
* @param nettyChannelContext 当前通道
|
||||
* @param channel 当前通道
|
||||
* @param msg 通道数据
|
||||
*/
|
||||
@Override
|
||||
protected void doHandler(NettyChannelContext nettyChannelContext, NettyProxyMsg msg) {
|
||||
protected void doHandler(Channel channel, NettyProxyMsg msg) {
|
||||
// 客户端ID:{},客户端:{}连接成功
|
||||
log.warn("Client ID: {}, Client Data : {} Connection successful", new String(msg.getClientId()), new String(msg.getData()));
|
||||
|
||||
|
||||
@@ -1,20 +1,17 @@
|
||||
package org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.udp.advanced;
|
||||
|
||||
|
||||
import io.netty.channel.Channel;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.event.ClientChangeEvent;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyChannelContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.permeate.udp.client.AbstractHandleUdpDistributeDisconnectTypeAdvancedHandle;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.context.annotation.Role;
|
||||
|
||||
|
||||
/**
|
||||
* 服务端处理客户端断开连接处理
|
||||
* TYPE_DISCONNECT
|
||||
*/
|
||||
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
||||
@Slf4j
|
||||
public class ClientHandleUdpDistributeDisconnectTypeAdvancedHandle extends AbstractHandleUdpDistributeDisconnectTypeAdvancedHandle<NettyProxyMsg> {
|
||||
|
||||
@@ -28,11 +25,11 @@ public class ClientHandleUdpDistributeDisconnectTypeAdvancedHandle extends Abstr
|
||||
/**
|
||||
* 处理当前数据
|
||||
*
|
||||
* @param nettyChannelContext 当前通道
|
||||
* @param channel 当前通道
|
||||
* @param msg 通道数据
|
||||
*/
|
||||
@Override
|
||||
public void doHandler(NettyChannelContext nettyChannelContext, NettyProxyMsg msg) {
|
||||
public void doHandler(Channel channel, NettyProxyMsg msg) {
|
||||
// 服务下线
|
||||
byte[] data = msg.getData();
|
||||
byte[] clientId = msg.getClientId();
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
package org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.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.permeate.udp.socket.NettyUdpServerPermeateClientRealSocket;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.InternalNetworkPenetrationRealClient;
|
||||
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.payload.NettyChannelContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.permeate.udp.client.AbstractHandleUdpDistributeServicePermeateClientRealConnectTypeAdvanced;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.context.annotation.Role;
|
||||
import org.wu.framework.spring.utils.SpringContextHolder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -18,7 +16,6 @@ import java.util.List;
|
||||
/**
|
||||
* 客户端创建真实代理同奥
|
||||
*/
|
||||
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
||||
@Slf4j
|
||||
public class ClientHandleUdpDistributeServicePermeateClientRealConnectTypeAdvanced extends AbstractHandleUdpDistributeServicePermeateClientRealConnectTypeAdvanced<NettyProxyMsg> {
|
||||
|
||||
@@ -32,11 +29,11 @@ public class ClientHandleUdpDistributeServicePermeateClientRealConnectTypeAdvanc
|
||||
/**
|
||||
* 处理当前数据
|
||||
*
|
||||
* @param nettyChannelContext 当前通道
|
||||
* @param channel 当前通道
|
||||
* @param msg 通道数据
|
||||
*/
|
||||
@Override
|
||||
protected void doHandler(NettyChannelContext nettyChannelContext, NettyProxyMsg msg) {
|
||||
protected void doHandler(Channel channel, NettyProxyMsg msg) {
|
||||
// 创建真实端口监听
|
||||
byte[] clientIdBytes = msg.getClientId();
|
||||
byte[] visitorPort = msg.getVisitorPort();
|
||||
|
||||
@@ -4,13 +4,10 @@ package org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.udp.adv
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.channel.Channel;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyChannelContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.permeate.udp.client.AbstractHandleUdpDistributeServicePermeateClientTransferClientResponseTypeAdvanced;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.UdpMessageTypeEnums;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.context.annotation.Role;
|
||||
|
||||
|
||||
/**
|
||||
@@ -19,7 +16,6 @@ import org.springframework.context.annotation.Role;
|
||||
*
|
||||
* @see UdpMessageTypeEnums#UDP_DISTRIBUTE_CLIENT_PERMEATE_CLIENT_TRANSFER_RESPONSE
|
||||
*/
|
||||
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
||||
@Slf4j
|
||||
public class ClientHandleUdpDistributeServicePermeateClientTransferClientResponseTypeAdvanced extends AbstractHandleUdpDistributeServicePermeateClientTransferClientResponseTypeAdvanced<NettyProxyMsg> {
|
||||
|
||||
@@ -28,12 +24,11 @@ public class ClientHandleUdpDistributeServicePermeateClientTransferClientRespons
|
||||
/**
|
||||
* 处理当前数据
|
||||
*
|
||||
* @param nettyChannelContext 当前通道
|
||||
* @param channel 当前通道
|
||||
* @param nettyProxyMsg 通道数据
|
||||
*/
|
||||
@Override
|
||||
public void doHandler(NettyChannelContext nettyChannelContext, NettyProxyMsg nettyProxyMsg) {
|
||||
Channel channel = nettyChannelContext.channel();
|
||||
public void doHandler(Channel channel, NettyProxyMsg nettyProxyMsg) {
|
||||
Channel nextChannel = ChannelAttributeKeyUtils.getNextChannel(channel);
|
||||
// 把数据转到真实服务
|
||||
ByteBuf buf = channel.config().getAllocator().buffer(nettyProxyMsg.getData().length);
|
||||
|
||||
@@ -1,26 +1,23 @@
|
||||
package org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.udp.advanced;
|
||||
|
||||
import io.netty.channel.Channel;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyChannelContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.permeate.udp.client.AbstractHandleUdpDistributeSingleClientMessageTypeAdvanced;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.context.annotation.Role;
|
||||
|
||||
/**
|
||||
* 接收服务端发送过来的聊天信息
|
||||
*/
|
||||
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
||||
@Slf4j
|
||||
public class ClientHandleUdpDistributeSingleClientMessageTypeAdvanced extends AbstractHandleUdpDistributeSingleClientMessageTypeAdvanced<NettyProxyMsg> {
|
||||
/**
|
||||
* 处理当前数据
|
||||
*
|
||||
* @param nettyChannelContext 当前通道
|
||||
* @param channel 当前通道
|
||||
* @param nettyProxyMsg 通道数据
|
||||
*/
|
||||
@Override
|
||||
protected void doHandler(NettyChannelContext nettyChannelContext, NettyProxyMsg nettyProxyMsg) {
|
||||
protected void doHandler(Channel channel, NettyProxyMsg nettyProxyMsg) {
|
||||
byte[] clientId = nettyProxyMsg.getClientId();
|
||||
byte[] data = nettyProxyMsg.getData();
|
||||
log.info("接收客户端:{},发送过来的聊天信息:{}", new String(clientId), new String(data));
|
||||
|
||||
@@ -3,26 +3,21 @@ package org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.udp.adv
|
||||
import io.netty.channel.Channel;
|
||||
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.NettyRealIdContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyChannelContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.permeate.udp.client.AbstractHandleUdpDistributeSingleClientRealAutoReadConnectTypeAdvanced;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.context.annotation.Role;
|
||||
|
||||
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
||||
@Slf4j
|
||||
public class ClientHandleUdpDistributeSingleClientRealAutoReadConnectTypeAdvanced extends AbstractHandleUdpDistributeSingleClientRealAutoReadConnectTypeAdvanced<NettyProxyMsg> {
|
||||
/**
|
||||
* 处理当前数据
|
||||
*
|
||||
* @param nettyChannelContext 当前通道
|
||||
* @param channel 当前通道
|
||||
* @param nettyProxyMsg 通道数据
|
||||
*/
|
||||
@Override
|
||||
protected void doHandler(NettyChannelContext nettyChannelContext, NettyProxyMsg nettyProxyMsg) {
|
||||
Channel channel = nettyChannelContext.channel();
|
||||
protected void doHandler(Channel channel, NettyProxyMsg nettyProxyMsg) {
|
||||
// 获取访客ID
|
||||
byte[] visitorId = nettyProxyMsg.getVisitorId();
|
||||
// 获取访客对应的真实代理通道
|
||||
|
||||
@@ -1,25 +1,22 @@
|
||||
package org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.udp.advanced;
|
||||
|
||||
import io.netty.channel.Channel;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
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;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyChannelContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.permeate.udp.client.AbstractHandleUdpDistributeSingleClientRealCloseVisitorTypeAdvanced;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.context.annotation.Role;
|
||||
|
||||
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
||||
@Slf4j
|
||||
public class ClientHandleUdpDistributeSingleClientRealCloseVisitorTypeAdvanced extends AbstractHandleUdpDistributeSingleClientRealCloseVisitorTypeAdvanced<NettyProxyMsg> {
|
||||
/**
|
||||
* 处理当前数据
|
||||
*
|
||||
* @param nettyChannelContext 当前通道
|
||||
* @param channel 当前通道
|
||||
* @param nettyProxyMsg 通道数据
|
||||
*/
|
||||
@Override
|
||||
protected void doHandler(NettyChannelContext nettyChannelContext, NettyProxyMsg nettyProxyMsg) {
|
||||
protected void doHandler(Channel channel, NettyProxyMsg nettyProxyMsg) {
|
||||
// 关闭代理的真实通道
|
||||
byte[] visitorId = nettyProxyMsg.getVisitorId();
|
||||
NettyRealIdContext.clear(visitorId);
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
package org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.udp.advanced;
|
||||
|
||||
import io.netty.channel.Channel;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyChannelContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.permeate.udp.client.AbstractHandleUdpDistributeStagingClosedTypeAdvanced;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.context.annotation.Role;
|
||||
|
||||
/**
|
||||
* 服务端下发暂存关闭消息处理
|
||||
*/
|
||||
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
||||
@Slf4j
|
||||
public class ClientHandleUdpDistributeStagingClosedTypeAdvanced extends AbstractHandleUdpDistributeStagingClosedTypeAdvanced<NettyProxyMsg> {
|
||||
|
||||
@@ -18,11 +15,11 @@ public class ClientHandleUdpDistributeStagingClosedTypeAdvanced extends Abstract
|
||||
/**
|
||||
* 处理当前数据
|
||||
*
|
||||
* @param nettyChannelContext 当前通道
|
||||
* @param channel 当前通道
|
||||
* @param msg 通道数据
|
||||
*/
|
||||
@Override
|
||||
protected void doHandler(NettyChannelContext nettyChannelContext, NettyProxyMsg msg) {
|
||||
protected void doHandler(Channel channel, NettyProxyMsg msg) {
|
||||
String clientId = new String(msg.getClientId());
|
||||
log.info("客户端:{}离线暂存关闭", clientId);
|
||||
// 修改redis 客户端暂存状态
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
package org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.udp.advanced;
|
||||
|
||||
import io.netty.channel.Channel;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyChannelContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.permeate.udp.client.AbstractHandleUdpDistributeStagingOpenedTypeAdvanced;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.context.annotation.Role;
|
||||
|
||||
/**
|
||||
* 服务端下发暂存开启消息处理
|
||||
*/
|
||||
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
||||
@Slf4j
|
||||
public class ClientHandleUdpDistributeStagingOpenedTypeAdvanced extends AbstractHandleUdpDistributeStagingOpenedTypeAdvanced<NettyProxyMsg> {
|
||||
|
||||
@@ -22,11 +19,11 @@ public class ClientHandleUdpDistributeStagingOpenedTypeAdvanced extends Abstract
|
||||
/**
|
||||
* 处理当前数据
|
||||
*
|
||||
* @param nettyChannelContext 当前通道
|
||||
* @param channel 当前通道
|
||||
* @param msg 通道数据
|
||||
*/
|
||||
@Override
|
||||
protected void doHandler(NettyChannelContext nettyChannelContext, NettyProxyMsg msg) {
|
||||
protected void doHandler(Channel channel, NettyProxyMsg msg) {
|
||||
String clientId = new String(msg.getClientId());
|
||||
//客户端:{}离线暂存开启
|
||||
log.warn("Client: {} Offline temporary storage enabled", new String(msg.getClientId()));
|
||||
|
||||
@@ -9,7 +9,7 @@ import io.netty.handler.timeout.IdleStateEvent;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.udp.socket.NettyUdpClientSocket;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.constant.UdpMessageType;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.adapter.ChannelTypeAdapter;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
@@ -47,7 +47,7 @@ public class NettyUdpClientHandler extends SimpleChannelInboundHandler<NettyProx
|
||||
// 接收服务端、或者是代理端的信息
|
||||
Channel channel = ctx.channel();
|
||||
// log.info("type:{},clientId:{},data:{}",msg.getMysqlType(),new String(msg.getClientId()),new String(msg.getData()));
|
||||
channelTypeAdapter.handler(ctx, msg);
|
||||
channelTypeAdapter.handler(channel, msg);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -64,7 +64,7 @@ public class NettyUdpClientHandler extends SimpleChannelInboundHandler<NettyProx
|
||||
NettyProxyMsg nettyMsg = new NettyProxyMsg();
|
||||
nettyMsg.setType(UdpMessageType.UDP_CLIENT_CHANNEL_ACTIVE);
|
||||
nettyMsg.setClientId(clientId);
|
||||
channelTypeAdapter.handler(ctx, nettyMsg);
|
||||
channelTypeAdapter.handler(channel, nettyMsg);
|
||||
|
||||
|
||||
}
|
||||
@@ -108,7 +108,7 @@ public class NettyUdpClientHandler extends SimpleChannelInboundHandler<NettyProx
|
||||
NettyProxyMsg nettyMsg = new NettyProxyMsg();
|
||||
nettyMsg.setType(UdpMessageType.UDP_DISTRIBUTE_CLIENT_DISCONNECTION_NOTIFICATION);
|
||||
nettyMsg.setClientId(clientId.getBytes(StandardCharsets.UTF_8));
|
||||
channelTypeAdapter.handler(ctx, nettyMsg);
|
||||
channelTypeAdapter.handler(channel, nettyMsg);
|
||||
ctx.close();
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import io.netty.channel.SimpleChannelInboundHandler;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
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.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
|
||||
|
||||
/**
|
||||
|
||||
@@ -6,7 +6,7 @@ import io.netty.channel.ChannelHandlerContext;
|
||||
import io.netty.channel.SimpleChannelInboundHandler;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.constant.UdpMessageType;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
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;
|
||||
|
||||
@@ -29,7 +29,7 @@ public class NettyUdpClientPermeateClientTransferHandler extends SimpleChannelIn
|
||||
@Override
|
||||
public void channelRead0(ChannelHandlerContext ctx, NettyProxyMsg nettyProxyMsg) throws Exception {
|
||||
Channel channel = ctx.channel();
|
||||
channelTypeAdapter.handler(ctx, nettyProxyMsg);
|
||||
channelTypeAdapter.handler(channel, nettyProxyMsg);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import io.netty.channel.ChannelHandlerContext;
|
||||
import io.netty.channel.SimpleChannelInboundHandler;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.constant.UdpMessageType;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
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;
|
||||
|
||||
@@ -29,7 +29,7 @@ public class NettyUdpClientPermeateClientTransferRealHandler extends SimpleChann
|
||||
@Override
|
||||
public void channelRead0(ChannelHandlerContext ctx, NettyProxyMsg nettyProxyMsg) throws Exception {
|
||||
Channel channel = ctx.channel();
|
||||
channelTypeAdapter.handler(ctx, nettyProxyMsg);
|
||||
channelTypeAdapter.handler(channel, nettyProxyMsg);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ import org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.udp.sock
|
||||
import org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.udp.socket.NettyUdpClientPermeateServerVisitorTransferSocket;
|
||||
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.advanced.payload.NettyProxyMsg;
|
||||
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.utils.ChannelAttributeKeyUtils;
|
||||
|
||||
|
||||
@@ -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.common.constant.UdpMessageType;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
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;
|
||||
|
||||
@@ -31,7 +31,7 @@ public class NettyUdpClientPermeateServerTransferHandler extends SimpleChannelIn
|
||||
@Override
|
||||
public void channelRead0(ChannelHandlerContext ctx, NettyProxyMsg nettyProxyMsg) throws Exception {
|
||||
Channel channel = ctx.channel();
|
||||
channelTypeAdapter.handler(ctx, nettyProxyMsg);
|
||||
channelTypeAdapter.handler(channel, nettyProxyMsg);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.NettyCli
|
||||
import org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.udp.advanced.ClientHandleUdpDistributeClientTransferServerPermeateChannelConnectionSuccessfulTypeAdvanced;
|
||||
import org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.udp.socket.NettyUdpClientPermeateServerVisitorTransferSocket;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.constant.UdpMessageType;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
@@ -8,7 +8,7 @@ import io.netty.channel.SimpleChannelInboundHandler;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
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.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
|
||||
import org.wu.framework.core.utils.ObjectUtils;
|
||||
|
||||
|
||||
@@ -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.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.NettyProxyMsg;
|
||||
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;
|
||||
@@ -31,7 +31,7 @@ public class NettyUdpServerPermeateClientTransferHandler extends SimpleChannelIn
|
||||
@Override
|
||||
public void channelRead0(ChannelHandlerContext ctx, NettyProxyMsg nettyProxyMsg) throws Exception {
|
||||
Channel channel = ctx.channel();
|
||||
channelTypeAdapter.handler(ctx, nettyProxyMsg);
|
||||
channelTypeAdapter.handler(channel, nettyProxyMsg);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -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.permeate.udp.filter.NettyUdpClientPermeateClientRealFilter;
|
||||
import org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.udp.filter.NettyUdpClientPermeateClientTransferRealFilter;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
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.constant.UdpMessageType;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.adapter.ChannelTypeAdapter;
|
||||
|
||||
@@ -10,7 +10,7 @@ import org.framework.lazy.cloud.network.heartbeat.client.config.NettyClientPrope
|
||||
import org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.NettyClientPermeateClientVisitor;
|
||||
import org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.udp.filter.NettyUdpClientPermeateClientTransferFilter;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.constant.UdpMessageType;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
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;
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import org.framework.lazy.cloud.network.heartbeat.client.config.NettyClientPrope
|
||||
import org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.NettyClientPermeateServerVisitor;
|
||||
import org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.udp.filter.NettyUdpClientPermeateServerTransferFilter;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.constant.UdpMessageType;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
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;
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ import org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.NettyCli
|
||||
import org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.event.ClientChangeEvent;
|
||||
import org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.udp.filter.NettyUdpClientFilter;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.constant.UdpMessageType;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
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;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelTypeAdvanced;
|
||||
|
||||