mirror of
https://gitee.com/wujiawei1207537021/wu-lazy-cloud-network.git
synced 2025-06-07 22:07:55 +08:00
[fix] 修改唯一索引问题
This commit is contained in:
parent
903ba88787
commit
ca87968469
@ -72,6 +72,7 @@ public class NettySocksClientProxyServerSocket {
|
||||
nettyProxyMsg.setClientTargetIp(targetIp);
|
||||
nettyProxyMsg.setClientTargetPort(targetPort);
|
||||
|
||||
nettyProxyMsg.setClientId(clientId);
|
||||
nettyProxyMsg.setVisitorId(visitorId);
|
||||
nettyProxyMsg.setData(new byte[]{socks5AddressTypeByteValue});
|
||||
transferChannel.writeAndFlush(nettyProxyMsg);
|
||||
|
@ -12,6 +12,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.framework.lazy.cloud.network.heartbeat.client.config.NettyClientProperties;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.NettyTransferChannelContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.adapter.ChannelTypeAdapter;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.HandleChannelTypeAdvanced;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyChannelContext;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.advanced.proxy.socks.server.AbstractHandleSocksReportClientProxyServerConnectionTransferTypeAdvanced;
|
||||
@ -26,6 +27,8 @@ import org.springframework.stereotype.Component;
|
||||
import org.wu.framework.spring.utils.SpringContextHolder;
|
||||
|
||||
import java.net.InetSocketAddress;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
||||
@ -61,7 +64,9 @@ public class ServerHandleSocksReportClientProxyServerConnectTransferTypeAdvanced
|
||||
Socks5AddressType socks5AddressType = Socks5AddressType.valueOf(data[0]);
|
||||
|
||||
|
||||
ChannelTypeAdapter channelTypeAdapter = SpringContextHolder.getBean(ChannelTypeAdapter.class);
|
||||
List<HandleChannelTypeAdvanced> handleChannelTypeAdvancedList = new ArrayList<>(SpringContextHolder.getApplicationContext().getBeansOfType(HandleChannelTypeAdvanced.class).values());
|
||||
|
||||
ChannelTypeAdapter channelTypeAdapter = new ChannelTypeAdapter(handleChannelTypeAdvancedList);
|
||||
// 创建真实代理链接
|
||||
EventLoopGroup group = EventLoopGroupFactory.createClientWorkGroup();
|
||||
Bootstrap b = new Bootstrap();
|
||||
|
@ -37,7 +37,7 @@ public class LazyProxyFlowDO {
|
||||
* 客户端ID
|
||||
*/
|
||||
@Schema(description ="客户端ID",name ="clientId",example = "")
|
||||
@LazyTableField(name="client_id",comment="客户端ID",notNull=true,columnType="varchar(50)")
|
||||
@LazyTableFieldUnique(name="client_id",comment="客户端ID",notNull=true,columnType="varchar(50)")
|
||||
private String clientId;
|
||||
|
||||
/**
|
||||
@ -69,7 +69,7 @@ public class LazyProxyFlowDO {
|
||||
* 目标ip
|
||||
*/
|
||||
@Schema(description ="目标ip",name ="ip",example = "")
|
||||
@LazyTableField(name="ip",comment="目标ip",columnType="varchar(255)")
|
||||
@LazyTableFieldUnique(name="ip",comment="目标ip",columnType="varchar(25)")
|
||||
private String ip;
|
||||
|
||||
/**
|
||||
@ -93,7 +93,7 @@ public class LazyProxyFlowDO {
|
||||
* 目标端口
|
||||
*/
|
||||
@Schema(description ="目标端口",name ="port",example = "")
|
||||
@LazyTableField(name="port",comment="目标端口",columnType="int")
|
||||
@LazyTableFieldUnique(name="port",comment="目标端口",columnType="int")
|
||||
private Integer port;
|
||||
|
||||
/**
|
||||
@ -101,7 +101,7 @@ public class LazyProxyFlowDO {
|
||||
* 协议类型
|
||||
*/
|
||||
@Schema(description ="协议类型",name ="protocolType",example = "")
|
||||
@LazyTableField(name="protocol_type",comment="协议类型",columnType="varchar(255)")
|
||||
@LazyTableFieldUnique(name="protocol_type",comment="协议类型",columnType="varchar(25)")
|
||||
private ChannelProtocolType protocolType;
|
||||
|
||||
/**
|
||||
@ -109,7 +109,7 @@ public class LazyProxyFlowDO {
|
||||
* 代理类型
|
||||
*/
|
||||
@Schema(description ="代理类型",name ="proxyType",example = "")
|
||||
@LazyTableField(name="proxy_type",comment="代理类型",columnType="varchar(255)")
|
||||
@LazyTableFieldUnique(name="proxy_type",comment="代理类型",columnType="varchar(25)")
|
||||
private ChannelProxyType proxyType;
|
||||
|
||||
/**
|
||||
@ -117,7 +117,7 @@ public class LazyProxyFlowDO {
|
||||
* 服务端ID
|
||||
*/
|
||||
@Schema(description ="服务端ID",name ="serverId",example = "")
|
||||
@LazyTableField(name="server_id",comment="服务端ID",notNull=true,columnType="varchar(255)")
|
||||
@LazyTableFieldUnique(name="server_id",comment="服务端ID",notNull=true,columnType="varchar(25)")
|
||||
private String serverId;
|
||||
|
||||
/**
|
||||
|
@ -4,10 +4,10 @@ spring:
|
||||
client:
|
||||
# inet-host: 124.222.48.62
|
||||
# inet-port: 30676
|
||||
inet-host: 124.222.152.160
|
||||
inet-port: 30560
|
||||
# inet-host: 127.0.0.1
|
||||
# inet-port: 7001
|
||||
# inet-host: 124.222.152.160
|
||||
# inet-port: 30560
|
||||
inet-host: 127.0.0.1
|
||||
inet-port: 7001
|
||||
inet-path: wu-lazy-cloud-heartbeat-server
|
||||
client-id: socks-local-proxy # 客户端ID
|
||||
app-key: a4bf4415-25aa-4007-914b-31ec77d1292f
|
||||
|
Loading…
x
Reference in New Issue
Block a user