Compare commits
4
Commits
v24-test2
...
v2.0-test3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b6ef9f220d | ||
|
|
ebfd97fd7c | ||
|
|
d9dfd05180 | ||
|
|
066b63d38a |
@@ -0,0 +1,82 @@
|
||||
name: Build linux and mac native image
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# see: https://docs.github.com/zh/actions/using-jobs/choosing-the-runner-for-a-job
|
||||
os: ['ubuntu-20.04', 'macos-12']
|
||||
name: build - ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
# https://github.com/softprops/action-gh-release/issues/236#issuecomment-1150530128
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: setup node v13.12.0
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 13.12.0
|
||||
# cache: 'npm' # 使用缓存需要把 package-lock.json 也上传到 git 上
|
||||
- name: build neutrino-proxy-admin
|
||||
run: |
|
||||
cd neutrino-proxy-admin
|
||||
npm install
|
||||
npm run build:docker
|
||||
cp -rf ./dist/ ./../neutrino-proxy-server/src/main/resources/static/
|
||||
- name: GitHub Action for GraalVM JDK 17
|
||||
uses: graalvm/setup-graalvm@v1
|
||||
with:
|
||||
java-version: '17.0.7' # for a specific JDK 17; or '17' for the latest JDK 17
|
||||
distribution: 'graalvm' # New 'distribution' option
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Cache local Maven repository
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-maven-
|
||||
- name: Build with Maven (neutrino-proxy-server)
|
||||
run: |
|
||||
mvn clean install -pl neutrino-proxy-core -am -DskipTests --no-transfer-progress
|
||||
cd neutrino-proxy-server
|
||||
mvn clean native:compile -P native --file pom.xml --no-transfer-progress
|
||||
cp target/neutrino-proxy-server ./../neutrino-proxy-server-${{ github.ref_name }}
|
||||
- name: Archive zip (neutrino-proxy-server)
|
||||
uses: thedoctor0/zip-release@master
|
||||
with:
|
||||
type: 'zip'
|
||||
path: 'neutrino-proxy-server-${{ github.ref_name }}'
|
||||
filename: neutrino-proxy-server-${{ matrix.os }}-${{ github.ref_name }}.zip
|
||||
- name: Build with Maven (neutrino-proxy-client)
|
||||
run: |
|
||||
cd neutrino-proxy-client
|
||||
mvn clean package --file pom.xml --no-transfer-progress
|
||||
mvn clean native:compile -P native --file pom.xml --no-transfer-progress
|
||||
cp target/neutrino-proxy-client ./../neutrino-proxy-client-${{ github.ref_name }}
|
||||
- name: Archive zip (neutrino-proxy-client)
|
||||
uses: thedoctor0/zip-release@master
|
||||
with:
|
||||
type: 'zip'
|
||||
path: 'neutrino-proxy-client-${{ github.ref_name }}'
|
||||
filename: neutrino-proxy-client-${{ matrix.os }}-${{ github.ref_name }}.zip
|
||||
# GitHub 上创建 release
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
with:
|
||||
files: |
|
||||
neutrino-proxy-server/target/neutrino-proxy-server.jar
|
||||
neutrino-proxy-client/target/neutrino-proxy-client.jar
|
||||
neutrino-proxy-server-${{ matrix.os }}-${{ github.ref_name }}.zip
|
||||
neutrino-proxy-client-${{ matrix.os }}-${{ github.ref_name }}.zip
|
||||
prerelease: true
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -0,0 +1,82 @@
|
||||
name: Build windows native image
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# see: https://docs.github.com/zh/actions/using-jobs/choosing-the-runner-for-a-job
|
||||
os: ['windows-2022']
|
||||
name: build - ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
# https://github.com/softprops/action-gh-release/issues/236#issuecomment-1150530128
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: setup node v13.12.0
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 13.12.0
|
||||
# cache: 'npm' # 使用缓存需要把 package-lock.json 也上传到 git 上
|
||||
- name: build neutrino-proxy-admin
|
||||
run: |
|
||||
cd neutrino-proxy-admin
|
||||
npm install
|
||||
npm run build:docker
|
||||
cp -r ./dist/ ./../neutrino-proxy-server/src/main/resources/static/
|
||||
- name: GitHub Action for GraalVM JDK 17
|
||||
uses: graalvm/setup-graalvm@v1
|
||||
with:
|
||||
java-version: '17.0.7' # for a specific JDK 17; or '17' for the latest JDK 17
|
||||
distribution: 'graalvm' # New 'distribution' option
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Cache local Maven repository
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-maven-
|
||||
- name: Build with Maven (neutrino-proxy-server)
|
||||
run: |
|
||||
mvn clean install -pl neutrino-proxy-core -am -DskipTests --no-transfer-progress
|
||||
cd neutrino-proxy-server
|
||||
mvn clean native:compile -P native --file pom.xml --no-transfer-progress
|
||||
cp target/neutrino-proxy-server.exe ./../neutrino-proxy-server.exe
|
||||
- name: Archive zip (neutrino-proxy-server)
|
||||
uses: thedoctor0/zip-release@master
|
||||
with:
|
||||
type: 'zip'
|
||||
path: 'neutrino-proxy-server.exe'
|
||||
filename: neutrino-proxy-server-${{ matrix.os }}-${{ github.ref_name }}.zip
|
||||
- name: Build with Maven (neutrino-proxy-client)
|
||||
run: |
|
||||
cd neutrino-proxy-client
|
||||
mvn clean package --file pom.xml --no-transfer-progress
|
||||
mvn clean native:compile -P native --file pom.xml --no-transfer-progress
|
||||
cp target/neutrino-proxy-client.exe ./../neutrino-proxy-client.exe
|
||||
- name: Archive zip (neutrino-proxy-client)
|
||||
uses: thedoctor0/zip-release@master
|
||||
with:
|
||||
type: 'zip'
|
||||
path: 'neutrino-proxy-client.exe'
|
||||
filename: neutrino-proxy-client-${{ matrix.os }}-${{ github.ref_name }}.zip
|
||||
# GitHub 上创建 release
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
with:
|
||||
files: |
|
||||
neutrino-proxy-server/target/neutrino-proxy-server.jar
|
||||
neutrino-proxy-client/target/neutrino-proxy-client.jar
|
||||
neutrino-proxy-server-${{ matrix.os }}-${{ github.ref_name }}.zip
|
||||
neutrino-proxy-client-${{ matrix.os }}-${{ github.ref_name }}.zip
|
||||
prerelease: true
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -3,7 +3,7 @@ solon.logging.appender:
|
||||
console:
|
||||
pattern: "%d{yyyy-MM-dd HH:mm:ss.SSS} %highlight(%-5level) %magenta(${PID:-}) --- %-15([%15.15thread]) %-56(%cyan(%-40.40logger{39}%L)) : %msg%n"
|
||||
file:
|
||||
enable: false
|
||||
enable: true
|
||||
pattern: "%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level ${PID:-} --- %-15([%15.15thread]) %-56(%-40.40logger{39}%L) : %msg%n"
|
||||
name: "logs/${neutrino.application.name}"
|
||||
rolling: "logs/${neutrino.application.name}_%d{yyyy-MM-dd}_%i.log.gz"
|
||||
|
||||
+1
-1
@@ -25,6 +25,6 @@ public class NeutrinoCoreRuntimeNativeRegistrar implements RuntimeNativeRegistra
|
||||
metadata.registerReflection(ProxyMessage.class, MemberCategory.DECLARED_FIELDS, MemberCategory.INVOKE_DECLARED_METHODS, MemberCategory.INVOKE_DECLARED_CONSTRUCTORS);
|
||||
metadata.registerReflection(ProxyMessage.UdpBaseInfo.class, MemberCategory.DECLARED_FIELDS, MemberCategory.INVOKE_DECLARED_METHODS, MemberCategory.INVOKE_DECLARED_CONSTRUCTORS);
|
||||
|
||||
metadata.registerArg("--add-opens java.base/java.lang.invoke=ALL-UNNAMED --add-exports=java.base/jdk.internal.misc=ALL-UNNAMED");
|
||||
metadata.registerArg("--add-opens java.base/java.lang.invoke=ALL-UNNAMED --add-exports=java.base/jdk.internal.misc=ALL-UNNAMED -march=compatibility");
|
||||
}
|
||||
}
|
||||
|
||||
+1
@@ -43,6 +43,7 @@ public class NeutrinoServerRuntimeNativeRegistrar implements RuntimeNativeRegist
|
||||
@Override
|
||||
public void register(AppContext context, RuntimeNativeMetadata metadata) {
|
||||
metadata.registerResourceInclude("test.jks");
|
||||
metadata.registerResourceInclude("sql/.*");
|
||||
|
||||
// 使用 MP lambda 的类,需要注册序列化
|
||||
metadata.registerLambdaSerialization(ClientConnectRecordService.class);
|
||||
|
||||
@@ -12,7 +12,7 @@ solon.logging.appender:
|
||||
console:
|
||||
pattern: "%d{yyyy-MM-dd HH:mm:ss.SSS} %highlight(%-5level) %magenta(${PID:-}) --- %-15([%15.15thread]) %-56(%cyan(%-40.40logger{39}%L)) : %msg%n"
|
||||
file:
|
||||
enable: false
|
||||
enable: true
|
||||
pattern: "%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level ${PID:-} --- %-15([%15.15thread]) %-56(%-40.40logger{39}%L) : %msg%n"
|
||||
name: "logs/${solon.app.name}"
|
||||
rolling: "logs/${solon.app.name}_%d{yyyy-MM-dd}_%i.log"
|
||||
|
||||
@@ -30,7 +30,7 @@ module.exports = {
|
||||
{text: '后台操作指南', link: '/pages/793dcc/'},
|
||||
]
|
||||
},
|
||||
{text: '演示', link: '/pages/db78e2/'},
|
||||
{text: '支持', link: '/pages/a3f096/'},
|
||||
{text: 'Gitee', link: 'https://gitee.com/dromara/neutrino-proxy'},
|
||||
],
|
||||
sidebarDepth: 2, // 侧边栏显示深度,默认1,最大2(显示到h3标题)
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
---
|
||||
title: 常见问题汇总
|
||||
date: 2023-07-01 13:35:00
|
||||
permalink: /pages/a00001/
|
||||
---
|
||||
|
||||
## 1. 客户端启动后连不上服务端,一直在重连
|
||||
### 1.1. 启动日志包含`not found license-key config`相关字样
|
||||
出现这种情况,说明客户端没获取到配置的license,可按如下检查:
|
||||
- 客户端是否有配置app.yml,app.yml中是否有配置`license-key`
|
||||
- 客户端启动参数是否指定app.yml配置,若未指定客户端不会加载任何jar外部的配置文件
|
||||
- 客户端启动参数指定的配置文件路径是否正确?如:`java -jar neutrino-proxy-client.jar config=app.yml`,代表`app.yml`文件与jar在同级别目录下,如果不在同级别目录,请使用绝对/相对路径指定
|
||||
- 除此之外license还可以用以下方法直接在启动参数中指定:
|
||||
- `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.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证书
|
||||
该证书用于服务端支持HTTPS,若需要在服务端`app.yml`中配置即可
|
||||
|
||||
### 2.2. 隧道SSL证书
|
||||
该证书用于对客户端-服务端之间的数据通信进行加密,因此客户端/服务端均需要配置该证书。可参考如下命令生成:
|
||||
```
|
||||
keytool -genkey -alias test1 -keyalg RSA -keysize 1024 -validity 3650 -keypass 123456 -storepass 123456 -keystore "./test.jks"
|
||||
```
|
||||
|
||||
## 3. 1.9.0 版本udp代理无效
|
||||
### 问题描述
|
||||
代理本地udp端口9231,公网访问代理端口无效,代理端口测试发送成功,但是本地服务没有收到,使用路由器的ddns功能也可以成功代理。
|
||||
### 解决方案
|
||||
+ 防火墙开放端口的时候一定要指定udp协议
|
||||
+ 还有如果想收到回复需要配置两个响应参数
|
||||
+ 响应数量根据实际响应数量配置,可以配置的大一些,但是不能比实际小
|
||||
+ 超时时间根据实际响应时间配置,比如正常响应时间是10s,这里就可以配置15000毫秒等
|
||||
<img :src="$withBase('/img/run-example/question_3_1.png')"></img>
|
||||
+ 相关链接:[1.9.0版本udp代理无效 · Issue #I83XOI · dromara/neutrino-proxy - Gitee.com](https://gitee.com/dromara/neutrino-proxy/issues/I83XOI)
|
||||
+ 贡献者:gitee:眉黛如画
|
||||
|
||||
## 4. Vue项目出现Invalid Host header 的解决方案
|
||||
### 问题描述
|
||||
内网穿透 Vue项目出现Invalid Host header 的解决方案
|
||||
### 解决方案
|
||||
manifest.json中配置
|
||||
```
|
||||
"h5":{
|
||||
"devServer":{
|
||||
"disableHostCheck":true
|
||||
}
|
||||
},
|
||||
```
|
||||
+ 相关链接:[内网穿透 Vue项目出现Invalid Host header 的解决方案](https://blog.csdn.net/weixin_41549915/article/details/96132925)
|
||||
+ 贡献者:wx:明天会更好
|
||||
@@ -0,0 +1,20 @@
|
||||
---
|
||||
title: 客户端连接服务端失败
|
||||
date: 2023-10-25 17:55:20
|
||||
permalink: /pages/31d253/
|
||||
---
|
||||
|
||||
## 1.1. 启动日志包含`not found license-key config`相关字样
|
||||
出现这种情况,说明客户端没获取到配置的license,可按如下检查:
|
||||
- 客户端是否有配置app.yml,app.yml中是否有配置`license-key`
|
||||
- 客户端启动参数是否指定app.yml配置,若未指定客户端不会加载任何jar外部的配置文件
|
||||
- 客户端启动参数指定的配置文件路径是否正确?如:`java -jar neutrino-proxy-client.jar config=app.yml`,代表`app.yml`文件与jar在同级别目录下,如果不在同级别目录,请使用绝对/相对路径指定
|
||||
- 除此之外license还可以用以下方法直接在启动参数中指定:
|
||||
- `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.2. 配置文件确定都已经配置,且启动参数正确指定了,但是没有出现`认证成功日志`
|
||||
- 确认客户端配置的`server-ip`,必须是服务端所在机器的ip,且保证客户端所在机器能正常ping通
|
||||
- 确认客户端配置的`server-port`与`ssl-enable`,默认情况应配置为9000、false或9002、true,除非服务端app.yml有改动隧道对外端口
|
||||
- 确认服务端对外的9000、9002端口是否已经放开
|
||||
- 服务端如果采用docker部署,需要确保容器的9000、9002端口映射到宿主机
|
||||
@@ -0,0 +1,14 @@
|
||||
---
|
||||
title: 易混淆的2类证书
|
||||
date: 2023-10-25 17:56:59
|
||||
permalink: /pages/e4c3d7/
|
||||
---
|
||||
|
||||
## 2.1. HTTPS证书
|
||||
该证书用于服务端支持HTTPS,若需要在服务端`app.yml`中配置即可
|
||||
|
||||
## 2.2. 隧道SSL证书
|
||||
该证书用于对客户端-服务端之间的数据通信进行加密,因此客户端/服务端均需要配置该证书。可参考如下命令生成:
|
||||
```
|
||||
keytool -genkey -alias test1 -keyalg RSA -keysize 1024 -validity 3650 -keypass 123456 -storepass 123456 -keystore "./test.jks"
|
||||
```
|
||||
@@ -0,0 +1,16 @@
|
||||
---
|
||||
title: udp代理无效
|
||||
date: 2023-10-25 17:58:35
|
||||
permalink: /pages/7b990f/
|
||||
---
|
||||
|
||||
## 问题描述
|
||||
代理本地udp端口9231,公网访问代理端口无效,代理端口测试发送成功,但是本地服务没有收到,使用路由器的ddns功能也可以成功代理。
|
||||
## 解决方案
|
||||
+ 防火墙开放端口的时候一定要指定udp协议
|
||||
+ 还有如果想收到回复需要配置两个响应参数
|
||||
+ 响应数量根据实际响应数量配置,可以配置的大一些,但是不能比实际小
|
||||
+ 超时时间根据实际响应时间配置,比如正常响应时间是10s,这里就可以配置15000毫秒等
|
||||
<img :src="$withBase('/img/run-example/question_3_1.png')"></img>
|
||||
+ 相关链接:[1.9.0版本udp代理无效 · Issue #I83XOI · dromara/neutrino-proxy - Gitee.com](https://gitee.com/dromara/neutrino-proxy/issues/I83XOI)
|
||||
+ 贡献者:gitee:眉黛如画
|
||||
@@ -0,0 +1,19 @@
|
||||
---
|
||||
title: Vue项目出现Invalid Host header 的解决方案
|
||||
date: 2023-10-25 17:59:29
|
||||
permalink: /pages/441163/
|
||||
---
|
||||
|
||||
## 问题描述
|
||||
内网穿透 Vue项目出现Invalid Host header 的解决方案
|
||||
## 解决方案
|
||||
manifest.json中配置
|
||||
```
|
||||
"h5":{
|
||||
"devServer":{
|
||||
"disableHostCheck":true
|
||||
}
|
||||
},
|
||||
```
|
||||
+ 相关链接:[内网穿透 Vue项目出现Invalid Host header 的解决方案](https://blog.csdn.net/weixin_41549915/article/details/96132925)
|
||||
+ 贡献者:wx:明天会更好
|
||||
@@ -1,15 +0,0 @@
|
||||
---
|
||||
title: 演示环境
|
||||
date: 2020-05-12 15:10:15
|
||||
permalink: /pages/db78e2
|
||||
article: false
|
||||
---
|
||||
|
||||
### 演示环境
|
||||
> 由于部分用户使用演示环境代理非法网站导致演示环境服务器被封禁,因此不再提供演示服务。
|
||||
|
||||
可使用分配好的游客license试用。服务器带宽较低,仅供学习使用!
|
||||
|
||||
管理后台地址:<a href="http://103.163.47.16:9527" target="_blank">http://103.163.47.16:9527</a>
|
||||
|
||||
游客账号:visitor/123456
|
||||
@@ -23,10 +23,10 @@ features: # 可选的
|
||||
details: 服务端支持Docker一键部署。
|
||||
- title: 隧道SSL加密
|
||||
details: 隧道通信支持SSL,保护您的数据安全
|
||||
- title: HTTPS
|
||||
details: 支持HTTPS
|
||||
- title: 多客户端支持
|
||||
details: 暂未支持
|
||||
- title: 多种协议
|
||||
details: 支持TCP、HTTP、HTTPS、UDP
|
||||
- title: 原生部署
|
||||
details: 支持原生部署,更简单、性能更好的使用体验
|
||||
|
||||
# 文章列表显示方式: detailed 默认,显示详细版文章列表(包括作者、分类、标签、摘要、分页等)| simple => 显示简约版文章列表(仅标题和日期)| none 不显示文章列表
|
||||
postList: none
|
||||
|
||||
Reference in New Issue
Block a user