Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
ff9fced
Add MAC and hostname rule items
nekohasekai Mar 3, 2026
05e226a
Add Android support for MAC and hostname rule items
nekohasekai Mar 4, 2026
14e1e7e
Add macOS support for MAC and hostname rule items
nekohasekai Mar 6, 2026
5b8bb39
documentation: Update descriptions for neighbor rules
nekohasekai Mar 6, 2026
3b36eea
Refactor ACME support to certificate provider
nekohasekai Mar 23, 2026
5692f63
Add BBR profile and hop interval randomization for Hysteria2
nekohasekai Mar 30, 2026
98b2ecd
platform: Add OOM Report & Crash Report
nekohasekai Apr 2, 2026
46b86d1
Also enable certificate store by default on Apple platforms
nekohasekai Apr 7, 2026
31bea69
Add evaluate DNS rule action and related rule items
nekohasekai Apr 7, 2026
d10dd4c
platform: Fix set local
nekohasekai Apr 7, 2026
087060f
Fix deprecated warning double-formatting on localized clients
nekohasekai Apr 7, 2026
a393f3e
oom-killer: Free memory on pressure notification and use gradual inte…
nekohasekai Apr 7, 2026
5aba37b
tools: Network Quality & STUN
nekohasekai Apr 8, 2026
6016086
platform: Fix darwin signal handler
nekohasekai Apr 9, 2026
4074c3e
tools: Tailscale status
nekohasekai Apr 9, 2026
d403880
Revert "Also enable certificate store by default on Apple platforms"
nekohasekai Apr 9, 2026
c927896
Fix rules lock
nekohasekai Apr 9, 2026
dd10328
Fix darwin local DNS transport
nekohasekai Apr 10, 2026
674752a
tools: Tailscale status
nekohasekai Apr 10, 2026
3a307e7
Un-deprecate `ip_accept_any` DNS rule item
nekohasekai Apr 10, 2026
d92729d
documentation: Fixes
nekohasekai Apr 10, 2026
941ce58
Add `package_name_regex` route, DNS and headless rule item
nekohasekai Apr 10, 2026
8b653b9
platform: Wrap command RPC error returns with E.Cause
nekohasekai Apr 10, 2026
58706b0
Fix lint errors
nekohasekai Apr 10, 2026
31bbb53
Add cloudflared inbound
nekohasekai Apr 10, 2026
87d3e17
documentation: Fix missing update for `ip_version` and `query_type`
nekohasekai Apr 10, 2026
798066d
Fix stun test
nekohasekai Apr 10, 2026
6926e51
Fix darwin cgo DNS again
nekohasekai Apr 10, 2026
56d0b40
Fix tailscale error
nekohasekai Apr 11, 2026
997a64e
Add optimistic DNS cache
nekohasekai Apr 11, 2026
f7b8eed
oom-killer: Record report before reset network
nekohasekai Apr 14, 2026
716541b
Refactor: HTTP clients, unified HTTP2/QUIC options, Apple engines
nekohasekai Apr 14, 2026
2ad83c5
Standardize hosts path
nekohasekai Apr 15, 2026
98b0d7e
Add TLS spoof support
nekohasekai Apr 15, 2026
0cac33c
Fix legacy rule-set download_detour blocked by empty direct check
nekohasekai Apr 15, 2026
e8b5326
Reject pure-IP rule-set references without match_response
nekohasekai Apr 15, 2026
8272845
Fix use-after-free of pooled value buffers in bbolt Batch writes
nekohasekai Apr 15, 2026
8020972
Reject IP literal server name with TLS spoof
nekohasekai Apr 16, 2026
2304688
Fix macOS tlsspoof
nekohasekai Apr 17, 2026
e6f0d1f
Scope HTTP/2 fallback and HTTP/3 broken state per authority
nekohasekai Apr 17, 2026
380845a
Defer implicit default HTTP client fallback to first use
nekohasekai Apr 17, 2026
098849e
Strip EDNS padding from upstream DNS responses
nekohasekai Apr 17, 2026
7b7d95a
Fix Apple TLS metadata capture
nekohasekai Apr 18, 2026
82d49e8
Fix tls-spoof
nekohasekai Apr 17, 2026
39b8d37
Add search domain support for Tailscale DNS
nekohasekai Apr 20, 2026
bc0ae03
Log DNS optimistic background refresh outcomes
nekohasekai Apr 21, 2026
71fd717
Fix Tailscale search domain response name mismatch
nekohasekai Apr 21, 2026
c5e37e6
Fix goroutine leak in networkquality tool
nekohasekai Apr 21, 2026
bfd9f9a
Add ACME profile support for IP address certificates
nekohasekai Mar 26, 2026
715d076
Fix ACME HTTP-01 challenge for IPv6 literal addresses
nekohasekai Apr 21, 2026
88fa70b
platform: Improve oom-killer
nekohasekai Apr 21, 2026
a1372b5
Fix darwin cgo DNS again
nekohasekai Apr 22, 2026
80f9aed
Fix stderr deprecated manager
nekohasekai Apr 23, 2026
1c3a335
Improve UDP batch support
nekohasekai Apr 24, 2026
1226d74
Add Windows TLS engine
nekohasekai Apr 24, 2026
dbe4b5d
Preserve comments between formatting
nekohasekai Apr 28, 2026
4bf782a
Improve oom-killer
nekohasekai Apr 28, 2026
3a5304b
ssh: Add cipher, MAC, and key exchange configuration
nekohasekai Apr 28, 2026
d880835
dns: Add timeout configuration
nekohasekai Apr 28, 2026
5386bbf
Fix tailscale start dependencies
nekohasekai Apr 28, 2026
594e6aa
dns: Add neighbor-based hostname resolution to local server
nekohasekai Apr 29, 2026
a553f33
dns: Add preferred_by rule item
nekohasekai Apr 29, 2026
a33c92a
dns: Add mDNS server
nekohasekai Apr 30, 2026
6e7301d
Allow customizing TUN DNS mode and hijack interface DNS by default
nekohasekai May 2, 2026
3609cf6
Add more spoof method
macronut Apr 29, 2026
cfb2f8b
Fix reset network
nekohasekai May 5, 2026
d776e2d
Add hysteria2 realm service and support
nekohasekai May 10, 2026
4f69e5f
Update hysteria2 realm
nekohasekai May 11, 2026
5b412f1
Fix TLS server close
nekohasekai May 12, 2026
22cae36
realm: Add stun retry and lazy server start
nekohasekai May 12, 2026
981393d
Fix hysteria2 realm server
nekohasekai May 12, 2026
806da5f
Fix lint errors
nekohasekai May 14, 2026
2200e13
dns: Fix DHCP reset
nekohasekai May 17, 2026
3bb9fe6
Rebase wireguard-go to official
nekohasekai May 17, 2026
2ede989
Fix shadowtls handshake
nekohasekai May 17, 2026
423e97b
oom-killer: Remove log "OOM draft discarded"
nekohasekai May 19, 2026
273b6ca
route: Refetch rule-set when cache restore fails
nekohasekai May 19, 2026
c31db96
process: Fix panic when package manager is unavailable on Android
nekohasekai May 19, 2026
f29bdd2
tailscale: Revert dialer deprecation and remove control_http_client
nekohasekai May 20, 2026
67c7243
tailscale: Fix handle peer DNS query
nekohasekai May 20, 2026
a2894ff
gvisor: Fix dialing to self addresses
nekohasekai May 20, 2026
6acb02c
realm: Open separate v4 and v6 packet conns on client
nekohasekai May 20, 2026
4559faa
Fix tailscale
nekohasekai May 21, 2026
a362056
tailscale: Add runtime exit node API
nekohasekai May 21, 2026
0403ae6
tailscale: Expose more peer info fields
nekohasekai May 21, 2026
369c428
Fix tailscale dns
nekohasekai May 21, 2026
7ac2cac
sing: Fix comment loop
nekohasekai May 22, 2026
f5e118c
daemon: Add Tailssh
nekohasekai May 25, 2026
940fb6d
hysteria2: Add gecko obfs
nekohasekai May 25, 2026
dfed1b2
tools: Fix mising cleanup
nekohasekai May 26, 2026
8ba1057
tailscale: Add tailssh server
nekohasekai May 28, 2026
36c8786
tailssh: fix platform SFTP session teardown
nekohasekai Jun 1, 2026
09ff1a7
platform: Add tailscale device name and logout
nekohasekai Jun 2, 2026
65069bd
platform: Add shell support for iOS
nekohasekai Jun 10, 2026
1ee3596
daemon: Split host operations into ManagedService
nekohasekai Jun 11, 2026
3a5d654
Add sing-box API service
nekohasekai Jun 11, 2026
7b07703
tailscale: Fix auth URL not refreshed after logout
nekohasekai Jun 12, 2026
6a351d3
Update Go to 1.25.11
nekohasekai Jun 12, 2026
f0f2617
Fix group status updates broken by API service
nekohasekai Jun 13, 2026
72482de
release: Fix apple release
nekohasekai Jun 13, 2026
a3e3f61
dns: Remove unused files
nekohasekai Jun 13, 2026
a14fd97
Improve remote rule-set update
nekohasekai Jun 13, 2026
79ee5b3
Add dashboard support for API service
nekohasekai Jun 13, 2026
e4e8af4
Fix remote control when Clash server is unavailable
nekohasekai Jun 15, 2026
0c7707c
Add USB/IP service
nekohasekai Jun 14, 2026
38786cf
Add USB/IP support for macOS
nekohasekai Jun 16, 2026
5f6e5a8
documentation: Add USB/IP server and client
nekohasekai Jun 17, 2026
cf60f76
Fix Cloudflared edge discovery ignoring configured resolver
nekohasekai Jun 20, 2026
cb70a06
Add iOS jailbreak release
nekohasekai Jun 20, 2026
f27d0e3
Bump version
nekohasekai Jun 21, 2026
5f265ee
certificate: Replace platform bridge with CGO JNI
nekohasekai Jun 21, 2026
2364301
platform: Fix missing api version check for usb/ip
nekohasekai Jun 21, 2026
3fc3c23
inbound/http: align auth retry logger injection and release scripts
hugeagi Jun 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/setup_go_for_macos1013.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -euo pipefail

