Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
237 commits
Select commit Hold shift + click to select a range
d6f9414
release: Add openwrt packages
nekohasekai Apr 14, 2025
02f88db
Fix wireguard endpoint
nekohasekai Apr 16, 2025
a17e8cb
Fix urltest outbound
nekohasekai Apr 16, 2025
eaad23b
Bump version
nekohasekai Apr 16, 2025
22bf2ed
refactor: DNS
nekohasekai Mar 16, 2025
0b92750
refactor: Outbound domain resolver
nekohasekai Jan 12, 2025
80eba20
Add TLS fragment support
nekohasekai Jan 26, 2025
1639cc1
Add certificate store
nekohasekai Jan 8, 2025
488f873
documentation: Refactor DNS
nekohasekai Jan 25, 2025
7683a96
documentation: Outbound domain resolver
nekohasekai Jan 29, 2025
eed125f
documentation: TLS fragment
nekohasekai Jan 30, 2025
4039692
documentation: Certificate store
nekohasekai Jan 30, 2025
6ae5791
documentation: Remove outdated icons
nekohasekai Jan 30, 2025
d003b43
Build legacy binaries with latest Go
nekohasekai Feb 12, 2025
d947db6
Add Tailscale endpoint
nekohasekai Apr 6, 2025
b6b3159
Remove single quotes of raw Moziila certs
xchacha20-poly1305 Feb 12, 2025
0ec336f
Update dependencies
nekohasekai Feb 14, 2025
7eb1e36
Add back port hopping to hysteria 1
nekohasekai Feb 16, 2025
bc8f8df
Fix toolchain version
nekohasekai Feb 18, 2025
70cdda3
Improve resolve action
nekohasekai Feb 20, 2025
d62388e
Get darwin local DNS server from libresolv
nekohasekai Feb 20, 2025
3af95a1
Add fallback local DNS server for iOS
nekohasekai Feb 20, 2025
6cd6a37
Migrate to stdlib ECH support
nekohasekai Feb 22, 2025
4c6108a
Add AnyTLS protocol
anytls Feb 20, 2025
d7c69ac
documentation: Fix AnyTLS doc
nekohasekai Feb 22, 2025
b549b09
Fix Outbound deadlock
alireza0 Feb 23, 2025
64b7997
documentation: Fix typo
libtry486 Feb 23, 2025
962ecdc
documentation: Minor fixes
Feb 20, 2025
b1993f9
Add MinIdleSession option to AnyTLS outbound
anytls Feb 24, 2025
389d58d
documentation: Fix missing hosts DNS server
nekohasekai Feb 24, 2025
8cd8098
Fix DNS fallback
nekohasekai Feb 25, 2025
033a9c0
Fix parsing legacy DNS options
TargetLocked Feb 25, 2025
1e45d84
documentation: Fix typo
BedrockDigger Feb 25, 2025
3609613
Update sing-anytls
anytls Feb 25, 2025
bcd581a
Fix missing AnyTLS display name
Zephyruso Feb 25, 2025
0fdcfcb
Fix domain resolver on direct outbound
nekohasekai Feb 26, 2025
ed01778
Move predefined DNS server to rule action
nekohasekai Feb 26, 2025
70587ea
Fix anytls dialer usage
nekohasekai Feb 27, 2025
68f0d36
documentation: Fix missing `ip_accept_any` DNS rule option
nekohasekai Mar 6, 2025
85b2e5f
Fix UDP DNS server crash
nekohasekai Mar 6, 2025
362b423
Fix hosts DNS server
k9982874 Mar 10, 2025
b4e6a76
Update sing-anytls
anytls Mar 10, 2025
4e7934e
documentation: Fix typo
Restia-Ashbell Mar 10, 2025
fe7657c
Fix http3 DNS server connecting to wrong address
nekohasekai Mar 13, 2025
a0cd0f8
Fix DNS lookup context pollution
nekohasekai Mar 13, 2025
258a3a5
Make `domain_resolver` optional when only one DNS server is configured
nekohasekai Mar 15, 2025
37e3641
option: Fix marshal legacy DNS options
nekohasekai Mar 15, 2025
f0b2a8d
Add ntp protocol sniffing
k9982874 Mar 15, 2025
91572db
Fix Tailscale DNS
nekohasekai Mar 15, 2025
5f3a9ac
Add wildcard-sni support for shadow-tls inbound
nekohasekai Mar 16, 2025
a669b30
Fix unhandled DNS loop
nekohasekai Mar 17, 2025
945106f
Remove map usage in options
nekohasekai Mar 18, 2025
d514873
Add wildcard name support for predefined records
nekohasekai Mar 18, 2025
efffd70
Add netns support
nekohasekai Mar 18, 2025
82a08d1
Explicitly reject detour to empty direct outbounds
nekohasekai Mar 20, 2025
1fae8e6
release: Do not build tailscale on iOS and tvOS
nekohasekai Mar 21, 2025
7f4c37a
Update gVisor to 20250319.0
nekohasekai Mar 24, 2025
d0b7433
Fail when default DNS server not found
nekohasekai Mar 24, 2025
df01484
Fix missing `with_tailscale` in Dockerfile
Mar 26, 2025
bad31b5
Update anytls
anytls Mar 27, 2025
512d516
Fix DNS over QUIC stream close
dyhkwong Mar 27, 2025
90fe2ea
Fix Tailscale dialer
nekohasekai Mar 28, 2025
fede7ed
Allow direct outbounds without `domain_resolver`
nekohasekai Apr 1, 2025
1dae8e6
release: Update Go to 1.24.2
nekohasekai Apr 3, 2025
13eedc2
Fix fetch ECH configs
Apr 6, 2025
6d5d86b
Fix UDP DNS server crash
iikira Apr 6, 2025
9e5e0a4
release: Skip override version for iOS
nekohasekai Apr 8, 2025
3ff130a
Fix DNS dialer
nekohasekai Apr 8, 2025
7a72ee0
Update anytls
anytls Apr 9, 2025
470f1cf
Improve local DNS server
nekohasekai Apr 12, 2025
d3233a3
Fix missing handling of legacy `domain_strategy` options
nekohasekai Apr 17, 2025
741befc
documentation: Try to make the play review happy
nekohasekai Apr 17, 2025
50384bd
documentation: Bump version
nekohasekai Mar 27, 2025
ad42f74
添加with_dynamic_api
mingtianquan Apr 18, 2025
abb256f
添加with_dynamic_api
mingtianquan Apr 18, 2025
dba9eca
添加with_dynamic_api
mingtianquan Apr 18, 2025
21a4bf8
添加with_dynamic_api
mingtianquan Apr 18, 2025
a4dea64
refactor: DNS
nekohasekai Mar 16, 2025
233b475
refactor: Outbound domain resolver
nekohasekai Jan 12, 2025
cac5f04
Add TLS fragment support
nekohasekai Jan 26, 2025
380222c
Add certificate store
nekohasekai Jan 8, 2025
e17ae9e
documentation: Refactor DNS
nekohasekai Jan 25, 2025
38ace76
documentation: Outbound domain resolver
nekohasekai Jan 29, 2025
283b0c5
documentation: TLS fragment
nekohasekai Jan 30, 2025
bd8503d
documentation: Certificate store
nekohasekai Jan 30, 2025
d51692d
documentation: Remove outdated icons
nekohasekai Jan 30, 2025
d0f52be
Build legacy binaries with latest Go
nekohasekai Feb 12, 2025
a453fda
Add Tailscale endpoint
nekohasekai Apr 6, 2025
442ba0c
Remove single quotes of raw Moziila certs
xchacha20-poly1305 Feb 12, 2025
3161c11
Update dependencies
nekohasekai Feb 14, 2025
bdf0734
Add back port hopping to hysteria 1
nekohasekai Feb 16, 2025
7a6d097
Fix toolchain version
nekohasekai Feb 18, 2025
6177bab
Improve resolve action
nekohasekai Feb 20, 2025
4ac74f1
Get darwin local DNS server from libresolv
nekohasekai Feb 20, 2025
3d73094
Add fallback local DNS server for iOS
nekohasekai Feb 20, 2025
b497b67
Migrate to stdlib ECH support
nekohasekai Feb 22, 2025
ac7b1c5
Add AnyTLS protocol
anytls Feb 20, 2025
d0d988f
documentation: Fix AnyTLS doc
nekohasekai Feb 22, 2025
fcc52a4
Fix Outbound deadlock
alireza0 Feb 23, 2025
af6f7c0
documentation: Fix typo
libtry486 Feb 23, 2025
37d16c6
documentation: Minor fixes
Feb 20, 2025
b290068
Add MinIdleSession option to AnyTLS outbound
anytls Feb 24, 2025
bc9e673
documentation: Fix missing hosts DNS server
nekohasekai Feb 24, 2025
3ecf86e
Fix DNS fallback
nekohasekai Feb 25, 2025
661a437
Fix parsing legacy DNS options
TargetLocked Feb 25, 2025
2fb54b8
documentation: Fix typo
BedrockDigger Feb 25, 2025
d3e8c67
Update sing-anytls
anytls Feb 25, 2025
2e2efbe
Fix missing AnyTLS display name
Zephyruso Feb 25, 2025
05d27f5
Fix domain resolver on direct outbound
nekohasekai Feb 26, 2025
04fb124
Move predefined DNS server to rule action
nekohasekai Feb 26, 2025
5420d78
Fix anytls dialer usage
nekohasekai Feb 27, 2025
a455127
documentation: Fix missing `ip_accept_any` DNS rule option
nekohasekai Mar 6, 2025
75160c1
Fix UDP DNS server crash
nekohasekai Mar 6, 2025
fbe6181
Fix hosts DNS server
k9982874 Mar 10, 2025
cc259db
Update sing-anytls
anytls Mar 10, 2025
0d29f02
documentation: Fix typo
Restia-Ashbell Mar 10, 2025
f5cd08c
Fix http3 DNS server connecting to wrong address
nekohasekai Mar 13, 2025
c013a0c
Fix DNS lookup context pollution
nekohasekai Mar 13, 2025
69305be
Make `domain_resolver` optional when only one DNS server is configured
nekohasekai Mar 15, 2025
c6387b8
option: Fix marshal legacy DNS options
nekohasekai Mar 15, 2025
766386f
Add ntp protocol sniffing
k9982874 Mar 15, 2025
34b95d8
Fix Tailscale DNS
nekohasekai Mar 15, 2025
fa741f9
Add wildcard-sni support for shadow-tls inbound
nekohasekai Mar 16, 2025
cb727c8
Fix unhandled DNS loop
nekohasekai Mar 17, 2025
796e825
Remove map usage in options
nekohasekai Mar 18, 2025
4138f33
Add wildcard name support for predefined records
nekohasekai Mar 18, 2025
0afaae0
Add netns support
nekohasekai Mar 18, 2025
09f8b98
Explicitly reject detour to empty direct outbounds
nekohasekai Mar 20, 2025
d5d7320
release: Do not build tailscale on iOS and tvOS
nekohasekai Mar 21, 2025
e601393
Update gVisor to 20250319.0
nekohasekai Mar 24, 2025
ef2d2d4
Fail when default DNS server not found
nekohasekai Mar 24, 2025
dc9196d
Fix missing `with_tailscale` in Dockerfile
Mar 26, 2025
17d7211
Update anytls
anytls Mar 27, 2025
674699d
Fix DNS over QUIC stream close
dyhkwong Mar 27, 2025
782baad
Fix Tailscale dialer
nekohasekai Mar 28, 2025
d6f83f3
Allow direct outbounds without `domain_resolver`
nekohasekai Apr 1, 2025
1df4a1f
release: Update Go to 1.24.2
nekohasekai Apr 3, 2025
7d9058c
Fix fetch ECH configs
Apr 6, 2025
e356515
Fix UDP DNS server crash
iikira Apr 6, 2025
56ef2e5
release: Skip override version for iOS
nekohasekai Apr 8, 2025
acdfa70
Fix DNS dialer
nekohasekai Apr 8, 2025
867194c
Update anytls
anytls Apr 9, 2025
9f3bb97
Improve local DNS server
nekohasekai Apr 12, 2025
7869374
Fix missing handling of legacy `domain_strategy` options
nekohasekai Apr 17, 2025
0e9a38e
documentation: Try to make the play review happy
nekohasekai Apr 17, 2025
bc216ca
Fix callback deletion in UDP transport
caelansar Apr 19, 2025
c2749ce
documentation: Minor fixes
Apr 19, 2025
230ac25
documentation: Bump version
nekohasekai Mar 27, 2025
47cba95
添加保存配置和重载配置,测试出站连接api
Apr 20, 2025
d512411
Merge remote-tracking branch 'upstream/dev' into dev-next
Apr 21, 2025
37e79c3
添加保存配置和重载配置,测试出站连接api
Apr 21, 2025
d727436
更新mod
Apr 22, 2025
245f482
更新mod
Apr 22, 2025
5d2a70a
refactor: DNS
nekohasekai Mar 16, 2025
9e4dfcf
refactor: Outbound domain resolver
nekohasekai Jan 12, 2025
493bc24
Add TLS fragment support
nekohasekai Jan 26, 2025
ea8aeb0
Add certificate store
nekohasekai Jan 8, 2025
0e0ca75
documentation: Refactor DNS
nekohasekai Jan 25, 2025
9d4bab4
documentation: Outbound domain resolver
nekohasekai Jan 29, 2025
ceb7a25
documentation: TLS fragment
nekohasekai Jan 30, 2025
9c53916
documentation: Certificate store
nekohasekai Jan 30, 2025
ad4f822
documentation: Remove outdated icons
nekohasekai Jan 30, 2025
06b6369
Build legacy binaries with latest Go
nekohasekai Feb 12, 2025
eccace2
Add Tailscale endpoint
nekohasekai Apr 6, 2025
d43767f
Remove single quotes of raw Moziila certs
xchacha20-poly1305 Feb 12, 2025
382ed81
Update dependencies
nekohasekai Feb 14, 2025
6cdf99d
Add back port hopping to hysteria 1
nekohasekai Feb 16, 2025
dfc6398
Fix toolchain version
nekohasekai Feb 18, 2025
aa91604
Improve resolve action
nekohasekai Feb 20, 2025
42fd9b5
Get darwin local DNS server from libresolv
nekohasekai Feb 20, 2025
ead0b3d
Add fallback local DNS server for iOS
nekohasekai Feb 20, 2025
cb048be
Migrate to stdlib ECH support
nekohasekai Feb 22, 2025
483fd41
Add AnyTLS protocol
anytls Feb 20, 2025
0614d85
documentation: Fix AnyTLS doc
nekohasekai Feb 22, 2025
f56bd38
Fix Outbound deadlock
alireza0 Feb 23, 2025
df788c7
documentation: Fix typo
libtry486 Feb 23, 2025
2c730e3
documentation: Minor fixes
Feb 20, 2025
c42598c
Add MinIdleSession option to AnyTLS outbound
anytls Feb 24, 2025
b953dad
documentation: Fix missing hosts DNS server
nekohasekai Feb 24, 2025
192f452
Fix DNS fallback
nekohasekai Feb 25, 2025
8e8211b
Fix parsing legacy DNS options
TargetLocked Feb 25, 2025
f670078
documentation: Fix typo
BedrockDigger Feb 25, 2025
572285e
Update sing-anytls
anytls Feb 25, 2025
0a6e6d7
Fix missing AnyTLS display name
Zephyruso Feb 25, 2025
13bffd4
Fix domain resolver on direct outbound
nekohasekai Feb 26, 2025
55e1fa8
Move predefined DNS server to rule action
nekohasekai Feb 26, 2025
551db61
Fix anytls dialer usage
nekohasekai Feb 27, 2025
74f6941
documentation: Fix missing `ip_accept_any` DNS rule option
nekohasekai Mar 6, 2025
62a9691
Fix UDP DNS server crash
nekohasekai Mar 6, 2025
2288a08
Fix hosts DNS server
k9982874 Mar 10, 2025
aa6a6fd
Update sing-anytls
anytls Mar 10, 2025
8f1e256
documentation: Fix typo
Restia-Ashbell Mar 10, 2025
9afdd2d
Fix http3 DNS server connecting to wrong address
nekohasekai Mar 13, 2025
724d74e
Fix DNS lookup context pollution
nekohasekai Mar 13, 2025
f40e9e7
Make `domain_resolver` optional when only one DNS server is configured
nekohasekai Mar 15, 2025
a6e9d90
option: Fix marshal legacy DNS options
nekohasekai Mar 15, 2025
6ab62ea
Add ntp protocol sniffing
k9982874 Mar 15, 2025
1befa4b
Fix Tailscale DNS
nekohasekai Mar 15, 2025
015f6ef
Add wildcard-sni support for shadow-tls inbound
nekohasekai Mar 16, 2025
d998a73
Fix unhandled DNS loop
nekohasekai Mar 17, 2025
0b52e96
Remove map usage in options
nekohasekai Mar 18, 2025
ea012b4
Add wildcard name support for predefined records
nekohasekai Mar 18, 2025
d379dcc
Add netns support
nekohasekai Mar 18, 2025
c5df6c8
Explicitly reject detour to empty direct outbounds
nekohasekai Mar 20, 2025
20dd4b7
release: Do not build tailscale on iOS and tvOS
nekohasekai Mar 21, 2025
0c6b7e7
Update gVisor to 20250319.0
nekohasekai Mar 24, 2025
d1a11df
Fail when default DNS server not found
nekohasekai Mar 24, 2025
8b27e1f
Fix missing `with_tailscale` in Dockerfile
Mar 26, 2025
f0c3464
Update anytls
anytls Mar 27, 2025
883cd0e
Fix DNS over QUIC stream close
dyhkwong Mar 27, 2025
407f2da
Fix Tailscale dialer
nekohasekai Mar 28, 2025
fd6e5ab
Allow direct outbounds without `domain_resolver`
nekohasekai Apr 1, 2025
839c4a3
release: Update Go to 1.24.2
nekohasekai Apr 3, 2025
7185c03
Fix fetch ECH configs
Apr 6, 2025
5155f95
Fix UDP DNS server crash
iikira Apr 6, 2025
ed3aca4
release: Skip override version for iOS
nekohasekai Apr 8, 2025
3722fc4
Fix DNS dialer
nekohasekai Apr 8, 2025
01b3d71
Update anytls
anytls Apr 9, 2025
013c707
Improve local DNS server
nekohasekai Apr 12, 2025
26ae7a6
Fix missing handling of legacy `domain_strategy` options
nekohasekai Apr 17, 2025
55ca427
documentation: Try to make the play review happy
nekohasekai Apr 17, 2025
d6ab06e
Fix callback deletion in UDP transport
caelansar Apr 19, 2025
fc0096b
documentation: Minor fixes
Apr 19, 2025
2316ca3
Fix fetch ECH configs
nekohasekai Apr 22, 2025
a15f35a
Fix tailscale sending unexpected stuff
nekohasekai Apr 22, 2025
73f4b41
Fix DNS lookup
nekohasekai Apr 25, 2025
05b6a08
clash-api: Add more meta api
nekohasekai Apr 25, 2025
e528d42
Fix wireguard `listen_port`
nekohasekai Apr 26, 2025
c6f6613
Report invalid DNS address early
xchacha20-poly1305 Apr 26, 2025
ae132ec
documentation: Fix anytls padding scheme description
nekohasekai Apr 28, 2025
b37e1e7
documentation: Bump version
nekohasekai Apr 28, 2025
ee26238
Merge branch 'dev-next' of https://github.com/SagerNet/sing-box into …
Apr 28, 2025
254053f
同步更新
Apr 28, 2025
a49efa3
Update dynamic-api.md
mingtianquan Nov 5, 2025
c842340
Add files via upload
mingtianquan Nov 5, 2025
879c061
Delete 调用例子.e
mingtianquan Nov 5, 2025
b2ec580
Add files via upload
mingtianquan Nov 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/setup_legacy_go.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env bash

