mirror of
https://gitee.com/wujiawei1207537021/wu-lazy-cloud-network.git
synced 2025-06-07 22:07:55 +08:00
[fix] socks、http代理 添加流量计费
This commit is contained in:
parent
9cd85abe1d
commit
ddb709c3a8
@ -1,8 +1,8 @@
|
||||
package org.framework.lazy.cloud.network.heartbeat.common.advanced.flow.proxy;
|
||||
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelFlowEnum;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelProxyFlowTypeEnum;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelProxyTypeEnum;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelProtocolType;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelProxyType;
|
||||
|
||||
public interface ChannelProxyFlow {
|
||||
|
||||
@ -36,15 +36,15 @@ public interface ChannelProxyFlow {
|
||||
|
||||
/**
|
||||
* 代理流量类型
|
||||
* @see ChannelProxyFlowTypeEnum
|
||||
* @see ChannelProtocolType
|
||||
*/
|
||||
ChannelProxyFlowTypeEnum channelProxyFlowTypeEnum();
|
||||
ChannelProtocolType channelProtocolType();
|
||||
|
||||
/**
|
||||
* 代理类型
|
||||
* @see ChannelProxyTypeEnum
|
||||
* @see ChannelProxyType
|
||||
*/
|
||||
ChannelProxyTypeEnum channelProxyTypeEnum();
|
||||
ChannelProxyType channelProxyType();
|
||||
|
||||
/**
|
||||
* 流量
|
||||
|
@ -8,7 +8,7 @@ import lombok.Getter;
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum ChannelProxyFlowTypeEnum {
|
||||
public enum ChannelProtocolType {
|
||||
|
||||
// HTTP
|
||||
HTTP,
|
@ -8,7 +8,7 @@ import lombok.Getter;
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum ChannelProxyTypeEnum {
|
||||
public enum ChannelProxyType {
|
||||
|
||||
SERVER_PROXY_SERVER("服务端代理服务端"),
|
||||
SERVER_PROXY_CLIENT("服务端远程客户端"),
|
@ -312,12 +312,12 @@ public class ServerAutoConfiguration {
|
||||
return new ServerHandleSocksReportServerProxyClientConnectionSuccessTypeAdvanced();
|
||||
}
|
||||
@Bean
|
||||
public ServerHandleSocksReportServerProxyClientResponseTypeAdvanced serverHandleSocksReportServerProxyClientResponseTypeAdvanced(){
|
||||
return new ServerHandleSocksReportServerProxyClientResponseTypeAdvanced();
|
||||
public ServerHandleSocksReportServerProxyClientResponseTypeAdvanced serverHandleSocksReportServerProxyClientResponseTypeAdvanced(ChannelProxyFlowAdapter channelProxyFlowAdapter){
|
||||
return new ServerHandleSocksReportServerProxyClientResponseTypeAdvanced(channelProxyFlowAdapter);
|
||||
}
|
||||
@Bean
|
||||
public ServerHandleSocksReportServerProxyClientRequestTypeAdvanced serverHandleSocksReportServerProxyClientRequestTypeAdvanced(){
|
||||
return new ServerHandleSocksReportServerProxyClientRequestTypeAdvanced();
|
||||
public ServerHandleSocksReportServerProxyClientRequestTypeAdvanced serverHandleSocksReportServerProxyClientRequestTypeAdvanced(ChannelProxyFlowAdapter channelProxyFlowAdapter){
|
||||
return new ServerHandleSocksReportServerProxyClientRequestTypeAdvanced(channelProxyFlowAdapter);
|
||||
}
|
||||
@Bean
|
||||
public ServerHandleSocksReportServerProxyClientTransferCloseTypeAdvanced serverHandleSocksReportServerProxyClientTransferCloseTypeAdvanced(){
|
||||
|
@ -4,8 +4,8 @@ import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.flow.proxy.ChannelProxyFlow;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelFlowEnum;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelProxyFlowTypeEnum;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelProxyTypeEnum;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelProtocolType;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelProxyType;
|
||||
|
||||
@Builder
|
||||
@Data
|
||||
@ -14,8 +14,8 @@ public class ServerChannelProxyFlow implements ChannelProxyFlow {
|
||||
private String ip;
|
||||
private Integer port;
|
||||
private ChannelFlowEnum channelFlowEnum;
|
||||
private ChannelProxyFlowTypeEnum channelProxyFlowTypeEnum;
|
||||
private ChannelProxyTypeEnum channelProxyTypeEnum;
|
||||
private ChannelProtocolType channelProtocolType;
|
||||
private ChannelProxyType channelProxyType;
|
||||
private Integer flow;
|
||||
|
||||
/**
|
||||
@ -62,21 +62,21 @@ public class ServerChannelProxyFlow implements ChannelProxyFlow {
|
||||
/**
|
||||
* 代理流量类型
|
||||
*
|
||||
* @see ChannelProxyFlowTypeEnum
|
||||
* @see ChannelProtocolType
|
||||
*/
|
||||
@Override
|
||||
public ChannelProxyFlowTypeEnum channelProxyFlowTypeEnum() {
|
||||
return channelProxyFlowTypeEnum;
|
||||
public ChannelProtocolType channelProtocolType() {
|
||||
return channelProtocolType;
|
||||
}
|
||||
|
||||
/**
|
||||
* 代理类型
|
||||
*
|
||||
* @see ChannelProxyTypeEnum
|
||||
* @see ChannelProxyType
|
||||
*/
|
||||
@Override
|
||||
public ChannelProxyTypeEnum channelProxyTypeEnum() {
|
||||
return channelProxyTypeEnum;
|
||||
public ChannelProxyType channelProxyType() {
|
||||
return channelProxyType;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -12,8 +12,8 @@ import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyC
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.proxy.http.server.AbstractHandleHttpReportClientProxyClientConnectionTransferTypeAdvanced;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.constant.ProxyMessageType;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelFlowEnum;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelProxyFlowTypeEnum;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelProxyTypeEnum;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelProtocolType;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelProxyType;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
|
||||
import org.framework.lazy.cloud.network.heartbeat.server.netty.flow.proxy.ServerChannelProxyFlow;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
@ -87,8 +87,8 @@ public class ServerHandleHttpReportClientProxyClientTransferRequestTypeAdvanced
|
||||
.port(targetPort)
|
||||
.ip(targetIpString)
|
||||
.clientId(new String(clientId))
|
||||
.channelProxyTypeEnum(ChannelProxyTypeEnum.CLIENT_PROXY_CLIENT)
|
||||
.channelProxyFlowTypeEnum(ChannelProxyFlowTypeEnum.HTTP)
|
||||
.channelProxyType(ChannelProxyType.CLIENT_PROXY_CLIENT)
|
||||
.channelProtocolType(ChannelProtocolType.HTTP)
|
||||
.flow(data.length)
|
||||
.build();
|
||||
channelProxyFlowAdapter.asyncHandler(channel, serverChannelFlow);
|
||||
|
@ -3,17 +3,15 @@ package org.framework.lazy.cloud.network.heartbeat.server.netty.proxy.http.advan
|
||||
|
||||
import io.netty.channel.Channel;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.adapter.ChannelFlowAdapter;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.adapter.ChannelProxyFlowAdapter;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyChannelContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.proxy.http.server.AbstractHandleHttpReportClientProxyClientTransferResponseTypeAdvanced;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.constant.ProxyMessageType;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelFlowEnum;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelProxyFlowTypeEnum;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelProxyTypeEnum;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelProtocolType;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelProxyType;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
|
||||
import org.framework.lazy.cloud.network.heartbeat.server.netty.flow.ServerChannelFlow;
|
||||
import org.framework.lazy.cloud.network.heartbeat.server.netty.flow.proxy.ServerChannelProxyFlow;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.context.annotation.Role;
|
||||
@ -69,8 +67,8 @@ public class ServerHandleHttpReportClientProxyClientTransferResponseTypeAdvanced
|
||||
.port(targetPort)
|
||||
.ip(targetIp)
|
||||
.clientId(clientId)
|
||||
.channelProxyTypeEnum(ChannelProxyTypeEnum.CLIENT_PROXY_CLIENT)
|
||||
.channelProxyFlowTypeEnum(ChannelProxyFlowTypeEnum.HTTP)
|
||||
.channelProxyType(ChannelProxyType.CLIENT_PROXY_CLIENT)
|
||||
.channelProtocolType(ChannelProtocolType.HTTP)
|
||||
.flow(responseProxyMsg.getData().length)
|
||||
.build();
|
||||
channelProxyFlowAdapter.asyncHandler(channel, serverChannelFlow);
|
||||
|
@ -10,8 +10,8 @@ import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelT
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyChannelContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.proxy.http.server.AbstractHandleHttpReportClientProxyServerTransferRequestTypeAdvanced;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelFlowEnum;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelProxyFlowTypeEnum;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelProxyTypeEnum;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelProtocolType;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelProxyType;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
|
||||
import org.framework.lazy.cloud.network.heartbeat.server.netty.flow.proxy.ServerChannelProxyFlow;
|
||||
import org.framework.lazy.cloud.network.heartbeat.server.netty.proxy.http.NettyHttpClientProxyServerTransfer;
|
||||
@ -88,8 +88,8 @@ public class ServerHandleHttpReportClientProxyServerTransferRequestTypeAdvanced
|
||||
.port(targetPort)
|
||||
.ip(targetIpString)
|
||||
.clientId(clientIdString)
|
||||
.channelProxyTypeEnum(ChannelProxyTypeEnum.CLIENT_PROXY_SEVER)
|
||||
.channelProxyFlowTypeEnum(ChannelProxyFlowTypeEnum.HTTP)
|
||||
.channelProxyType(ChannelProxyType.CLIENT_PROXY_SEVER)
|
||||
.channelProtocolType(ChannelProtocolType.HTTP)
|
||||
.flow(data.length)
|
||||
.build();
|
||||
channelProxyFlowAdapter.asyncHandler(channel, serverChannelFlow);
|
||||
|
@ -9,8 +9,8 @@ import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyP
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.proxy.http.server.AbstractHandleHttpReportClientProxyServerTransferResponseTypeAdvanced;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.constant.ProxyMessageType;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelFlowEnum;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelProxyFlowTypeEnum;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelProxyTypeEnum;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelProtocolType;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelProxyType;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
|
||||
import org.framework.lazy.cloud.network.heartbeat.server.netty.flow.proxy.ServerChannelProxyFlow;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
@ -67,8 +67,8 @@ public class ServerHandleHttpReportClientProxyServerTransferResponseTypeAdvanced
|
||||
.port(targetPort)
|
||||
.ip(targetIp)
|
||||
.clientId(clientId)
|
||||
.channelProxyTypeEnum(ChannelProxyTypeEnum.CLIENT_PROXY_SEVER)
|
||||
.channelProxyFlowTypeEnum(ChannelProxyFlowTypeEnum.HTTP)
|
||||
.channelProxyType(ChannelProxyType.CLIENT_PROXY_SEVER)
|
||||
.channelProtocolType(ChannelProtocolType.HTTP)
|
||||
.flow(data.length)
|
||||
.build();
|
||||
channelProxyFlowAdapter.asyncHandler(channel, serverChannelFlow);
|
||||
|
@ -11,8 +11,8 @@ import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyC
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.proxy.http.server.AbstractHandleHttpReportServerProxyClientTransferChannelInitSuccessfulTypeAdvanced;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.constant.ProxyMessageType;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelFlowEnum;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelProxyFlowTypeEnum;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelProxyTypeEnum;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelProtocolType;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelProxyType;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
|
||||
import org.framework.lazy.cloud.network.heartbeat.server.netty.flow.proxy.ServerChannelProxyFlow;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
@ -88,8 +88,8 @@ public class ServerHandleHttpReportServerProxyClientTransferRequestTypeAdvanced
|
||||
.port(targetPort)
|
||||
.ip(targetIpString)
|
||||
.clientId(new String(clientId))
|
||||
.channelProxyTypeEnum(ChannelProxyTypeEnum.SERVER_PROXY_CLIENT)
|
||||
.channelProxyFlowTypeEnum(ChannelProxyFlowTypeEnum.HTTP)
|
||||
.channelProxyType(ChannelProxyType.SERVER_PROXY_CLIENT)
|
||||
.channelProtocolType(ChannelProtocolType.HTTP)
|
||||
.flow(nettyByteBufData.getData().length)
|
||||
.build();
|
||||
channelProxyFlowAdapter.asyncHandler(channel, serverChannelFlow);
|
||||
|
@ -9,8 +9,8 @@ import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyP
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyChannelContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.proxy.http.server.AbstractHandleHttpReportServerProxyClientTransferResponseTypeAdvanced;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelFlowEnum;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelProxyFlowTypeEnum;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelProxyTypeEnum;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelProtocolType;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelProxyType;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
|
||||
import org.framework.lazy.cloud.network.heartbeat.server.netty.flow.proxy.ServerChannelProxyFlow;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
@ -62,8 +62,8 @@ public class ServerHandleHttpReportServerProxyClientTransferResponseTypeAdvanced
|
||||
.port(targetPort)
|
||||
.ip(targetIp)
|
||||
.clientId(targetClientId)
|
||||
.channelProxyTypeEnum(ChannelProxyTypeEnum.SERVER_PROXY_CLIENT)
|
||||
.channelProxyFlowTypeEnum(ChannelProxyFlowTypeEnum.HTTP)
|
||||
.channelProxyType(ChannelProxyType.SERVER_PROXY_CLIENT)
|
||||
.channelProtocolType(ChannelProtocolType.HTTP)
|
||||
.flow(nettyProxyMsg.getData().length)
|
||||
.build();
|
||||
channelProxyFlowAdapter.asyncHandler(channel, serverChannelFlow);
|
||||
|
@ -9,8 +9,8 @@ import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyP
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.proxy.socks.server.AbstractHandleSocksReportClientProxyClientTransferRequestTypeAdvanced;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.constant.ProxyMessageType;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelFlowEnum;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelProxyFlowTypeEnum;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelProxyTypeEnum;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelProtocolType;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelProxyType;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
|
||||
import org.framework.lazy.cloud.network.heartbeat.server.netty.flow.proxy.ServerChannelProxyFlow;
|
||||
import org.framework.lazy.cloud.network.heartbeat.server.netty.proxy.socks.handler.NettySocksClientProxyServerRealHandler;
|
||||
@ -64,8 +64,8 @@ public class ServerHandleSocksReportClientProxyClientTransferRequestTypeAdvanced
|
||||
.port(targetPort)
|
||||
.ip(targetIp)
|
||||
.clientId(clientId)
|
||||
.channelProxyTypeEnum(ChannelProxyTypeEnum.CLIENT_PROXY_CLIENT)
|
||||
.channelProxyFlowTypeEnum(ChannelProxyFlowTypeEnum.SOCKS)
|
||||
.channelProxyType(ChannelProxyType.CLIENT_PROXY_CLIENT)
|
||||
.channelProtocolType(ChannelProtocolType.SOCKS)
|
||||
.flow(nettyProxyMsg.getData().length)
|
||||
.build();
|
||||
channelProxyFlowAdapter.asyncHandler(transferChannel, serverChannelFlow);
|
||||
|
@ -9,8 +9,8 @@ import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyP
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.proxy.socks.server.AbstractHandleSocksReportClientProxyClientTransferResponseTypeAdvanced;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.constant.ProxyMessageType;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelFlowEnum;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelProxyFlowTypeEnum;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelProxyTypeEnum;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelProtocolType;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelProxyType;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
|
||||
import org.framework.lazy.cloud.network.heartbeat.server.netty.flow.proxy.ServerChannelProxyFlow;
|
||||
import org.framework.lazy.cloud.network.heartbeat.server.netty.proxy.socks.handler.NettySocksClientProxyServerRealHandler;
|
||||
@ -63,8 +63,8 @@ public class ServerHandleSocksReportClientProxyClientTransferResponseTypeAdvance
|
||||
.ip(targetIp)
|
||||
.port(targetPort)
|
||||
.clientId(clientId)
|
||||
.channelProxyTypeEnum(ChannelProxyTypeEnum.CLIENT_PROXY_CLIENT)
|
||||
.channelProxyFlowTypeEnum(ChannelProxyFlowTypeEnum.SOCKS)
|
||||
.channelProxyType(ChannelProxyType.CLIENT_PROXY_CLIENT)
|
||||
.channelProtocolType(ChannelProtocolType.SOCKS)
|
||||
.flow(nettyProxyMsg.getData().length)
|
||||
.build();
|
||||
channelProxyFlowAdapter.asyncHandler(nextChannel, serverChannelFlow);
|
||||
|
@ -9,8 +9,8 @@ import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyC
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.proxy.socks.server.AbstractHandleSocksReportClientProxyServerTransferRequestTypeAdvanced;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelFlowEnum;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelProxyFlowTypeEnum;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelProxyTypeEnum;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelProtocolType;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelProxyType;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
|
||||
import org.framework.lazy.cloud.network.heartbeat.server.netty.flow.proxy.ServerChannelProxyFlow;
|
||||
import org.framework.lazy.cloud.network.heartbeat.server.netty.proxy.socks.handler.NettySocksClientProxyServerRealHandler;
|
||||
@ -62,8 +62,8 @@ public class ServerHandleSocksReportClientProxyServerTransferRequestTypeAdvanced
|
||||
.port(targetPort)
|
||||
.ip(targetIp)
|
||||
.clientId(clientId)
|
||||
.channelProxyTypeEnum(ChannelProxyTypeEnum.CLIENT_PROXY_SEVER)
|
||||
.channelProxyFlowTypeEnum(ChannelProxyFlowTypeEnum.SOCKS)
|
||||
.channelProxyType(ChannelProxyType.CLIENT_PROXY_SEVER)
|
||||
.channelProtocolType(ChannelProtocolType.SOCKS)
|
||||
.flow(nettyProxyMsg.getData().length)
|
||||
.build();
|
||||
channelProxyFlowAdapter.asyncHandler(transferChannel, serverChannelFlow);
|
||||
|
@ -7,12 +7,11 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.adapter.ChannelProxyFlowAdapter;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyChannelContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.proxy.http.server.AbstractHandleHttpReportClientProxyServerTransferResponseTypeAdvanced;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.proxy.socks.server.AbstractHandleSocksReportClientProxyServerTransferResponseTypeAdvanced;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.constant.ProxyMessageType;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelFlowEnum;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelProxyFlowTypeEnum;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelProxyTypeEnum;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelProtocolType;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelProxyType;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
|
||||
import org.framework.lazy.cloud.network.heartbeat.server.netty.flow.proxy.ServerChannelProxyFlow;
|
||||
import org.framework.lazy.cloud.network.heartbeat.server.netty.proxy.socks.handler.NettySocksClientProxyServerRealHandler;
|
||||
@ -65,8 +64,8 @@ public class ServerHandleSocksReportClientProxyServerTransferResponseTypeAdvance
|
||||
.ip(targetIp)
|
||||
.port(targetPort)
|
||||
.clientId(clientId)
|
||||
.channelProxyTypeEnum(ChannelProxyTypeEnum.CLIENT_PROXY_SEVER)
|
||||
.channelProxyFlowTypeEnum(ChannelProxyFlowTypeEnum.SOCKS)
|
||||
.channelProxyType(ChannelProxyType.CLIENT_PROXY_SEVER)
|
||||
.channelProtocolType(ChannelProtocolType.SOCKS)
|
||||
.flow(nettyProxyMsg.getData().length)
|
||||
.build();
|
||||
channelProxyFlowAdapter.asyncHandler(nextChannel, serverChannelFlow);
|
||||
|
@ -10,8 +10,8 @@ import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyP
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.proxy.socks.server.AbstractHandleSocksReportServerProxyClientRequestTypeAdvanced;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.constant.ProxyMessageType;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelFlowEnum;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelProxyFlowTypeEnum;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelProxyTypeEnum;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelProtocolType;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelProxyType;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
|
||||
import org.framework.lazy.cloud.network.heartbeat.server.netty.flow.proxy.ServerChannelProxyFlow;
|
||||
import org.framework.lazy.cloud.network.heartbeat.server.netty.proxy.socks.handler.NettySocksClientProxyServerRealHandler;
|
||||
@ -63,8 +63,8 @@ public class ServerHandleSocksReportServerProxyClientRequestTypeAdvanced
|
||||
.port(targetPort)
|
||||
.ip(targetIp)
|
||||
.clientId("SERVER")
|
||||
.channelProxyTypeEnum(ChannelProxyTypeEnum.SERVER_PROXY_CLIENT)
|
||||
.channelProxyFlowTypeEnum(ChannelProxyFlowTypeEnum.SOCKS)
|
||||
.channelProxyType(ChannelProxyType.SERVER_PROXY_CLIENT)
|
||||
.channelProtocolType(ChannelProtocolType.SOCKS)
|
||||
.flow(nettyProxyMsg.getData().length)
|
||||
.build();
|
||||
channelProxyFlowAdapter.asyncHandler(channel, serverChannelFlow);
|
||||
|
@ -9,8 +9,8 @@ import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyC
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.proxy.socks.server.AbstractHandleSocksReportServerProxyClientResponseTypeAdvanced;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelFlowEnum;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelProxyFlowTypeEnum;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelProxyTypeEnum;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelProtocolType;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.enums.ChannelProxyType;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
|
||||
import org.framework.lazy.cloud.network.heartbeat.server.netty.flow.proxy.ServerChannelProxyFlow;
|
||||
import org.framework.lazy.cloud.network.heartbeat.server.netty.proxy.socks.handler.NettySocksClientProxyServerRealHandler;
|
||||
@ -60,8 +60,8 @@ public class ServerHandleSocksReportServerProxyClientResponseTypeAdvanced
|
||||
.ip(targetIp)
|
||||
.port(targetPort)
|
||||
.clientId("SERVER")
|
||||
.channelProxyTypeEnum(ChannelProxyTypeEnum.SERVER_PROXY_CLIENT)
|
||||
.channelProxyFlowTypeEnum(ChannelProxyFlowTypeEnum.SOCKS)
|
||||
.channelProxyType(ChannelProxyType.SERVER_PROXY_CLIENT)
|
||||
.channelProtocolType(ChannelProtocolType.SOCKS)
|
||||
.flow(nettyProxyMsg.getData().length)
|
||||
.build();
|
||||
channelProxyFlowAdapter.asyncHandler(nextChannel, serverChannelFlow);
|
||||
|
Loading…
x
Reference in New Issue
Block a user