VERSION="1.25.10"
VERSION="1.25.11"
PATCH_COMMITS=(
"afe69d3cec1c6dcf0f1797b20546795730850070"
"1ed289b0cf87dc5aae9c6fe1aa5f200a83412938"
Expand Down
2 changes: 1 addition & 1 deletion .github/setup_go_for_windows7.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -euo pipefail

VERSION="1.25.10"
VERSION="1.25.11"
PATCH_COMMITS=(
"466f6c7a29bc098b0d4c987b803c779222894a11"
"1bdabae205052afe1dadb2ad6f1ba612cdbc532a"
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ~1.25.10
go-version: ~1.25.11
- name: Check input version
if: github.event_name == 'workflow_dispatch'
run: |-
Expand Down Expand Up @@ -124,7 +124,7 @@ jobs:
if: ${{ ! matrix.legacy_win7 }}
uses: actions/setup-go@v5
with:
go-version: ~1.25.10
go-version: ~1.25.11
- name: Cache Go for Windows 7
if: matrix.legacy_win7
id: cache-go-for-windows7
Expand Down Expand Up @@ -649,7 +649,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ~1.25.10
go-version: ~1.25.11
- name: Setup Android NDK
id: setup-ndk
uses: nttld/setup-ndk@v1
Expand Down Expand Up @@ -743,7 +743,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ~1.25.10
go-version: ~1.25.11
- name: Setup Android NDK
id: setup-ndk
uses: nttld/setup-ndk@v1
Expand Down Expand Up @@ -842,7 +842,7 @@ jobs:
if: matrix.if
uses: actions/setup-go@v5
with:
go-version: ~1.25.10
go-version: ~1.25.11
- name: Set tag
if: matrix.if
run: |-
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ~1.25.10
go-version: ~1.25.11
- name: Clone cronet-go
if: matrix.naive
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ~1.25.10
go-version: ~1.25.11
- name: Check input version
if: github.event_name == 'workflow_dispatch'
run: |-
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ~1.25.10
go-version: ~1.25.11
- name: Clone cronet-go
if: matrix.naive
run: |
Expand Down
55 changes: 55 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Test

on:
push:
branches:
- stable
- testing
- unstable
paths-ignore:
- '**.md'
- '.github/**'
- '!.github/workflows/test.yml'
pull_request:
branches:
- stable
- testing
- unstable

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}-${{ inputs.build }}
cancel-in-progress: true

jobs:
test:
name: Test
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest
go:
- ~1.24
- ~1.25
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Set build tags and ldflags
shell: bash
run: |
echo "BUILD_TAGS=$(cat release/DEFAULT_BUILD_TAGS_OTHERS)" >> "$GITHUB_ENV"
echo "LDFLAGS_SHARED=$(cat release/LDFLAGS)" >> "$GITHUB_ENV"
- name: Test (unix)
if: matrix.os != 'windows-latest'
run: go test -v -exec sudo -tags "$BUILD_TAGS" -ldflags "$LDFLAGS_SHARED" ./...
- name: Test (windows)
if: matrix.os == 'windows-latest'
shell: bash
run: go test -v -tags "$BUILD_TAGS" -ldflags "$LDFLAGS_SHARED" ./...
1 change: 0 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ linters:
default: none
enable:
- ineffassign
- paralleltest
- staticcheck
- unused
- modernize
Expand Down
25 changes: 12 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -108,29 +108,28 @@ publish_android:
build_ios:
cd ../sing-box-for-apple && \
rm -rf build/SFI.xcarchive && \
xcodebuild clean -scheme SFI && \
xcodebuild archive -scheme SFI -configuration Release -destination 'generic/platform=iOS' -archivePath build/SFI.xcarchive -allowProvisioningUpdates | xcbeautify | grep -A 10 -e "Archive Succeeded" -e "ARCHIVE FAILED" -e "❌"
xcodebuild clean -scheme SFI -derivedDataPath build/SFI.dd && \
xcodebuild archive -scheme SFI -configuration Release -destination 'generic/platform=iOS' -archivePath build/SFI.xcarchive -derivedDataPath build/SFI.dd -allowProvisioningUpdates | xcbeautify | grep -A 10 -e "Archive Succeeded" -e "ARCHIVE FAILED" -e "❌"

upload_ios_app_store:
cd ../sing-box-for-apple && \
xcodebuild -exportArchive -archivePath build/SFI.xcarchive -exportOptionsPlist SFI/Upload.plist -allowProvisioningUpdates

export_ios_ipa:
cd ../sing-box-for-apple && \
xcodebuild -exportArchive -archivePath build/SFI.xcarchive -exportOptionsPlist SFI/Export.plist -allowProvisioningUpdates -exportPath build/SFI && \
cp build/SFI/sing-box.ipa dist/SFI.ipa
build_ios_deb:
$(MAKE) -C ../sing-box-for-apple build_ios_deb

upload_ios_ipa:
upload_ios_deb:
cd dist && \
cp SFI.ipa "SFI-${VERSION}.ipa" && \
ghr --replace --draft --prerelease "v${VERSION}" "SFI-${VERSION}.ipa"
ghr --replace --draft --prerelease "v${VERSION}" ../sing-box-for-apple/build/jailbreak/"SFI-${VERSION}-iphoneos-arm64.deb"

release_ios: build_ios upload_ios_app_store

release_ios_deb: build_ios_deb upload_ios_deb

build_macos:
cd ../sing-box-for-apple && \
rm -rf build/SFM.xcarchive && \
xcodebuild archive -scheme SFM -configuration Release -archivePath build/SFM.xcarchive -allowProvisioningUpdates | xcbeautify | grep -A 10 -e "Archive Succeeded" -e "ARCHIVE FAILED" -e "❌"
xcodebuild archive -scheme SFM -configuration Release -archivePath build/SFM.xcarchive -derivedDataPath build/SFM.dd -allowProvisioningUpdates | xcbeautify | grep -A 10 -e "Archive Succeeded" -e "ARCHIVE FAILED" -e "❌"

upload_macos_app_store:
cd ../sing-box-for-apple && \
Expand Down Expand Up @@ -199,7 +198,7 @@ replace_macos_standalone: build_macos_pkg notarize_macos_pkg upload_macos_pkg up
build_tvos:
cd ../sing-box-for-apple && \
rm -rf build/SFT.xcarchive && \
xcodebuild archive -scheme SFT -configuration Release -archivePath build/SFT.xcarchive -allowProvisioningUpdates | xcbeautify | grep -A 10 -e "Archive Succeeded" -e "ARCHIVE FAILED" -e "❌"
xcodebuild archive -scheme SFT -configuration Release -archivePath build/SFT.xcarchive -derivedDataPath build/SFT.dd -allowProvisioningUpdates | xcbeautify | grep -A 10 -e "Archive Succeeded" -e "ARCHIVE FAILED" -e "❌"

upload_tvos_app_store:
cd ../sing-box-for-apple && \
Expand Down Expand Up @@ -264,8 +263,8 @@ lib_apple_new:
$(SING_FFI) generate --config $(LIBBOX_FFI_CONFIG) --platform-type apple

lib_install:
go install -v github.com/sagernet/gomobile/cmd/gomobile@v0.1.12
go install -v github.com/sagernet/gomobile/cmd/gobind@v0.1.12
go install -v github.com/sagernet/gomobile/cmd/gomobile@v0.1.13
go install -v github.com/sagernet/gomobile/cmd/gobind@v0.1.13

docs:
venv/bin/mkdocs serve
Expand Down
1 change: 1 addition & 0 deletions adapter/certificate.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
type CertificateStore interface {
LifecycleService
Pool() *x509.CertPool
ExclusiveAnchors() bool
}

func RootPoolFromContext(ctx context.Context) *x509.CertPool {
Expand Down
21 changes: 21 additions & 0 deletions adapter/certificate/adapter.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package certificate

type Adapter struct {
providerType string
providerTag string
}

func NewAdapter(providerType string, providerTag string) Adapter {
return Adapter{
providerType: providerType,
providerTag: providerTag,
}
}

func (a *Adapter) Type() string {
return a.providerType
}

func (a *Adapter) Tag() string {
return a.providerTag
}
Loading