From 72d79b5ccf8bc8b6b0f3b72ca25d97d135b8adeb Mon Sep 17 00:00:00 2001 From: aoshiguchen <1052045476@qq.com> Date: Tue, 20 Jan 2026 10:17:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=97=A0=E7=94=A8=E7=9A=84?= =?UTF-8?q?=E7=BC=93=E5=AD=98=EF=BC=9Alicense=20->=20=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E7=AB=AF=E5=8F=A3=E6=98=A0=E5=B0=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../neutrinoproxy/server/util/ProxyUtil.java | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/neutrino-proxy-server/src/main/java/org/dromara/neutrinoproxy/server/util/ProxyUtil.java b/neutrino-proxy-server/src/main/java/org/dromara/neutrinoproxy/server/util/ProxyUtil.java index 579390f7..5a1787b6 100644 --- a/neutrino-proxy-server/src/main/java/org/dromara/neutrinoproxy/server/util/ProxyUtil.java +++ b/neutrino-proxy-server/src/main/java/org/dromara/neutrinoproxy/server/util/ProxyUtil.java @@ -28,16 +28,16 @@ import java.util.stream.Collectors; */ public class ProxyUtil { public static final AttributeKey CHANNEL_ATTR_KEY = AttributeKey.valueOf("netty.channel.attr"); - /** - * license -> 服务端口映射 - */ - private static final Map> licenseToServerPortMap = new HashMap<>(); +// /** +// * license -> 服务端口映射 +// */ +// private static final Map> licenseToServerPortMap = new HashMap<>(); /** * 代理信息映射 e.g.: 9104 -> 127.0.0.1:8848 */ private static final Map proxyInfoMap = new ConcurrentHashMap<>(); /** - * 服务端口 -> 指令通道映射 + * 服务端口 -> 指令通道映射proxyInfoMap */ private static Map serverPortToCmdChannelMap = new ConcurrentHashMap<>(); /** @@ -92,14 +92,14 @@ public class ProxyUtil { * @param proxyMappingList 代理映射集合 */ public static void initProxyInfo(Integer licenseId, List proxyMappingList) { - licenseToServerPortMap.put(licenseId, new HashSet<>()); +// licenseToServerPortMap.put(licenseId, new HashSet<>()); addProxyInfo(licenseId, proxyMappingList); } public static void addProxyInfo(Integer licenseId, List proxyMappingList) { if (!CollectionUtil.isEmpty(proxyMappingList)) { for (ProxyMapping proxyMapping : proxyMappingList) { - licenseToServerPortMap.get(licenseId).add(proxyMapping.getServerPort()); +// licenseToServerPortMap.get(licenseId).add(proxyMapping.getServerPort()); proxyInfoMap.put(proxyMapping.getServerPort(), proxyMapping.getLanInfo()); } } @@ -109,7 +109,7 @@ public class ProxyUtil { if (null == licenseId || null == proxyMapping) { return; } - licenseToServerPortMap.get(licenseId).add(proxyMapping.getServerPort()); +// licenseToServerPortMap.get(licenseId).add(proxyMapping.getServerPort()); proxyInfoMap.put(proxyMapping.getServerPort(), proxyMapping.getLanInfo()); } @@ -117,14 +117,14 @@ public class ProxyUtil { proxyInfoMap.remove(serverPort); } - /** - * 根据licenseId获取服务端端口集合 - * @param licenseId licenseId - * @return 服务端端口集合 - */ - public static Set getServerPortsByLicenseKey(Integer licenseId) { - return licenseToServerPortMap.get(licenseId); - } +// /** +// * 根据licenseId获取服务端端口集合 +// * @param licenseId licenseId +// * @return 服务端端口集合 +// */ +// public static Set getServerPortsByLicenseKey(Integer licenseId) { +// return licenseToServerPortMap.get(licenseId); +// } /** * 根据服务端端口获取客户端代理信息