VERSION="1.23.6"

mkdir -p $HOME/go
cd $HOME/go
wget "https://dl.google.com/go/go${VERSION}.linux-amd64.tar.gz"
tar -xzf "go${VERSION}.linux-amd64.tar.gz"
mv go go_legacy
cd go_legacy

# modify from https://github.com/restic/restic/issues/4636#issuecomment-1896455557
# this patch file only works on golang1.23.x
# that means after golang1.24 release it must be changed
# see: https://github.com/MetaCubeX/go/commits/release-branch.go1.23/
# revert:
# 693def151adff1af707d82d28f55dba81ceb08e1: "crypto/rand,runtime: switch RtlGenRandom for ProcessPrng"
# 7c1157f9544922e96945196b47b95664b1e39108: "net: remove sysSocket fallback for Windows 7"
# 48042aa09c2f878c4faa576948b07fe625c4707a: "syscall: remove Windows 7 console handle workaround"
# a17d959debdb04cd550016a3501dd09d50cd62e7: "runtime: always use LoadLibraryEx to load system libraries"

curl https://github.com/MetaCubeX/go/commit/9ac42137ef6730e8b7daca016ece831297a1d75b.diff | patch --verbose -p 1
curl https://github.com/MetaCubeX/go/commit/21290de8a4c91408de7c2b5b68757b1e90af49dd.diff | patch --verbose -p 1
curl https://github.com/MetaCubeX/go/commit/6a31d3fa8e47ddabc10bd97bff10d9a85f4cfb76.diff | patch --verbose -p 1
curl https://github.com/MetaCubeX/go/commit/69e2eed6dd0f6d815ebf15797761c13f31213dd6.diff | patch --verbose -p 1
43 changes: 27 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ^1.24
go-version: ^1.24.2
- name: Check input version
if: github.event_name == 'workflow_dispatch'
run: |-
Expand Down Expand Up @@ -94,7 +94,6 @@ jobs:
- { os: windows, arch: arm64 }

