update libs

This commit is contained in:
arm64v8a
2023-04-21 10:03:21 +09:00
parent 54daea957a
commit ff23fb7173
10 changed files with 51 additions and 37 deletions

View File

@@ -1 +0,0 @@
8134d3cc23aa6b8e2a056887addf22d7d22bd969

View File

@@ -1,22 +1,25 @@
## 构建 nekoray_core & nekobox_core ## 构建 nekoray_core & nekobox_core
### 简易构建 ### 目录结构
1.`Matsuridayo/v2ray-core` 置于 `../` ```
2. 进入 `go/cmd/nekoray_core` 文件夹 `go build` 得到 `nekoray_core` | nekoray
3. 进入 `go/cmd/nekobox_core` 文件夹 `go build` 得到 `nekobox_core` | go/cmd/*
| v2ray_core
具体编译过程请参考 `libs/get_source.sh` `libs/build_go.sh` | sing-box-extra
| sing-box
非官方构建无需编译 `updater` `launcher` | ......
```
### 常规构建 ### 常规构建
1. `Matsuridayo/v2ray-core` 置于 `../` 1. `bash libs/get_source.sh` (自动下载目录结构,自动 checkout commit
2. `GOOS=windows GOARCH=amd64 bash libs/build_go.sh` 2. `GOOS=windows GOARCH=amd64 bash libs/build_go.sh`
具体支持的 GOOS 和 GOARCH 请看 `libs/build_go.sh` 具体支持的 GOOS 和 GOARCH 请看 `libs/build_go.sh`
非官方构建无需编译 `updater` `launcher`
### sing-box tags ### sing-box tags
具体使用的 tags 请看 `libs/build_go.sh` 具体使用的 tags 请看 `libs/build_go.sh`

View File

@@ -3,9 +3,10 @@ module nekobox_core
go 1.19 go 1.19
require ( require (
github.com/matsuridayo/libneko v0.0.0-20230315005352-9d7e3f3a79d1 github.com/matsuridayo/libneko v1.0.0 // replaced
github.com/matsuridayo/sing-box-extra v0.0.0-20230417014110-39b3adb5f93f github.com/matsuridayo/sing-box-extra v1.0.0 // replaced
github.com/sagernet/sing-box v1.2.4 github.com/sagernet/sing-box v1.0.0 // replaced
github.com/sagernet/sing-dns v1.0.0 // indirect; replaced
grpc_server v1.0.0 grpc_server v1.0.0
) )
@@ -55,7 +56,6 @@ require (
github.com/sagernet/quic-go v0.0.0-20230202071646-a8c8afb18b32 // indirect github.com/sagernet/quic-go v0.0.0-20230202071646-a8c8afb18b32 // indirect
github.com/sagernet/reality v0.0.0-20230406110435-ee17307e7691 // indirect github.com/sagernet/reality v0.0.0-20230406110435-ee17307e7691 // indirect
github.com/sagernet/sing v0.2.3 // indirect github.com/sagernet/sing v0.2.3 // indirect
github.com/sagernet/sing-dns v0.1.5-0.20230415085626-111ecf799dfc // indirect
github.com/sagernet/sing-shadowsocks v0.2.0 // indirect github.com/sagernet/sing-shadowsocks v0.2.0 // indirect
github.com/sagernet/sing-shadowtls v0.1.0 // indirect github.com/sagernet/sing-shadowtls v0.1.0 // indirect
github.com/sagernet/sing-tun v0.1.4-0.20230326080954-8848c0e4cbab // indirect github.com/sagernet/sing-tun v0.1.4-0.20230326080954-8848c0e4cbab // indirect
@@ -92,10 +92,10 @@ require (
replace grpc_server v1.0.0 => ../../grpc_server replace grpc_server v1.0.0 => ../../grpc_server
// replace github.com/matsuridayo/sing-box-extra => ../../../../sing-box-extra replace github.com/matsuridayo/libneko v1.0.0 => ../../../../libneko
// replace github.com/sagernet/sing-box => ../../../../sing-box replace github.com/matsuridayo/sing-box-extra v1.0.0 => ../../../../sing-box-extra
// replace github.com/sagernet/sing-dns => ../../../../sing-dns replace github.com/sagernet/sing-box v1.0.0 => ../../../../sing-box
replace github.com/sagernet/sing-dns => github.com/matsuridayo/sing-dns v0.0.0-20230410025504-c609bffff165 replace github.com/sagernet/sing-dns v1.0.0 => ../../../../sing-dns

View File

@@ -95,12 +95,6 @@ github.com/libdns/libdns v0.2.1 h1:Wu59T7wSHRgtA0cfxC+n1c/e+O3upJGWytknkmFEDis=
github.com/libdns/libdns v0.2.1/go.mod h1:yQCXzk1lEZmmCPa857bnk4TsOiqYasqpyOEeSObbb40= github.com/libdns/libdns v0.2.1/go.mod h1:yQCXzk1lEZmmCPa857bnk4TsOiqYasqpyOEeSObbb40=
github.com/logrusorgru/aurora v2.0.3+incompatible h1:tOpm7WcpBTn4fjmVfgpQq0EfczGlG91VSDkswnjF5A8= github.com/logrusorgru/aurora v2.0.3+incompatible h1:tOpm7WcpBTn4fjmVfgpQq0EfczGlG91VSDkswnjF5A8=
github.com/logrusorgru/aurora v2.0.3+incompatible/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= github.com/logrusorgru/aurora v2.0.3+incompatible/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4=
github.com/matsuridayo/libneko v0.0.0-20230315005352-9d7e3f3a79d1 h1:+FflyEuq2hn++MENFuT1/qFHz0KITKK/F6ZHxs23mrg=
github.com/matsuridayo/libneko v0.0.0-20230315005352-9d7e3f3a79d1/go.mod h1:IRO07Queptz/rGFvEW+3Hmwpx7MCup6WiDs4p5jMt4g=
github.com/matsuridayo/sing-box-extra v0.0.0-20230417014110-39b3adb5f93f h1:x0UjjMoYh5WSDGhIuRkmZUhGoxXnK++wyvuPnURhz6Q=
github.com/matsuridayo/sing-box-extra v0.0.0-20230417014110-39b3adb5f93f/go.mod h1:NfCwDELPcVFo8rp0d/P7M2OPmegGCGcwF4GSpgZu8Rs=
github.com/matsuridayo/sing-dns v0.0.0-20230410025504-c609bffff165 h1:19PQEuBatWsTdQaoB60wdxQFHr3DOBhdTCpHzbkPDNw=
github.com/matsuridayo/sing-dns v0.0.0-20230410025504-c609bffff165/go.mod h1:69PNSHyEmXdjf6C+bXBOdr2GQnPeEyWjIzo/MV8gmz8=
github.com/mholt/acmez v1.1.0 h1:IQ9CGHKOHokorxnffsqDvmmE30mDenO1lptYZ1AYkHY= github.com/mholt/acmez v1.1.0 h1:IQ9CGHKOHokorxnffsqDvmmE30mDenO1lptYZ1AYkHY=
github.com/mholt/acmez v1.1.0/go.mod h1:zwo5+fbLLTowAX8o8ETfQzbDtwGEXnPhkmGdKIP+bgs= github.com/mholt/acmez v1.1.0/go.mod h1:zwo5+fbLLTowAX8o8ETfQzbDtwGEXnPhkmGdKIP+bgs=
github.com/miekg/dns v1.1.53 h1:ZBkuHr5dxHtB1caEOlZTLPo7D3L3TWckgUUs/RHfDxw= github.com/miekg/dns v1.1.53 h1:ZBkuHr5dxHtB1caEOlZTLPo7D3L3TWckgUUs/RHfDxw=
@@ -145,8 +139,6 @@ github.com/sagernet/sing v0.0.0-20220817130738-ce854cda8522/go.mod h1:QVsS5L/ZA2
github.com/sagernet/sing v0.1.8/go.mod h1:jt1w2u7lJQFFSGLiRrRIs5YWmx4kAPfWuOejuDW9qMk= github.com/sagernet/sing v0.1.8/go.mod h1:jt1w2u7lJQFFSGLiRrRIs5YWmx4kAPfWuOejuDW9qMk=
github.com/sagernet/sing v0.2.3 h1:V50MvZ4c3Iij2lYFWPlzL1PyipwSzjGeN9x+Ox89vpk= github.com/sagernet/sing v0.2.3 h1:V50MvZ4c3Iij2lYFWPlzL1PyipwSzjGeN9x+Ox89vpk=
github.com/sagernet/sing v0.2.3/go.mod h1:Ta8nHnDLAwqySzKhGoKk4ZIB+vJ3GTKj7UPrWYvM+4w= github.com/sagernet/sing v0.2.3/go.mod h1:Ta8nHnDLAwqySzKhGoKk4ZIB+vJ3GTKj7UPrWYvM+4w=
github.com/sagernet/sing-box v1.2.4 h1:41tDGjU4zCym459HYbpKRJpGmi8zi1FcKAvv6DfqWOQ=
github.com/sagernet/sing-box v1.2.4/go.mod h1:LDW5ZOuWURxSWz+auElryalxCBlGbA0zvsC8XSy8Sp0=
github.com/sagernet/sing-shadowsocks v0.2.0 h1:ILDWL7pwWfkPLEbviE/MyCgfjaBmJY/JVVY+5jhSb58= github.com/sagernet/sing-shadowsocks v0.2.0 h1:ILDWL7pwWfkPLEbviE/MyCgfjaBmJY/JVVY+5jhSb58=
github.com/sagernet/sing-shadowsocks v0.2.0/go.mod h1:ysYzszRLpNzJSorvlWRMuzU6Vchsp7sd52q+JNY4axw= github.com/sagernet/sing-shadowsocks v0.2.0/go.mod h1:ysYzszRLpNzJSorvlWRMuzU6Vchsp7sd52q+JNY4axw=
github.com/sagernet/sing-shadowtls v0.1.0 h1:05MYce8aR5xfKIn+y7xRFsdKhKt44QZTSEQW+lG5IWQ= github.com/sagernet/sing-shadowtls v0.1.0 h1:05MYce8aR5xfKIn+y7xRFsdKhKt44QZTSEQW+lG5IWQ=

View File

@@ -1,2 +0,0 @@
go get github.com/sagernet/sing-box@"$1"
go mod tidy

View File

@@ -1,2 +0,0 @@
go get github.com/matsuridayo/sing-box-extra@"$1"
go mod tidy

View File

@@ -6,7 +6,7 @@ require (
github.com/Dreamacro/clash v1.9.0 github.com/Dreamacro/clash v1.9.0
github.com/jsimonetti/rtnetlink v1.2.2 github.com/jsimonetti/rtnetlink v1.2.2
github.com/matsuridayo/libneko v0.0.0-20230304130313-5ea96b79b3c3 github.com/matsuridayo/libneko v0.0.0-20230304130313-5ea96b79b3c3
github.com/v2fly/v2ray-core/v5 v5.0.0 github.com/v2fly/v2ray-core/v5 v5.0.0 // replaced
grpc_server v1.0.0 grpc_server v1.0.0
kernel.org/pub/linux/libs/security/libcap/cap v1.2.65 kernel.org/pub/linux/libs/security/libcap/cap v1.2.65
) )

View File

@@ -3,7 +3,9 @@ set -e
source libs/deploy_common.sh source libs/deploy_common.sh
[ "$GOOS" == "windows" ] && [ "$GOARCH" == "amd64" ] && DEST=$DEPLOYMENT/windows64 || true [ "$GOOS" == "windows" ] && [ "$GOARCH" == "amd64" ] && DEST=$DEPLOYMENT/windows64 || true
[ "$GOOS" == "windows" ] && [ "$GOARCH" == "arm64" ] && DEST=$DEPLOYMENT/windows-arm64 || true
[ "$GOOS" == "linux" ] && [ "$GOARCH" == "amd64" ] && DEST=$DEPLOYMENT/linux64 || true [ "$GOOS" == "linux" ] && [ "$GOARCH" == "amd64" ] && DEST=$DEPLOYMENT/linux64 || true
[ "$GOOS" == "linux" ] && [ "$GOARCH" == "arm64" ] && DEST=$DEPLOYMENT/linux-arm64 || true
[ "$GOOS" == "darwin" ] && [ "$GOARCH" == "amd64" ] && DEST=$DEPLOYMENT/macos-amd64 || true [ "$GOOS" == "darwin" ] && [ "$GOARCH" == "amd64" ] && DEST=$DEPLOYMENT/macos-amd64 || true
[ "$GOOS" == "darwin" ] && [ "$GOARCH" == "arm64" ] && DEST=$DEPLOYMENT/macos-arm64 || true [ "$GOOS" == "darwin" ] && [ "$GOARCH" == "arm64" ] && DEST=$DEPLOYMENT/macos-arm64 || true
if [ -z $DEST ]; then if [ -z $DEST ]; then

View File

@@ -2,16 +2,29 @@
set -e set -e
source libs/deploy_common.sh source libs/deploy_common.sh
ENV_NEKORAY=1
#### get source #### source libs/get_source_env.sh
COMMIT_V=$(cat core_commit.txt)
pushd .. pushd ..
git clone --no-checkout https://github.com/MatsuriDayo/v2ray-core.git ####
if [ ! -d "sing-box-extra" ]; then
git clone --no-checkout https://github.com/MatsuriDayo/sing-box-extra.git
fi
pushd sing-box-extra
git checkout "$COMMIT_SING_BOX_EXTRA"
ENV_SING_BOX_EXTRA=1
source $SRC_ROOT/libs/get_source_env.sh
NO_ENV=1 ./libs/get_source.sh
popd
####
if [ ! -d "v2ray-core" ]; then
git clone --no-checkout https://github.com/MatsuriDayo/v2ray-core.git
fi
pushd v2ray-core pushd v2ray-core
git checkout $COMMIT_V git checkout "$COMMIT_MATSURI_V2RAY"
popd popd
popd popd

9
libs/get_source_env.sh Normal file
View File

@@ -0,0 +1,9 @@
if [ ! -z $ENV_NEKORAY ]; then
export COMMIT_SING_BOX_EXTRA="a4eacbd0e54b6ec0a42096c42b6137a5be91a0bc"
export COMMIT_MATSURI_V2RAY="8134d3cc23aa6b8e2a056887addf22d7d22bd969"
fi
if [ ! -z $ENV_SING_BOX_EXTRA ]; then
source libs/get_source_env.sh
# export COMMIT_SING_BOX=""
fi