forked from SagerNet/sing-box
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
31 changed files
with
248 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/usr/bin/env bash | ||
|
||
PROJECTS=$(dirname "$0")/../.. | ||
|
||
function updateClient() { | ||
pushd clients/$1 | ||
git fetch | ||
git reset FETCH_HEAD --hard | ||
popd | ||
git add clients/$1 | ||
} | ||
|
||
updateClient "apple" | ||
updateClient "android" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[submodule "clients/apple"] | ||
path = clients/apple | ||
url = https://github.com/SagerNet/sing-box-for-apple.git | ||
[submodule "clients/android"] | ||
path = clients/android | ||
url = https://github.com/SagerNet/sing-box-for-android.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM --platform=$BUILDPLATFORM golang:1.21-alpine AS builder | ||
FROM --platform=$BUILDPLATFORM golang:1.22-alpine AS builder | ||
LABEL maintainer="nekohasekai <[email protected]>" | ||
COPY . /go/src/github.com/sagernet/sing-box | ||
WORKDIR /go/src/github.com/sagernet/sing-box | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
NAME = sing-box | ||
COMMIT = $(shell git rev-parse --short HEAD) | ||
TAGS_GO118 = with_gvisor,with_dhcp,with_wireguard,with_reality_server,with_clash_api | ||
TAGS_GO120 = with_quic,with_ech,with_utls | ||
TAGS ?= $(TAGS_GO118),$(TAGS_GO120),with_gvisor,with_quic,with_wireguard,with_ech,with_utls,with_clash_api,with_grpc | ||
TAGS_GO120 = with_quic,with_utls | ||
TAGS_GO121 = with_ech | ||
TAGS ?= $(TAGS_GO118),$(TAGS_GO120),$(TAGS_GO121) | ||
TAGS_TEST ?= with_gvisor,with_quic,with_wireguard,with_grpc,with_ech,with_utls,with_reality_server | ||
|
||
GOHOSTOS = $(shell go env GOHOSTOS) | ||
|
@@ -23,6 +24,10 @@ ci_build_go118: | |
go build $(PARAMS) $(MAIN) | ||
go build $(PARAMS) -tags "$(TAGS_GO118)" $(MAIN) | ||
|
||
ci_build_go120: | ||
go build $(PARAMS) $(MAIN) | ||
go build $(PARAMS) -tags "$(TAGS_GO118),$(TAGS_GO120)" $(MAIN) | ||
|
||
ci_build: | ||
go build $(PARAMS) $(MAIN) | ||
go build $(MAIN_PARAMS) $(MAIN) | ||
|
@@ -61,7 +66,14 @@ proto_install: | |
release: | ||
go run ./cmd/internal/build goreleaser release --clean --skip-publish || exit 1 | ||
mkdir dist/release | ||
mv dist/*.tar.gz dist/*.zip dist/*.deb dist/*.rpm dist/*.pkg.tar.zst dist/release | ||
mv dist/*.tar.gz \ | ||
dist/*.zip \ | ||
dist/*.deb \ | ||
dist/*.rpm \ | ||
dist/*_amd64.pkg.tar.zst \ | ||
dist/*_amd64v3.pkg.tar.zst \ | ||
dist/*_arm64.pkg.tar.zst \ | ||
dist/release | ||
ghr --replace --draft --prerelease -p 3 "v${VERSION}" dist/release | ||
rm -r dist/release | ||
|
||
|
@@ -73,11 +85,12 @@ update_android_version: | |
go run ./cmd/internal/update_android_version | ||
|
||
build_android: | ||
cd ../sing-box-for-android && ./gradlew :app:assemblePlayRelease && ./gradlew --stop | ||
cd ../sing-box-for-android && ./gradlew :app:assemblePlayRelease && ./gradlew :app:assembleOtherRelease && ./gradlew --stop | ||
|
||
upload_android: | ||
mkdir -p dist/release_android | ||
cp ../sing-box-for-android/app/build/outputs/apk/play/release/*.apk dist/release_android | ||
cp ../sing-box-for-android/app/build/outputs/apk/other/release/*-universal.apk dist/release_android | ||
ghr --replace --draft --prerelease -p 3 "v${VERSION}" dist/release_android | ||
rm -rf dist/release_android | ||
|
||
|
@@ -178,8 +191,8 @@ lib: | |
go run ./cmd/internal/build_libbox -target ios | ||
|
||
lib_install: | ||
go install -v github.com/sagernet/gomobile/cmd/[email protected].1 | ||
go install -v github.com/sagernet/gomobile/cmd/[email protected].1 | ||
go install -v github.com/sagernet/gomobile/cmd/[email protected].3 | ||
go install -v github.com/sagernet/gomobile/cmd/[email protected].3 | ||
|
||
docs: | ||
mkdocs serve | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.