- { os: darwin, arch: amd64 }
- { os: darwin, arch: amd64, legacy_go: true }
- { os: darwin, arch: arm64 }

- { os: android, arch: arm64, ndk: "aarch64-linux-android21" }
Expand All @@ -106,16 +105,28 @@ jobs:
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
with:
fetch-depth: 0
- name: Setup Go
if: matrix.legacy_go
uses: actions/setup-go@v5
with:
go-version: ~1.20
- name: Setup Go
if: ${{ ! matrix.legacy_go }}
uses: actions/setup-go@v5
with:
go-version: ^1.24
go-version: ^1.24.2
- name: Cache Legacy Go
if: matrix.require_legacy_go
id: cache-legacy-go
uses: actions/cache@v4
with:
path: |
~/go/go_legacy
key: go_legacy_1236
- name: Setup Legacy Go
if: matrix.legacy_go && steps.cache-legacy-go.outputs.cache-hit != 'true'
run: |-
.github/setup_legacy_go.sh
- name: Setup Legacy Go 2
if: matrix.legacy_go
run: |-
echo "PATH=$HOME/go/go_legacy/bin:$PATH" >> $GITHUB_ENV
echo "GOROOT=$HOME/go/go_legacy" >> $GITHUB_ENV
- name: Setup Android NDK
if: matrix.os == 'android'
uses: nttld/setup-ndk@v1
Expand All @@ -129,10 +140,7 @@ jobs:
- name: Set build tags
run: |
set -xeuo pipefail
TAGS='with_gvisor,with_quic,with_dhcp,with_wireguard,with_utls,with_reality_server,with_acme,with_clash_api'
if [ ! '${{ matrix.legacy_go }}' = 'true' ]; then
TAGS="${TAGS},with_ech"
fi
TAGS='with_gvisor,with_quic,with_dhcp,with_wireguard,with_utls,with_reality_server,with_acme,with_clash_api,with_tailscale'
echo "BUILD_TAGS=${TAGS}" >> "${GITHUB_ENV}"
- name: Build
if: matrix.os != 'android'
Expand Down Expand Up @@ -286,7 +294,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ^1.24
go-version: ^1.24.2
- name: Setup Android NDK
id: setup-ndk
uses: nttld/setup-ndk@v1
Expand Down Expand Up @@ -366,7 +374,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ^1.24
go-version: ^1.24.2
- name: Setup Android NDK
id: setup-ndk
uses: nttld/setup-ndk@v1
Expand Down Expand Up @@ -464,7 +472,7 @@ jobs:
if: matrix.if
uses: actions/setup-go@v5
with:
go-version: ^1.24
go-version: ^1.24.2
- name: Setup Xcode stable
if: matrix.if && github.ref == 'refs/heads/main-next'
run: |-
Expand Down Expand Up @@ -541,10 +549,13 @@ jobs:
MACOS_PROJECT_VERSION=$(go run -v ./cmd/internal/app_store_connect next_macos_project_version)
echo "MACOS_PROJECT_VERSION=$MACOS_PROJECT_VERSION"
echo "MACOS_PROJECT_VERSION=$MACOS_PROJECT_VERSION" >> "$GITHUB_ENV"
- name: Update version
if: matrix.if && matrix.name != 'iOS'
run: |-
go run -v ./cmd/internal/update_apple_version --ci
- name: Build
if: matrix.if
run: |-
go run -v ./cmd/internal/update_apple_version --ci
cd clients/apple
xcodebuild archive \
-scheme "${{ matrix.scheme }}" \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ^1.24
go-version: ^1.24.2
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ^1.24
go-version: ^1.24.2
- name: Check input version
if: github.event_name == 'workflow_dispatch'
run: |-
Expand Down Expand Up @@ -66,7 +66,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ^1.24
go-version: ^1.24.2
- name: Setup Android NDK
if: matrix.os == 'android'
uses: nttld/setup-ndk@v1
Expand Down
3 changes: 1 addition & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,12 @@ linters-settings:
- -SA1003

