Compare commits
24
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
09b200455d | ||
|
|
245bd274e2 | ||
|
|
028f114c5f | ||
|
|
6cb98cd2bd | ||
|
|
b718c048ea | ||
|
|
d202caa499 | ||
|
|
8591e224dc | ||
|
|
5953256c11 | ||
|
|
8d5b7edf12 | ||
|
|
e74dc64a9a | ||
|
|
47b6a24a42 | ||
|
|
78c5014cb0 | ||
|
|
0095ffc65c | ||
|
|
768422d498 | ||
|
|
299d75957b | ||
|
|
54d81092a0 | ||
|
|
49b4006f1b | ||
|
|
4dd23134e4 | ||
|
|
9257605be5 | ||
|
|
cd471c1eb4 | ||
|
|
8b358ccadf | ||
|
|
35f9f7756e | ||
|
|
2c2b169460 | ||
|
|
f15eec426d |
+4
-1
@@ -2,4 +2,7 @@ root=true
|
||||
|
||||
[*.{groovy,java,kt,xml}]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
indent_size = 4
|
||||
|
||||
[*.sh]
|
||||
end_of_line=lf
|
||||
|
||||
@@ -12,8 +12,8 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# see: https://docs.github.com/zh/actions/using-jobs/choosing-the-runner-for-a-job
|
||||
os: ['ubuntu-20.04', 'windows-latest', 'macos-latest']
|
||||
# os: ['ubuntu-latest']
|
||||
# os: ['ubuntu-20.04', 'macos-12']
|
||||
os: ['ubuntu-20.04']
|
||||
name: build - ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
# https://github.com/softprops/action-gh-release/issues/236#issuecomment-1150530128
|
||||
@@ -30,7 +30,7 @@ jobs:
|
||||
run: |
|
||||
cd neutrino-proxy-admin
|
||||
npm install
|
||||
npm run build:dev
|
||||
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
|
||||
@@ -50,25 +50,25 @@ jobs:
|
||||
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 ./../
|
||||
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'
|
||||
filename: neutrino-proxy-server-${{ matrix.os }}.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 ./../
|
||||
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'
|
||||
filename: neutrino-proxy-client-${{ matrix.os }}.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
|
||||
@@ -77,7 +77,7 @@ jobs:
|
||||
files: |
|
||||
neutrino-proxy-server/target/neutrino-proxy-server.jar
|
||||
neutrino-proxy-client/target/neutrino-proxy-client.jar
|
||||
neutrino-proxy-server-${{ matrix.os }}.zip
|
||||
neutrino-proxy-client-${{ matrix.os }}.zip
|
||||
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,83 @@
|
||||
name: jar release
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
tags:
|
||||
- 'win*'
|
||||
|
||||
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', 'windows-latest', 'macos-latest']
|
||||
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 .
|
||||
- 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 .
|
||||
- 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 }}
|
||||
@@ -57,5 +57,6 @@ hs_err_pid*
|
||||
neutrino-proxy-vuepress/deploy.sh
|
||||
.NEUTRINO_PROXY_CLIENT_ID
|
||||
logs
|
||||
data
|
||||
**/cert/**
|
||||
neutrino-proxy-server/src/main/resources/static/**
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
- 2022-06-16 1.0.0版本发布,基于自研应用框架、纯配置无管理后台
|
||||
- 2022-10-12 1.5.0版本发布,底层框架优化,新增管理后台
|
||||
- 2022-11-23 1.6.0版本发布,新增日志管理模块,新增首页流量统计
|
||||
- 2023-01-08 中微子代理Gitee Star突破100
|
||||
- 2023-01-16 加入Dromara组织
|
||||
- 2023-02-23 1.6.4版本发布,管理后台增、删、改、禁用实时生效,启动参数、GZip优化
|
||||
- 2023-03-12 1.7.0版本发布,底层框架更换为Solon + MybatisPlus
|
||||
- 2023-03-26 1.7.1版本发布,新增端口池分组、新增报表管理模块、首页图表优化
|
||||
- 2023-04-03 1.8.0版本发布,端口映射支持选择协议,HTTP映射支持子域名
|
||||
- 2023-05-27 1.8.2版本发布,增加HTTPS支持
|
||||
- 2023-06-03 1.8.3版本发布,客户端重连优化、服务端验证客户端身份逻辑优化
|
||||
- 2023-06-08 1.8.4版本发布,增加对mariadb的支持、配置文件支持指定日志级别、重连参数
|
||||
- 2023-07-04 1.8.5版本发布,后台若干细节优化、配置文件优化
|
||||
- 2023-09-07 1.8.6版本发布,后台若干细节优化
|
||||
- 2023-09-22 1.9.0版本发布,端口映射支持UDP协议
|
||||
- 2023-09-25 中微子代理Gitee Star数突破1000
|
||||
@@ -4,8 +4,8 @@
|
||||
<p align="center">
|
||||
<a href='https://gitee.com/dromara/neutrino-proxy/stargazers'><img src='https://gitee.com/dromara/neutrino-proxy/badge/star.svg?theme=dark' alt='star'></img></a>
|
||||
<a href='https://gitee.com/dromara/neutrino-proxy/members'><img src='https://gitee.com/dromara/neutrino-proxy/badge/fork.svg?theme=dark' alt='fork'></img></a>
|
||||
<a target="_blank" href="https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html">
|
||||
<img src="https://img.shields.io/badge/JDK-8+-red.svg" />
|
||||
<a target="_blank" href="https://www.oracle.com/java/technologies/javase/javase-jdk17-downloads.html">
|
||||
<img src="https://img.shields.io/badge/JDK-17+-red.svg" />
|
||||
</a>
|
||||
<a href="./LICENSE">
|
||||
<img src="https://img.shields.io/badge/license-MIT-red" alt="license MIT">
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
# 1.x
|
||||
## 1.0.0
|
||||
> 第一个基本可用版本
|
||||
- 基于自研底层应用框架、Netty
|
||||
- 纯配置实现、无管理后台
|
||||
- 支持TCP代理
|
||||
|
||||
## 1.5.0
|
||||
- 管理后台新增用户管理、License管理、端口映射、调度管理、客户端连接日志、调度日志
|
||||
- 支持默认sqlite数据库
|
||||
- 底层框架Aop、Banner、SqlMapper、Ioc、@Value注解、Yml配置加载、静态资源服务等优化
|
||||
- 底层框架新增@Async、@Singleton等注解
|
||||
- 新增AsgcCompiler、ApplicationEvent机制封装
|
||||
|
||||
## 1.6.0
|
||||
- 新增日志管理模块,调度日志迁移至日志管理
|
||||
- 管理后台新增登录日志
|
||||
- 新增首页流量统计
|
||||
|
||||
## 1.6.4
|
||||
- 支持代理服务端用户(删除/禁用)、端口池(删除/禁用/启用)、License(删除/禁用/启用)、端口映射(新增/删除/禁用/启用)实时生效
|
||||
- 启动参数优化
|
||||
- 服务端静态资源服务支持缓存、gzip压缩,提升响应速度
|
||||
|
||||
## 1.7.0
|
||||
- 底层框架更换为Solon + MybatisPlus
|
||||
|
||||
## 1.7.1
|
||||
- 针对管理后台各页面的排序、搜索条件的优化
|
||||
- 增加端口池分组、相关的端口映射优化
|
||||
- 增加了报表管理模块:用户流量报表、license流量报表、用户流量月度明细、license流量月度明细
|
||||
- 完成首页图表展示:license统计、端口映射统计、今日流量统计、汇总流量统计、最近15日流量折线图
|
||||
|
||||
## 1.8.0
|
||||
- 端口映射支持选择协议
|
||||
- HTTP协议下映射支持配置子域名(前提是server端配置了域名)
|
||||
|
||||
## 1.8.2
|
||||
- 增加HTTPS的支持。
|
||||
|
||||
## 1.8.3
|
||||
- 客户端重连优化
|
||||
- 服务端验证客户端身份逻辑优化
|
||||
|
||||
## 1.8.4
|
||||
- 增加对mariadb的支持
|
||||
- 服务端/客户端,支持配置文件、启动参数指定日志级别
|
||||
- 客户端支持配置文件指定重连间隔,是否开启无限重连
|
||||
|
||||
## 1.8.5
|
||||
- 后台端口池管理支持批量删除
|
||||
- 端口映射下拉选择端口支持搜索
|
||||
- 客户端/服务端配置增加心跳日志开关,有需要时开启,方便排查问题
|
||||
- 客户端/服务端读写超时逻辑微调
|
||||
|
||||
## 1.8.6
|
||||
- 端口映射选择端口支持分页
|
||||
- 新增/更新端口映射,增加端口占用检测(端口映射编辑时,如果端口号没有变动,则不验证。避免出现端口映射正在使用时,无法更新端口映射其他信息的问题)
|
||||
- 下拉搜索license,支持模糊搜索
|
||||
- license下拉用户搜索,支持模糊搜索
|
||||
- 端口映射HTTP(S)新增打开网页按钮
|
||||
- 客户端断开连接时,记录日志空指针异常问题修复
|
||||
|
||||
## 1.9.0
|
||||
- 端口映射支持UDP协议
|
||||
- 端口映射HTTP(S)新增打开网页按钮,优先使用域名打开
|
||||
- 新增/编辑端口映射时端口占用检测功能屏蔽,解决docker下使用的各种问题
|
||||
|
||||
# 2.x
|
||||
## 2.0.0
|
||||
- solon版本升级为`2.5.11`
|
||||
- jdk版本升级为17
|
||||
- 支持原生编译改造
|
||||
- 默认支持的数据库由sqlite改为h2
|
||||
@@ -1,12 +1,12 @@
|
||||
FROM openjdk:8-jdk-alpine
|
||||
FROM openjdk:17-jdk-alpine
|
||||
#同步时间
|
||||
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories && \
|
||||
apk update && apk add wget unzip vim && apk add -U tzdata && \
|
||||
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone
|
||||
RUN mkdir -p /root/neutrino-proxy/config
|
||||
WORKDIR /root/neutrino-proxy
|
||||
COPY ../neutrino-proxy-client/target/neutrino-proxy-client.jar /root/neutrino-proxy/neutrino-proxy-client.jar
|
||||
COPY ../neutrino-proxy-client/src/main/resources/app.yml /root/neutrino-proxy/config
|
||||
COPY ./target/neutrino-proxy-client.jar /root/neutrino-proxy/neutrino-proxy-client.jar
|
||||
COPY ./src/main/resources/app.yml /root/neutrino-proxy/config
|
||||
#VOLUME ["/root/neutrino-proxy"]
|
||||
ENTRYPOINT ["java","-jar","neutrino-proxy-client.jar","config=./config/app.yml"]
|
||||
|
||||
|
||||
+6
-6
@@ -16,12 +16,12 @@ public class ProxyClient {
|
||||
|
||||
public static void main(String[] args) {
|
||||
Solon.start(ProxyClient.class, args, app -> {
|
||||
setAlias("neutrino.proxy.tunnel.serverIp", "serverIp");
|
||||
setAlias("neutrino.proxy.tunnel.serverPort", "serverPort");
|
||||
setAlias("neutrino.proxy.tunnel.sslEnable", "sslEnable");
|
||||
setAlias("neutrino.proxy.tunnel.jksPath", "jksPath");
|
||||
setAlias("neutrino.proxy.tunnel.keyStorePassword", "keyStorePassword");
|
||||
setAlias("neutrino.proxy.tunnel.licenseKey", "licenseKey");
|
||||
setAlias("neutrino.proxy.tunnel.server-ip", "serverIp");
|
||||
setAlias("neutrino.proxy.tunnel.server-port", "serverPort");
|
||||
setAlias("neutrino.proxy.tunnel.ssl-enable", "sslEnable");
|
||||
setAlias("neutrino.proxy.tunnel.jks-path", "jksPath");
|
||||
setAlias("neutrino.proxy.tunnel.key-store-password", "keyStorePassword");
|
||||
setAlias("neutrino.proxy.tunnel.license-key", "licenseKey");
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
FROM openjdk:8-jdk-alpine
|
||||
FROM openjdk:17-jdk-alpine
|
||||
#同步时间
|
||||
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories && \
|
||||
apk update && apk add wget unzip vim && apk add -U tzdata && \
|
||||
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone
|
||||
RUN mkdir -p /root/neutrino-proxy/config
|
||||
RUN mkdir -p /root/neutrino-proxy/neutrino-proxy-admin
|
||||
WORKDIR /root/neutrino-proxy
|
||||
COPY ../neutrino-proxy-server/target/neutrino-proxy-server.jar /root/neutrino-proxy/neutrino-proxy-server.jar
|
||||
COPY ../neutrino-proxy-server/src/main/resources/app.yml /root/neutrino-proxy/config
|
||||
COPY ../neutrino-proxy-admin/dist /root/neutrino-proxy/neutrino-proxy-admin/dist
|
||||
COPY ./target/neutrino-proxy-server.jar /root/neutrino-proxy/neutrino-proxy-server.jar
|
||||
COPY ./src/main/resources/app.yml /root/neutrino-proxy/config
|
||||
#VOLUME ["/root/neutrino-proxy"]
|
||||
ENTRYPOINT ["java","-jar","neutrino-proxy-server.jar","config=./config/app.yml"]
|
||||
|
||||
#docker run -it -p 9000-9200:9000-9200/tcp -p 8888:8888 -v /root/neutrino-proxy/config:/root/neutrino-proxy/config -d --restart=always --name neutrino registry.cn-hangzhou.aliyuncs.com/asgc/aoshiguchen-docker-images:1.7
|
||||
#docker run -it -p 9000-9200:9000-9200/tcp -p 8888:8888 -v /root/neutrino-proxy/config:/root/neutrino-proxy/config -d --restart=always --name neutrino registry.cn-hangzhou.aliyuncs.com/asgc/aoshiguchen-docker-images:1.7
|
||||
|
||||
+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);
|
||||
|
||||
@@ -77,7 +77,7 @@ neutrino:
|
||||
# 数据库类型,目前支持h2、mysql、mariadb
|
||||
type: ${DB_TYPE:h2}
|
||||
# 数据库连接URL
|
||||
url: ${DB_URL:jdbc:h2:file:~/.neutrino-proxy/data/db;MODE=MySQL;AUTO_SERVER=TRUE}
|
||||
url: ${DB_URL:jdbc:h2:file:./data/db;MODE=MySQL;AUTO_SERVER=TRUE}
|
||||
# 数据库用户名
|
||||
username: ${DB_USER:}
|
||||
# 数据库密码
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>5.1.49</version>
|
||||
<version>8.0.33</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mariadb.jdbc</groupId>
|
||||
|
||||
@@ -44,3 +44,9 @@ cp -rf ./neutrino-proxy-admin/dist $adminDeployDir/
|
||||
cp -rf ./neutrino-proxy-admin/dist/ $giteePagesDir
|
||||
cd $serverDeployDir
|
||||
zip -r neutrino-proxy-admin.zip "neutrino-proxy-admin/"
|
||||
|
||||
#拷贝到neutrino-proxy-server项目静态资源目录下
|
||||
cd ../..
|
||||
rm -rf ./neutrino-proxy-server/src/main/resources/static
|
||||
mkdir -p neutrino-proxy-server/src/main/resources/static
|
||||
cp -rf ./neutrino-proxy-admin/dist/ ./neutrino-proxy-server/src/main/resources/static
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
# 中微子代理客户端编译打包脚本,基础参数请自行修改
|
||||
|
||||
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home
|
||||
export JAVA_HOME=/Users/yangwen/my/service/graalvm/graalvm-community-openjdk-17.0.8+7.1/Contents/Home
|
||||
export MAVEN_HOME=/Users/yangwen/my/service/maven/apache-maven-3.8.1
|
||||
export PATH=:$PATH:$JAVA_HOME/bin:$MAVEN_HOME/bin
|
||||
|
||||
@@ -11,12 +11,13 @@ clientDeployDir=$deployDir"/client"
|
||||
#切到项目根目录
|
||||
cd ../..
|
||||
#初始化文件夹
|
||||
if [ ! -d "$deployDir" ];then
|
||||
mkdir $deployDir
|
||||
fi
|
||||
if [ ! -d "$clientDeployDir" ];then
|
||||
mkdir $clientDeployDir
|
||||
fi
|
||||
#if [ ! -d "$deployDir" ];then
|
||||
# mkdir $deployDir
|
||||
#fi
|
||||
#if [ ! -d "$clientDeployDir" ];then
|
||||
# mkdir $clientDeployDir
|
||||
#fi
|
||||
mkdir -p $clientDeployDir
|
||||
rm -rf $clientDeployDir/neutrino-proxy-client.jar
|
||||
#客户端打包
|
||||
mvn clean install -U -pl neutrino-proxy-client -am -Dmaven.test.skip=true
|
||||
|
||||
@@ -1,29 +1,29 @@
|
||||
#!/bin/sh
|
||||
|
||||
# 镜像版本,每次更新版本时需要调整
|
||||
ImageVer=1.8.5
|
||||
ImageVer=2.0.0
|
||||
ImageName=neutrino-proxy-client
|
||||
DockerFilePath=$PWD/../../neutrino-proxy-client/Dockerfile
|
||||
DockerFilePath=$PWD/../../neutrino-proxy-client
|
||||
|
||||
deployDir=$PWD/../../"deploy"
|
||||
clientDeployDir=$deployDir"/client"
|
||||
|
||||
#切到项目根目录
|
||||
#初始化文件夹
|
||||
if [ ! -d "$deployDir" ];then
|
||||
mkdir $deployDir
|
||||
fi
|
||||
if [ ! -d "$clientDeployDir" ];then
|
||||
mkdir $clientDeployDir
|
||||
fi
|
||||
rm -rf $clientDeployDir/$ImageName.tar
|
||||
##初始化文件夹
|
||||
#deployDir=$PWD/../../"deploy"
|
||||
#clientDeployDir=$deployDir"/client"
|
||||
#if [ ! -d "$deployDir" ];then
|
||||
# mkdir $deployDir
|
||||
#fi
|
||||
#if [ ! -d "$clientDeployDir" ];then
|
||||
# mkdir $clientDeployDir
|
||||
#fi
|
||||
#rm -rf $clientDeployDir/$ImageName.tar
|
||||
|
||||
#echo '打包jar...'
|
||||
sh ./client_build.sh
|
||||
#sh ./client_build.sh
|
||||
|
||||
# 删除老的本地镜像
|
||||
docker rmi -f $(docker images | grep $ImageName | awk '{print $3}')
|
||||
# 构建镜像
|
||||
docker build -t $ImageName:$ImageVer -t $ImageName:latest -f $DockerFilePath $PWD/../..
|
||||
docker build -t $ImageName:$ImageVer -t $ImageName:latest $DockerFilePath
|
||||
# 保存镜像到本地
|
||||
docker save -o $clientDeployDir/$ImageName.tar $ImageName:$ImageVer
|
||||
#docker save -o $clientDeployDir/$ImageName.tar $ImageName:$ImageVer
|
||||
|
||||
# docker run -it -e LICENSE_KEY=b0a907332b474b25897c4dcb31fc7eb6 -e SERVER_IP=host.docker.internal --name np-client neutrino-proxy-client:2.0.0
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/bin/sh
|
||||
# 中微子代理客户端启动脚本,基础参数请自行修改
|
||||
|
||||
JAVA_OPS="-server -Xms256m -Xmx512m -XX:PermSize=128M -XX:MaxPermSize=256M -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/work/$NAME/heapError/"
|
||||
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home
|
||||
JAVA_OPS="-server -Xms256m -Xmx512m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/work/$NAME/heapError/"
|
||||
export JAVA_HOME=/Users/yangwen/my/service/graalvm/graalvm-community-openjdk-17.0.8+7.1/Contents/Home
|
||||
export PATH=:$PATH:$JAVA_HOME/bin
|
||||
export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
|
||||
mkdir -p /work/$NAME/heapError/
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
# 中微子代理服务端编译打包脚本,基础参数请自行修改
|
||||
|
||||
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home
|
||||
export JAVA_HOME=/Users/yangwen/my/service/graalvm/graalvm-community-openjdk-17.0.8+7.1/Contents/Home
|
||||
export MAVEN_HOME=/Users/yangwen/my/service/maven/apache-maven-3.8.1
|
||||
export PATH=:$PATH:$JAVA_HOME/bin:$MAVEN_HOME/bin
|
||||
|
||||
@@ -11,12 +11,13 @@ serverDeployDir=$deployDir"/server"
|
||||
#切到项目根目录
|
||||
cd ../..
|
||||
#初始化文件夹
|
||||
if [ ! -d "$deployDir" ];then
|
||||
mkdir $deployDir
|
||||
fi
|
||||
if [ ! -d "$serverDeployDir" ];then
|
||||
mkdir $serverDeployDir
|
||||
fi
|
||||
#if [ ! -d "$deployDir" ];then
|
||||
# mkdir $deployDir
|
||||
#fi
|
||||
#if [ ! -d "$serverDeployDir" ];then
|
||||
# mkdir $serverDeployDir
|
||||
#fi
|
||||
mkdir -p $serverDeployDir
|
||||
rm -rf $serverDeployDir/neutrino-proxy-server.jar
|
||||
|
||||
#服务端打包
|
||||
|
||||
@@ -1,17 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
# 镜像版本,每次更新版本时需要调整
|
||||
ImageVer=1.0.0
|
||||
ImageVer=2.0.0
|
||||
ImageName=neutrino-proxy
|
||||
DockerFilePath=$PWD/../..
|
||||
DockerFilePath=$PWD/../../neutrino-proxy-server
|
||||
|
||||
#echo '打包jar...'
|
||||
sh ./server_build.sh
|
||||
#echo '打包管理后台...'
|
||||
sh ./admin_build_docker.sh
|
||||
#echo '打包jar...'
|
||||
sh ./server_build.sh
|
||||
|
||||
# 删除老的本地镜像
|
||||
docker rmi -f $(docker images | grep $ImageName | awk '{print $3}')
|
||||
# 构建镜像
|
||||
docker build -t $ImageName:$ImageVer -t $ImageName:latest $DockerFilePath
|
||||
|
||||
# docker run -it -p 9000-9200:9000-9200/tcp -p 8888:8888 --name np-server neutrino-proxy:2.0.0
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/bin/sh
|
||||
# 中微子代理服务端启动脚本,基础参数请自行修改
|
||||
|
||||
JAVA_OPS="-server -Xms256m -Xmx1024m -XX:PermSize=128M -XX:MaxPermSize=256M -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/work/$NAME/heapError/"
|
||||
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home
|
||||
JAVA_OPS="-server -Xms256m -Xmx1024m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/work/$NAME/heapError/"
|
||||
export JAVA_HOME=/Users/yangwen/my/service/graalvm/graalvm-community-openjdk-17.0.8+7.1/Contents/Home
|
||||
export PATH=:$PATH:$JAVA_HOME/bin
|
||||
export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
|
||||
mkdir -p /work/$NAME/heapError/
|
||||
|
||||
Reference in New Issue
Block a user