From d3eb245db141b9fe69b8bcca7b7194ebde9b761f Mon Sep 17 00:00:00 2001 From: aoshiguchen <1052045476@qq.com> Date: Mon, 23 Oct 2023 21:24:48 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=AE=A2=E6=88=B7=E7=AB=AFna?= =?UTF-8?q?tive=E7=BC=96=E8=AF=91=E6=97=B6=E5=90=AF=E5=8A=A8udp=E7=AB=AF?= =?UTF-8?q?=E5=8F=A3=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 +- Native测试.txt | 52 +++++++++---------- .../client/util/UdpServerUtil.java | 5 ++ 3 files changed, 32 insertions(+), 27 deletions(-) diff --git a/.gitignore b/.gitignore index dfc12eff..0e6c3a3b 100644 --- a/.gitignore +++ b/.gitignore @@ -57,5 +57,5 @@ hs_err_pid* neutrino-proxy-vuepress/deploy.sh .NEUTRINO_PROXY_CLIENT_ID logs -**/ixxxk.com/** +**/cert/** neutrino-proxy-server/src/main/resources/static/** diff --git a/Native测试.txt b/Native测试.txt index 6c5c79fe..4976e8ca 100644 --- a/Native测试.txt +++ b/Native测试.txt @@ -2,8 +2,8 @@ - [x] 服务端编译、启动成功 - [x] 客户端编译、启动成功 - [ ] 配置 - - [ ] 启动参数 - - [ ] 外部配置文件 + - [x] 启动参数 + - [x] 外部配置文件 - [ ] 环境变量 - [ ] 日志 - [x] 控制台输出 @@ -20,34 +20,34 @@ # 服务端管理后台 - [x] 登录成功 -- [ ] 首页统计 -- [ ] 代理配置 - - [ ] license管理 - - [ ] 端口映射 -- [ ] 系统管理 - - [ ] 用户管理 - - [ ] 端口分组管理 - - [ ] 端口池管理 - - [ ] 协议管理 - - [ ] 调度管理 -- [ ] 报表管理 - - [ ] 用户流量报表 - - [ ] License流量报表 - - [ ] 用户流量月度明细 - - [ ] License流量月度明细 -- [ ] 日志管理 - - [ ] 调度日志 - - [ ] 登录日志 - - [ ] 客户端连接日志 +- [x] 首页统计 +- [x] 代理配置 + - [x] license管理 + - [x] 端口映射 +- [x] 系统管理 + - [x] 用户管理 + - [x] 端口分组管理 + - [x] 端口池管理 + - [x] 协议管理 + - [x] 调度管理 +- [x] 报表管理 + - [x] 用户流量报表 + - [x] License流量报表 + - [x] 用户流量月度明细 + - [x] License流量月度明细 +- [x] 日志管理 + - [x] 调度日志 + - [x] 登录日志 + - [x] 客户端连接日志 # 客户端 -- [ ] 重连机制 +- [x] 重连机制 # 代理 - [x] TCP代理 -- [ ] HTTP(S)代理 - - [ ] 端口访问 - - [ ] HTTP域名访问 - - [ ] HTTPS域名访问 +- [x] HTTP(S)代理 + - [x] 端口访问 + - [x] HTTP域名访问 + - [x] HTTPS域名访问 - [ ] UDP代理 diff --git a/neutrino-proxy-client/src/main/java/org/dromara/neutrinoproxy/client/util/UdpServerUtil.java b/neutrino-proxy-client/src/main/java/org/dromara/neutrinoproxy/client/util/UdpServerUtil.java index cd9f9ea0..b4f57eda 100644 --- a/neutrino-proxy-client/src/main/java/org/dromara/neutrinoproxy/client/util/UdpServerUtil.java +++ b/neutrino-proxy-client/src/main/java/org/dromara/neutrinoproxy/client/util/UdpServerUtil.java @@ -11,6 +11,7 @@ import org.dromara.neutrinoproxy.client.config.ProxyConfig; import org.dromara.neutrinoproxy.client.constant.Constants; import org.dromara.neutrinoproxy.client.core.CustomThreadFactory; import org.dromara.neutrinoproxy.core.ProxyMessage; +import org.noear.solon.core.runtime.NativeDetector; import java.util.*; import java.util.concurrent.*; @@ -46,6 +47,10 @@ public class UdpServerUtil { * @param proxyConfig */ public static void initCache(ProxyConfig proxyConfig, Bootstrap udpServerBootstrap) { + // aot 阶段,不初始化UDP服务 + if (NativeDetector.isNotAotRuntime()) { + return; + } if (null == proxyConfig.getClient().getUdp() || StringUtils.isEmpty(proxyConfig.getClient().getUdp().getPuppetPortRange())) { return; }