run:
go: "1.23"
go: "1.24"
build-tags:
- with_gvisor
- with_quic
- with_dhcp
- with_wireguard
- with_ech
- with_utls
- with_reality_server
- with_acme
Expand Down
6 changes: 4 additions & 2 deletions .goreleaser.fury.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,19 @@ builds:
- -v
- -trimpath
ldflags:
- -X github.com/sagernet/sing-box/constant.Version={{ .Version }} -s -w -buildid=
- -X github.com/sagernet/sing-box/constant.Version={{ .Version }}
- -s
- -buildid=
tags:
- with_gvisor
- with_quic
- with_dhcp
- with_wireguard
- with_ech
- with_utls
- with_reality_server
- with_acme
- with_clash_api
- with_tailscale
env:
- CGO_ENABLED=0
targets:
Expand Down
10 changes: 6 additions & 4 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@ builds:
- with_quic
- with_dhcp
- with_wireguard
- with_ech
- with_utls
- with_reality_server
- with_acme
- with_clash_api
- with_tailscale
env:
- CGO_ENABLED=0
- GOTOOLCHAIN=local
targets:
- linux_386
- linux_amd64_v1
Expand All @@ -49,18 +50,19 @@ builds:
- with_reality_server
- with_acme
- with_clash_api
- with_tailscale
env:
- CGO_ENABLED=0
- GOROOT={{ .Env.GOPATH }}/go1.20.14
tool: "{{ .Env.GOPATH }}/go1.20.14/bin/go"
- GOROOT={{ .Env.GOPATH }}/go_legacy
tool: "{{ .Env.GOPATH }}/go_legacy/bin/go"
targets:
- windows_amd64_v1
- windows_386
- darwin_amd64_v1
- id: android
<<: *template
env:
- CGO_ENABLED=1
- GOTOOLCHAIN=local
overrides:
- goos: android
goarch: arm
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN set -ex \
&& export COMMIT=$(git rev-parse --short HEAD) \
&& export VERSION=$(go run ./cmd/internal/read_tag) \
&& go build -v -trimpath -tags \
"with_gvisor,with_quic,with_dhcp,with_wireguard,with_ech,with_utls,with_reality_server,with_acme,with_clash_api" \
"with_gvisor,with_quic,with_dhcp,with_wireguard,with_utls,with_reality_server,with_acme,with_clash_api,with_tailscale" \
-o /go/bin/sing-box \
-ldflags "-X \"github.com/sagernet/sing-box/constant.Version=$VERSION\" -s -w -buildid=" \
./cmd/sing-box
Expand Down
21 changes: 10 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
NAME = sing-box
COMMIT = $(shell git rev-parse --short HEAD)
TAGS_GO120 = with_gvisor,with_dhcp,with_wireguard,with_reality_server,with_clash_api,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
TAGS ?= with_gvisor,with_dhcp,with_wireguard,with_reality_server,with_clash_api,with_quic,with_utls,with_tailscale
TAGS_TEST ?= with_gvisor,with_quic,with_wireguard,with_grpc,with_utls,with_reality_server

