From bb7fe668b1b7930aee9608deafaa5cca829c9bc6 Mon Sep 17 00:00:00 2001
From: aoshiguchen <1052045476@qq.com>
Date: Sat, 1 Jul 2023 14:17:16 +0800
Subject: [PATCH 1/8] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=AE=98=E7=BD=91?=
=?UTF-8?q?=E6=96=87=E6=A1=A3=EF=BC=8C=E9=A1=B9=E7=9B=AEREADME.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../01.使用教程/01.开始使用/100.常见问题汇总.md | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/neutrino-proxy-vuepress/docs/01.使用教程/01.开始使用/100.常见问题汇总.md b/neutrino-proxy-vuepress/docs/01.使用教程/01.开始使用/100.常见问题汇总.md
index 06062e45..17a86107 100644
--- a/neutrino-proxy-vuepress/docs/01.使用教程/01.开始使用/100.常见问题汇总.md
+++ b/neutrino-proxy-vuepress/docs/01.使用教程/01.开始使用/100.常见问题汇总.md
@@ -4,9 +4,8 @@ date: 2023-07-01 13:35:00
permalink: /pages/a00001/
---
-# 1、客户端启动后连不上服务端,一直在重连
-
-## 1.1、启动日志包含`not found license-key config`相关字样
+## 1、客户端启动后连不上服务端,一直在重连
+### 1.1、启动日志包含`not found license-key config`相关字样
出现这种情况,说明客户端没获取到配置的license,可按如下检查:
- 客户端是否有配置app.yml,app.yml中是否有配置`license-key`
- 客户端启动参数是否指定app.yml配置,若未指定客户端不会加载任何jar外部的配置文件
@@ -15,17 +14,17 @@ permalink: /pages/a00001/
- `java -jar -DLICENSE_KEY=xxxx -DSERVER_IP=x.x.x.x -DSERVER_PORT=9000 -DSSL_ENABLE=false neutrino-proxy-client.jar`
- `java -jar neutrino-proxy-client.jar serverIp=x.x.x.x serverPort=9000 sslEnable=false licenseKey=xxxx`
-## 1.1、配置文件确定都已经配置,且启动参数正确指定了,但是没有出现`认证成功日志`
+### 1.2、配置文件确定都已经配置,且启动参数正确指定了,但是没有出现`认证成功日志`
- 确认客户端配置的`server-ip`,必须是服务端所在机器的ip,且保证客户端所在机器能正常ping通
- 确认客户端配置的`server-port`与`ssl-enable`,默认情况应配置为9000、false或9002、true,除非服务端app.yml有改动隧道对外端口
- 确认服务端对外的9000、9002端口是否已经放开
- 服务端如果采用docker部署,需要确保容器的9000、9002端口映射到宿主机
-# 2、关于中微子代理涉及的2类SSL证书
-## 2.1、HTTPS证书
+## 2、关于中微子代理涉及的2类SSL证书
+### 2.1、HTTPS证书
该证书用于服务端支持HTTPS,若需要在服务端`app.yml`中配置即可
-## 2.2、隧道SSL证书
+### 2.2、隧道SSL证书
该证书用于对客户端-服务端之间的数据通信进行加密,因此客户端/服务端均需要配置该证书。可参考如下命令生成:
```
keytool -genkey -alias test1 -keyalg RSA -keysize 1024 -validity 3650 -keypass 123456 -storepass 123456 -keystore "./test.jks"
From 934ceaadca397448dadc3a88b57ca7ceec6046c8 Mon Sep 17 00:00:00 2001
From: aoshiguchen <1052045476@qq.com>
Date: Sat, 1 Jul 2023 16:09:01 +0800
Subject: [PATCH 2/8] =?UTF-8?q?=E6=8A=A5=E6=96=87=E7=9B=B8=E5=85=B3?=
=?UTF-8?q?=E6=97=A5=E5=BF=97=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
neutrino-proxy-client/pom.xml | 2 +-
.../neutrinoproxy/client/core/ProxyClientService.java | 9 +++++++--
neutrino-proxy-server/pom.xml | 2 +-
.../server/base/proxy/ProxyConfiguration.java | 2 +-
.../neutrinoproxy/server/proxy/enhance/HttpProxy.java | 2 +-
.../neutrinoproxy/server/proxy/enhance/HttpsProxy.java | 4 ++--
6 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/neutrino-proxy-client/pom.xml b/neutrino-proxy-client/pom.xml
index f624979f..ecb56fd1 100644
--- a/neutrino-proxy-client/pom.xml
+++ b/neutrino-proxy-client/pom.xml
@@ -33,7 +33,7 @@
false
- app-*.yml
+ app-dev.yml
diff --git a/neutrino-proxy-client/src/main/java/org/dromara/neutrinoproxy/client/core/ProxyClientService.java b/neutrino-proxy-client/src/main/java/org/dromara/neutrinoproxy/client/core/ProxyClientService.java
index 48b92fce..b3365549 100644
--- a/neutrino-proxy-client/src/main/java/org/dromara/neutrinoproxy/client/core/ProxyClientService.java
+++ b/neutrino-proxy-client/src/main/java/org/dromara/neutrinoproxy/client/core/ProxyClientService.java
@@ -78,6 +78,9 @@ public class ProxyClientService {
@Override
public void initChannel(SocketChannel ch) throws Exception {
+ if (null != proxyConfig.getClient().getTransferLogEnable() && proxyConfig.getClient().getTransferLogEnable()) {
+ ch.pipeline().addFirst(new LoggingHandler(RealServerChannelHandler.class));
+ }
ch.pipeline().addLast(new RealServerChannelHandler());
}
});
@@ -92,7 +95,9 @@ public class ProxyClientService {
if (proxyConfig.getClient().getSslEnable()) {
ch.pipeline().addLast(createSslHandler());
}
-// ch.pipeline().addFirst(new LoggingHandler(ProxyClientService.class));
+ if (null != proxyConfig.getClient().getTransferLogEnable() && proxyConfig.getClient().getTransferLogEnable()) {
+ ch.pipeline().addFirst(new LoggingHandler(ProxyChannelHandler.class));
+ }
ch.pipeline().addLast(new ProxyMessageDecoder(proxyConfig.getProtocol().getMaxFrameLength(),
proxyConfig.getProtocol().getLengthFieldOffset(), proxyConfig.getProtocol().getLengthFieldLength(),
proxyConfig.getProtocol().getLengthAdjustment(), proxyConfig.getProtocol().getInitialBytesToStrip()));
@@ -121,7 +126,7 @@ public class ProxyClientService {
ch.pipeline().addLast(createSslHandler());
}
if (null != proxyConfig.getClient().getTransferLogEnable() && proxyConfig.getClient().getTransferLogEnable()) {
- ch.pipeline().addFirst(new LoggingHandler(ProxyClientService.class));
+ ch.pipeline().addFirst(new LoggingHandler(CmdChannelHandler.class));
}
ch.pipeline().addLast(new ProxyMessageDecoder(proxyConfig.getProtocol().getMaxFrameLength(),
proxyConfig.getProtocol().getLengthFieldOffset(), proxyConfig.getProtocol().getLengthFieldLength(),
diff --git a/neutrino-proxy-server/pom.xml b/neutrino-proxy-server/pom.xml
index 6056881b..4af63504 100644
--- a/neutrino-proxy-server/pom.xml
+++ b/neutrino-proxy-server/pom.xml
@@ -70,7 +70,7 @@
false
- app-*.yml
+ app-dev.yml
diff --git a/neutrino-proxy-server/src/main/java/org/dromara/neutrinoproxy/server/base/proxy/ProxyConfiguration.java b/neutrino-proxy-server/src/main/java/org/dromara/neutrinoproxy/server/base/proxy/ProxyConfiguration.java
index b7537641..14dd698b 100644
--- a/neutrino-proxy-server/src/main/java/org/dromara/neutrinoproxy/server/base/proxy/ProxyConfiguration.java
+++ b/neutrino-proxy-server/src/main/java/org/dromara/neutrinoproxy/server/base/proxy/ProxyConfiguration.java
@@ -63,7 +63,7 @@ public class ProxyConfiguration implements LifecycleBean {
@Override
public void initChannel(SocketChannel ch) throws Exception {
if (null != proxyConfig.getServer().getTransferLogEnable() && proxyConfig.getServer().getTransferLogEnable()) {
- ch.pipeline().addFirst(new LoggingHandler(ProxyTunnelServer.class));
+ ch.pipeline().addFirst(new LoggingHandler(TcpVisitorChannelHandler.class));
}
ch.pipeline().addFirst(new BytesMetricsHandler());
ch.pipeline().addLast(new TcpVisitorChannelHandler());
diff --git a/neutrino-proxy-server/src/main/java/org/dromara/neutrinoproxy/server/proxy/enhance/HttpProxy.java b/neutrino-proxy-server/src/main/java/org/dromara/neutrinoproxy/server/proxy/enhance/HttpProxy.java
index 78d2c376..742be02f 100644
--- a/neutrino-proxy-server/src/main/java/org/dromara/neutrinoproxy/server/proxy/enhance/HttpProxy.java
+++ b/neutrino-proxy-server/src/main/java/org/dromara/neutrinoproxy/server/proxy/enhance/HttpProxy.java
@@ -43,7 +43,7 @@ public class HttpProxy implements EventListener {
@Override
public void initChannel(SocketChannel ch) throws Exception {
if (null != proxyConfig.getServer().getTransferLogEnable() && proxyConfig.getServer().getTransferLogEnable()) {
- ch.pipeline().addFirst(new LoggingHandler(ProxyTunnelServer.class));
+ ch.pipeline().addFirst(new LoggingHandler(HttpProxy.class));
}
ch.pipeline().addFirst(new BytesMetricsHandler());
ch.pipeline().addLast(new HttpVisitorChannelHandler(proxyConfig.getServer().getDomainName()));
diff --git a/neutrino-proxy-server/src/main/java/org/dromara/neutrinoproxy/server/proxy/enhance/HttpsProxy.java b/neutrino-proxy-server/src/main/java/org/dromara/neutrinoproxy/server/proxy/enhance/HttpsProxy.java
index f31b4160..a926b7c3 100644
--- a/neutrino-proxy-server/src/main/java/org/dromara/neutrinoproxy/server/proxy/enhance/HttpsProxy.java
+++ b/neutrino-proxy-server/src/main/java/org/dromara/neutrinoproxy/server/proxy/enhance/HttpsProxy.java
@@ -51,9 +51,9 @@ public class HttpsProxy implements EventListener {
@Override
public void initChannel(SocketChannel ch) throws Exception {
if (null != proxyConfig.getServer().getTransferLogEnable() && proxyConfig.getServer().getTransferLogEnable()) {
- ch.pipeline().addFirst(new LoggingHandler(ProxyTunnelServer.class));
+ ch.pipeline().addFirst(new LoggingHandler(HttpsProxy.class));
}
- ch.pipeline().addLast(createSslHandler());
+// ch.pipeline().addLast(createSslHandler());
ch.pipeline().addFirst(new BytesMetricsHandler());
ch.pipeline().addLast(new HttpVisitorChannelHandler(proxyConfig.getServer().getDomainName()));
}
From 1625187bb14cdbbca1c6668f3d331727f1e9bc8f Mon Sep 17 00:00:00 2001
From: aoshiguchen <1052045476@qq.com>
Date: Sat, 1 Jul 2023 17:02:07 +0800
Subject: [PATCH 3/8] =?UTF-8?q?=E6=8A=A5=E6=96=87=E7=9B=B8=E5=85=B3?=
=?UTF-8?q?=E6=97=A5=E5=BF=97=E4=BC=98=E5=8C=96.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../dromara/neutrinoproxy/server/proxy/enhance/HttpsProxy.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/neutrino-proxy-server/src/main/java/org/dromara/neutrinoproxy/server/proxy/enhance/HttpsProxy.java b/neutrino-proxy-server/src/main/java/org/dromara/neutrinoproxy/server/proxy/enhance/HttpsProxy.java
index a926b7c3..85699f3d 100644
--- a/neutrino-proxy-server/src/main/java/org/dromara/neutrinoproxy/server/proxy/enhance/HttpsProxy.java
+++ b/neutrino-proxy-server/src/main/java/org/dromara/neutrinoproxy/server/proxy/enhance/HttpsProxy.java
@@ -53,7 +53,7 @@ public class HttpsProxy implements EventListener {
if (null != proxyConfig.getServer().getTransferLogEnable() && proxyConfig.getServer().getTransferLogEnable()) {
ch.pipeline().addFirst(new LoggingHandler(HttpsProxy.class));
}
-// ch.pipeline().addLast(createSslHandler());
+ ch.pipeline().addLast(createSslHandler());
ch.pipeline().addFirst(new BytesMetricsHandler());
ch.pipeline().addLast(new HttpVisitorChannelHandler(proxyConfig.getServer().getDomainName()));
}
From 7ea723b578332c374c030f0c87b822386c642df8 Mon Sep 17 00:00:00 2001
From: Metal <13144144057@163.com>
Date: Tue, 4 Jul 2023 20:08:27 +0800
Subject: [PATCH 4/8] =?UTF-8?q?1=E3=80=81=E7=B3=BB=E7=BB=9F=E7=AE=A1?=
=?UTF-8?q?=E7=90=86-=E7=AB=AF=E5=8F=A3=E6=B1=A0=E7=AE=A1=E7=90=86?=
=?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=89=B9=E9=87=8F=E5=88=A0=E9=99=A4=E7=9A=84?=
=?UTF-8?q?=E5=8A=9F=E8=83=BD=202=E3=80=81=E4=BB=A3=E7=90=86=E9=85=8D?=
=?UTF-8?q?=E7=BD=AE-=E7=AB=AF=E5=8F=A3=E6=98=A0=E5=B0=84=E6=B7=BB?=
=?UTF-8?q?=E5=8A=A0=E5=92=8C=E7=BC=96=E8=BE=91=E9=A1=B5=E9=9D=A2=E6=9C=8D?=
=?UTF-8?q?=E5=8A=A1=E7=AB=AF=E7=AB=AF=E5=8F=A3=E5=AD=97=E6=AE=B5=EF=BC=8C?=
=?UTF-8?q?=E6=94=AF=E6=8C=81=E8=BE=93=E5=85=A5=E6=90=9C=E7=B4=A2=E7=9A=84?=
=?UTF-8?q?=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
neutrino-proxy-admin/src/api/portPool.js | 10 ++
.../src/components/Button/buttonPopover.vue | 98 ++++++++++---------
neutrino-proxy-admin/src/lang/en.js | 1 +
neutrino-proxy-admin/src/lang/zh.js | 1 +
.../src/views/proxy/portMapping.vue | 2 +-
.../src/views/system/portPool.vue | 28 +++++-
.../server/controller/PortPoolController.java | 10 ++
.../req/system/PortPoolDeleteBatchReq.java | 14 +++
.../server/service/PortPoolService.java | 11 +++
9 files changed, 126 insertions(+), 49 deletions(-)
create mode 100644 neutrino-proxy-server/src/main/java/org/dromara/neutrinoproxy/server/controller/req/system/PortPoolDeleteBatchReq.java
diff --git a/neutrino-proxy-admin/src/api/portPool.js b/neutrino-proxy-admin/src/api/portPool.js
index fb5a60b4..de7afe6d 100644
--- a/neutrino-proxy-admin/src/api/portPool.js
+++ b/neutrino-proxy-admin/src/api/portPool.js
@@ -60,3 +60,13 @@ export function deletePortPool(id) {
}
})
}
+
+export function deleteBatchPortPool(ids) {
+ return request({
+ url: '/port-pool/deleteBatch',
+ method: 'post',
+ data: {
+ ids:ids
+ }
+ })
+}
diff --git a/neutrino-proxy-admin/src/components/Button/buttonPopover.vue b/neutrino-proxy-admin/src/components/Button/buttonPopover.vue
index 321c2927..80220327 100644
--- a/neutrino-proxy-admin/src/components/Button/buttonPopover.vue
+++ b/neutrino-proxy-admin/src/components/Button/buttonPopover.vue
@@ -8,60 +8,68 @@
{{cancelText}}
{{okText}}
- {{buttonText}}
+ {{buttonText}}