GOHOSTOS = $(shell go env GOHOSTOS)
GOHOSTARCH = $(shell go env GOHOSTARCH)
Expand All @@ -17,14 +15,12 @@ PREFIX ?= $(shell go env GOPATH)
.PHONY: test release docs build

build:
export GOTOOLCHAIN=local && \
go build $(MAIN_PARAMS) $(MAIN)

ci_build_go120:
go build $(PARAMS) $(MAIN)
go build $(PARAMS) -tags "$(TAGS_GO120)" $(MAIN)

ci_build:
go build $(PARAMS) $(MAIN)
export GOTOOLCHAIN=local && \
go build $(PARAMS) $(MAIN) && \
go build $(MAIN_PARAMS) $(MAIN)

generate_completions:
Expand Down Expand Up @@ -61,6 +57,9 @@ proto_install:
go install -v google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install -v google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest

update_certificates:
go run ./cmd/internal/update_certificates

release:
go run ./cmd/internal/build goreleaser release --clean --skip publish
mkdir dist/release
Expand Down Expand Up @@ -227,8 +226,8 @@ lib:
go run ./cmd/internal/build_libbox -target ios

lib_install:
go install -v github.com/sagernet/gomobile/cmd/[email protected].4
go install -v github.com/sagernet/gomobile/cmd/[email protected].4
go install -v github.com/sagernet/gomobile/cmd/[email protected].6
go install -v github.com/sagernet/gomobile/cmd/[email protected].6

docs:
venv/bin/mkdocs serve
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ The universal proxy platform.

https://sing-box.sagernet.org


## License

```
Expand All @@ -27,5 +28,4 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.

In addition, no derivative work may use the name or imply association
with this application without prior consent.
```
with this application without prior consent.
21 changes: 21 additions & 0 deletions adapter/certificate.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package adapter

import (
"context"
"crypto/x509"

"github.com/sagernet/sing/service"
)

type CertificateStore interface {
LifecycleService
Pool() *x509.CertPool
}

func RootPoolFromContext(ctx context.Context) *x509.CertPool {
store := service.FromContext[CertificateStore](ctx)
if store == nil {
return nil
}
return store.Pool()
}
Loading