Compare commits

..

115 Commits

Author SHA1 Message Date
renovate[bot]
d38f6cd828
[dependencies] Update golangci/golangci-lint-action action to v8 2025-06-30 10:28:55 +00:00
世界
70371c3cbe
documentation: Bump version 2025-06-30 18:28:16 +08:00
世界
32bc8b48f1
Improve nftables rules for openwrt 2025-06-30 18:27:33 +08:00
世界
b5df508bc9
Fixed DoH server recover from conn freezes 2025-06-30 18:24:48 +08:00
世界
4789846113
Update libresolv usage 2025-06-29 19:20:31 +08:00
yu
ad94f94cfb
documentation: Update client configuration manual 2025-06-29 19:11:15 +08:00
yanwo
1f9de9f321
documentation: Fix typo
Signed-off-by: yanwo <ogilvy@gmail.com>
2025-06-29 19:11:15 +08:00
anytinz
344bbf9494
documentation: Fix wrong SideStore loopback ip 2025-06-29 18:57:04 +08:00
世界
b7e16e70ab
Revert "release: Add IPA build"
After testing, it seems that since extensions are not handled correctly, it cannot be installed by SideStore.
2025-06-29 18:57:04 +08:00
世界
391153ecb8
release: Add IPA build 2025-06-29 18:57:03 +08:00
世界
3d821db0b2
Add API to dump AdGuard rules 2025-06-29 18:57:03 +08:00
Sukka
344ecd3798
Improve AdGuard rule-set parser 2025-06-29 18:57:03 +08:00
Restia-Ashbell
a8a3f863cd
Add ECH support for uTLS 2025-06-29 18:57:02 +08:00
世界
ea190ca428
Improve TLS fragments 2025-06-29 18:57:02 +08:00
世界
e65b78d1e4
Add cache support for ssm-api 2025-06-29 18:57:02 +08:00
世界
84f7d80da7
Fix service will not be closed 2025-06-29 18:57:02 +08:00
世界
2b57eb0b30
Add loopback address support for tun 2025-06-29 18:57:01 +08:00
世界
9884f81298
Fix tproxy listener 2025-06-29 18:57:01 +08:00
世界
8493b4f1da
Fix systemd package 2025-06-29 18:57:01 +08:00
世界
8f1a8add85
Fix missing home for derp service 2025-06-29 18:57:01 +08:00
Zero Clover
85ee6bb266
documentation: Fix services 2025-06-29 18:57:01 +08:00
世界
c4387f7c37
Fix dns.client_subnet ignored 2025-06-29 18:57:01 +08:00
世界
dcb7a5caed
documentation: Minor fixes 2025-06-29 18:57:00 +08:00
世界
ae77cdeedd
Fix tailscale forward 2025-06-29 18:57:00 +08:00
世界
ec05d4e5e3
Minor fixes 2025-06-29 18:56:59 +08:00
世界
1f766d2b89
Add SSM API service 2025-06-29 18:56:59 +08:00
世界
a5a6c1f7d4
Add resolved service and DNS server 2025-06-29 18:56:59 +08:00
世界
cd43786279
Add DERP service 2025-06-29 18:56:59 +08:00
世界
43a211db28
Add service component type 2025-06-29 18:56:58 +08:00
世界
d4f6bdf792
Fix tproxy tcp control 2025-06-29 18:56:58 +08:00
愚者
99cf27bedd
release: Fix build tags for android
Signed-off-by: 愚者 <11926619+FansChou@users.noreply.github.com>
2025-06-29 18:56:58 +08:00
世界
0a14c5ab1f
prevent creation of bind and mark controls on unsupported platforms 2025-06-29 18:56:58 +08:00
PuerNya
533b31e1f6
documentation: Fix description of reject DNS action behavior 2025-06-29 18:56:57 +08:00
Restia-Ashbell
8ed6523872
Fix TLS record fragment 2025-06-29 18:56:57 +08:00
世界
e5c162222d
Add missing accept_routes option for Tailscale 2025-06-29 18:56:57 +08:00
世界
88babbf3a7
Add TLS record fragment support 2025-06-29 18:56:56 +08:00
世界
49a03e0b23
Fix set edns0 client subnet 2025-06-29 18:56:56 +08:00
世界
9a8e9a34c0
Update minor dependencies 2025-06-29 18:56:56 +08:00
世界
17551db7be
Update certmagic and providers 2025-06-29 18:56:56 +08:00
世界
83201bb088
Update protobuf and grpc 2025-06-29 18:56:56 +08:00
世界
f0f1942f1f
Add control options for listeners 2025-06-29 18:56:55 +08:00
世界
c7e318be61
Update quic-go to v0.52.0 2025-06-29 18:56:54 +08:00
世界
2a5e0d0c92
Update utls to v1.7.2 2025-06-29 18:56:54 +08:00
世界
956e485342
Handle EDNS version downgrade 2025-06-29 18:56:54 +08:00
世界
23ede74e74
documentation: Fix anytls padding scheme description 2025-06-29 18:56:54 +08:00
安容
03317e61dd
Report invalid DNS address early 2025-06-29 18:56:54 +08:00
世界
fc81bd9a5b
Fix wireguard listen_port 2025-06-29 18:56:53 +08:00
世界
4d406cad84
clash-api: Add more meta api 2025-06-29 18:56:53 +08:00
世界
1f0282de9c
Fix DNS lookup 2025-06-29 18:56:53 +08:00
世界
b097912418
Fix fetch ECH configs 2025-06-29 18:56:52 +08:00
reletor
056c29e73a
documentation: Minor fixes 2025-06-29 18:56:52 +08:00
caelansar
7aa0a57e60
Fix callback deletion in UDP transport 2025-06-29 18:56:52 +08:00
世界
2673e64bcb
documentation: Try to make the play review happy 2025-06-29 18:56:51 +08:00
世界
3d3c1709d7
Fix missing handling of legacy domain_strategy options 2025-06-29 18:56:51 +08:00
世界
9de29a590f
Improve local DNS server 2025-06-29 18:56:50 +08:00
anytls
a5282b08ec
Update anytls
Co-authored-by: anytls <anytls>
2025-06-29 18:56:50 +08:00
世界
b26c2083bf
Fix DNS dialer 2025-06-29 18:56:50 +08:00
世界
c1f4c691dc
release: Skip override version for iOS 2025-06-29 18:56:49 +08:00
iikira
c0ef6eb728
Fix UDP DNS server crash
Signed-off-by: iikira <i2@mail.iikira.com>
2025-06-29 18:56:49 +08:00
ReleTor
074d61021f
Fix fetch ECH configs 2025-06-29 18:56:49 +08:00
世界
246c9d4e40
Allow direct outbounds without domain_resolver 2025-06-29 18:56:49 +08:00
世界
3e3466c8d7
Fix Tailscale dialer 2025-06-29 18:56:48 +08:00
dyhkwong
f73415a732
Fix DNS over QUIC stream close 2025-06-29 18:56:48 +08:00
anytls
ecabe9ffe1
Update anytls
Co-authored-by: anytls <anytls>
2025-06-29 18:56:48 +08:00
Rambling2076
2dae1ee284
Fix missing with_tailscale in Dockerfile
Signed-off-by: Rambling2076 <Rambling2076@proton.me>
2025-06-29 18:56:47 +08:00
世界
2afb24d698
Fail when default DNS server not found 2025-06-29 18:56:47 +08:00
世界
ade83ee758
Update gVisor to 20250319.0 2025-06-29 18:56:47 +08:00
世界
ac9c300ca7
Explicitly reject detour to empty direct outbounds 2025-06-29 18:56:47 +08:00
世界
e6eb3cec2b
Add netns support 2025-06-29 18:56:46 +08:00
世界
601b79371b
Add wildcard name support for predefined records 2025-06-29 18:56:46 +08:00
世界
56b957d30d
Remove map usage in options 2025-06-29 18:56:45 +08:00
世界
eb87b1a708
Fix unhandled DNS loop 2025-06-29 18:56:45 +08:00
世界
c0a5561bd4
Add wildcard-sni support for shadow-tls inbound 2025-06-29 18:56:45 +08:00
k9982874
4a3fe1d41c
Add ntp protocol sniffing 2025-06-29 18:56:45 +08:00
世界
4cbbcfb04d
option: Fix marshal legacy DNS options 2025-06-29 18:56:44 +08:00
世界
b3ad4e0e39
Make domain_resolver optional when only one DNS server is configured 2025-06-29 18:56:44 +08:00
世界
49f9c0011d
Fix DNS lookup context pollution 2025-06-29 18:56:44 +08:00
世界
c8c165af87
Fix http3 DNS server connecting to wrong address 2025-06-29 18:56:43 +08:00
Restia-Ashbell
3f790ff8c9
documentation: Fix typo 2025-06-29 18:56:43 +08:00
anytls
f2272ae1e7
Update sing-anytls
Co-authored-by: anytls <anytls>
2025-06-29 18:56:43 +08:00
k9982874
b40c264c0a
Fix hosts DNS server 2025-06-29 18:56:43 +08:00
世界
29fc8d6a86
Fix UDP DNS server crash 2025-06-29 18:56:43 +08:00
世界
46ca27c926
documentation: Fix missing ip_accept_any DNS rule option 2025-06-29 18:56:42 +08:00
世界
243a5dd477
Fix anytls dialer usage 2025-06-29 18:56:42 +08:00
世界
844e9f09a6
Move predefined DNS server to rule action 2025-06-29 18:56:41 +08:00
世界
9aa673f79e
Fix domain resolver on direct outbound 2025-06-29 18:56:41 +08:00
Zephyruso
5abd74ffe3
Fix missing AnyTLS display name 2025-06-29 18:56:41 +08:00
anytls
68a32960bd
Update sing-anytls
Co-authored-by: anytls <anytls>
2025-06-29 18:56:41 +08:00
Estel
1e62e3e5d4
documentation: Fix typo
Signed-off-by: Estel <callmebedrockdigger@gmail.com>
2025-06-29 18:56:41 +08:00
TargetLocked
40c03a9913
Fix parsing legacy DNS options 2025-06-29 18:56:40 +08:00
世界
2ea4029868
Fix DNS fallback 2025-06-29 18:56:40 +08:00
世界
66f5cdd014
documentation: Fix missing hosts DNS server 2025-06-29 18:56:39 +08:00
anytls
89da2b6355
Add MinIdleSession option to AnyTLS outbound
Co-authored-by: anytls <anytls>
2025-06-29 18:56:39 +08:00
ReleTor
ee2b8498e6
documentation: Minor fixes 2025-06-29 18:56:39 +08:00
libtry486
b1eaf537bd
documentation: Fix typo
fix typo

Signed-off-by: libtry486 <89328481+libtry486@users.noreply.github.com>
2025-06-29 18:56:39 +08:00
Alireza Ahmadi
63739c1621
Fix Outbound deadlock 2025-06-29 18:56:38 +08:00
世界
3c8ddee029
documentation: Fix AnyTLS doc 2025-06-29 18:56:38 +08:00
anytls
23aad70045
Add AnyTLS protocol 2025-06-29 18:56:38 +08:00
世界
0d67b51267
Migrate to stdlib ECH support 2025-06-29 18:56:37 +08:00
世界
c02f939265
Add fallback local DNS server for iOS 2025-06-29 18:56:37 +08:00
世界
36b84e25c2
Get darwin local DNS server from libresolv 2025-06-29 18:56:37 +08:00
世界
9fd4b0e9ae
Improve resolve action 2025-06-29 18:56:36 +08:00
世界
e68cdcc98a
Add back port hopping to hysteria 1 2025-06-29 18:56:36 +08:00
xchacha20-poly1305
2691617c5e
Remove single quotes of raw Moziila certs 2025-06-29 18:56:35 +08:00
世界
04056a1357
Add Tailscale endpoint 2025-06-29 18:56:35 +08:00
世界
faac858e5d
Build legacy binaries with latest Go 2025-06-29 18:56:35 +08:00
世界
a818c8abeb
documentation: Remove outdated icons 2025-06-29 18:56:34 +08:00
世界
15cbe9fc87
documentation: Certificate store 2025-06-29 18:56:34 +08:00
世界
e186f2d31e
documentation: TLS fragment 2025-06-29 18:56:34 +08:00
世界
e9323481a4
documentation: Outbound domain resolver 2025-06-29 18:56:33 +08:00
世界
a0a41ff2bb
documentation: Refactor DNS 2025-06-29 18:56:33 +08:00
世界
549daf9d41
Add certificate store 2025-06-29 18:56:33 +08:00
世界
fa370f7d04
Add TLS fragment support 2025-06-29 18:56:33 +08:00
世界
795cb17bfa
refactor: Outbound domain resolver 2025-06-29 18:56:32 +08:00
世界
00d8add761
refactor: DNS 2025-06-29 18:56:32 +08:00
8 changed files with 21 additions and 34 deletions

View File

@ -245,8 +245,8 @@ lib:
go run ./cmd/internal/build_libbox -target ios
lib_install:
go install -v github.com/sagernet/gomobile/cmd/gomobile@v0.1.7
go install -v github.com/sagernet/gomobile/cmd/gobind@v0.1.7
go install -v github.com/sagernet/gomobile/cmd/gomobile@v0.1.6
go install -v github.com/sagernet/gomobile/cmd/gobind@v0.1.6
docs:
venv/bin/mkdocs serve

View File

@ -177,7 +177,7 @@ func publishTestflight(ctx context.Context) error {
}
log.Info(string(platform), " ", tag, " publish")
response, err := client.TestFlight.AddBuildsToBetaGroup(ctx, groupID, []string{build.ID})
if response != nil && (response.StatusCode == http.StatusUnprocessableEntity || response.StatusCode == http.StatusNotFound) {
if response != nil && response.StatusCode == http.StatusUnprocessableEntity {
log.Info("waiting for process")
time.Sleep(15 * time.Second)
continue

View File

@ -46,9 +46,8 @@ var (
sharedFlags []string
debugFlags []string
sharedTags []string
darwinTags []string
iosTags []string
memcTags []string
notMemcTags []string
debugTags []string
)
@ -63,9 +62,8 @@ func init() {
debugFlags = append(debugFlags, "-ldflags", "-X github.com/sagernet/sing-box/constant.Version="+currentTag)
sharedTags = append(sharedTags, "with_gvisor", "with_quic", "with_wireguard", "with_utls", "with_clash_api", "with_conntrack")
darwinTags = append(darwinTags, "with_dhcp")
iosTags = append(iosTags, "with_dhcp", "with_low_memory")
memcTags = append(memcTags, "with_tailscale")
notMemcTags = append(notMemcTags, "with_low_memory")
debugTags = append(debugTags, "debug")
}
@ -155,7 +153,6 @@ func buildApple() {
"-v",
"-target", bindTarget,
"-libname=box",
"-tags-not-macos=with_low_memory",
}
if !withTailscale {
args = append(args, "-tags-macos="+strings.Join(memcTags, ","))
@ -167,7 +164,7 @@ func buildApple() {
args = append(args, debugFlags...)
}
tags := append(sharedTags, darwinTags...)
tags := append(sharedTags, iosTags...)
if withTailscale {
tags = append(tags, memcTags...)
}

View File

@ -2,15 +2,10 @@
icon: material/alert-decagram
---
#### 1.12.0-beta.31
#### 1.12.0-beta.30
* Improve tun performance on Apple platforms **1**
* Fixes and improvements
**1**:
We have significantly improved the performance of tun inbound on Apple platforms, especially in the gVisor stack.
### 1.11.14
* Fixes and improvements

6
go.mod
View File

@ -25,16 +25,16 @@ require (
github.com/sagernet/bbolt v0.0.0-20231014093535-ea5cb2fe9f0a
github.com/sagernet/cors v1.2.1
github.com/sagernet/fswatch v0.1.1
github.com/sagernet/gomobile v0.1.7
github.com/sagernet/gomobile v0.1.6
github.com/sagernet/gvisor v0.0.0-20250325023245-7a9c0f5725fb
github.com/sagernet/quic-go v0.52.0-beta.1
github.com/sagernet/sing v0.6.12-0.20250703120903-7081a0c40539
github.com/sagernet/sing v0.6.11-0.20250521033217-30d675ea099b
github.com/sagernet/sing-mux v0.3.2
github.com/sagernet/sing-quic v0.5.0-beta.2
github.com/sagernet/sing-shadowsocks v0.2.8
github.com/sagernet/sing-shadowsocks2 v0.2.1
github.com/sagernet/sing-shadowtls v0.2.1-0.20250503051639-fcd445d33c11
github.com/sagernet/sing-tun v0.6.10-0.20250703121732-a0881ada3251
github.com/sagernet/sing-tun v0.6.10-0.20250630100036-8763c24e4935
github.com/sagernet/sing-vmess v0.2.4-0.20250605032146-38cc72672c88
github.com/sagernet/smux v1.5.34-mod.2
github.com/sagernet/tailscale v1.80.3-mod.5

12
go.sum
View File

@ -157,8 +157,8 @@ github.com/sagernet/cors v1.2.1 h1:Cv5Z8y9YSD6Gm+qSpNrL3LO4lD3eQVvbFYJSG7JCMHQ=
github.com/sagernet/cors v1.2.1/go.mod h1:O64VyOjjhrkLmQIjF4KGRrJO/5dVXFdpEmCW/eISRAI=
github.com/sagernet/fswatch v0.1.1 h1:YqID+93B7VRfqIH3PArW/XpJv5H4OLEVWDfProGoRQs=
github.com/sagernet/fswatch v0.1.1/go.mod h1:nz85laH0mkQqJfaOrqPpkwtU1znMFNVTpT/5oRsVz/o=
github.com/sagernet/gomobile v0.1.7 h1:I9jCJZTH0weP5MsuydvYHX5QfN/r6Fe8ptAIj1+SJVg=
github.com/sagernet/gomobile v0.1.7/go.mod h1:Pqq2+ZVvs10U7xK+UwJgwYWUykewi8H6vlslAO73n9E=
github.com/sagernet/gomobile v0.1.6 h1:JkR1ToKOrdoiwULte4pYS5HYdPBzl2N+JNuuwVuLs0k=
github.com/sagernet/gomobile v0.1.6/go.mod h1:Pqq2+ZVvs10U7xK+UwJgwYWUykewi8H6vlslAO73n9E=
github.com/sagernet/gvisor v0.0.0-20250325023245-7a9c0f5725fb h1:pprQtDqNgqXkRsXn+0E8ikKOemzmum8bODjSfDene38=
github.com/sagernet/gvisor v0.0.0-20250325023245-7a9c0f5725fb/go.mod h1:QkkPEJLw59/tfxgapHta14UL5qMUah5NXhO0Kw2Kan4=
github.com/sagernet/netlink v0.0.0-20240612041022-b9a21c07ac6a h1:ObwtHN2VpqE0ZNjr6sGeT00J8uU7JF4cNUdb44/Duis=
@ -168,8 +168,8 @@ github.com/sagernet/nftables v0.3.0-beta.4/go.mod h1:OQXAjvjNGGFxaTgVCSTRIhYB5/l
github.com/sagernet/quic-go v0.52.0-beta.1 h1:hWkojLg64zjV+MJOvJU/kOeWndm3tiEfBLx5foisszs=
github.com/sagernet/quic-go v0.52.0-beta.1/go.mod h1:OV+V5kEBb8kJS7k29MzDu6oj9GyMc7HA07sE1tedxz4=
github.com/sagernet/sing v0.6.9/go.mod h1:ARkL0gM13/Iv5VCZmci/NuoOlePoIsW0m7BWfln/Hak=
github.com/sagernet/sing v0.6.12-0.20250703120903-7081a0c40539 h1:SK4M4FCNdwV4EiYKIUZ9qM4lr/1NQogJe1YoyYw5DV8=
github.com/sagernet/sing v0.6.12-0.20250703120903-7081a0c40539/go.mod h1:ARkL0gM13/Iv5VCZmci/NuoOlePoIsW0m7BWfln/Hak=
github.com/sagernet/sing v0.6.11-0.20250521033217-30d675ea099b h1:ZjTCYPb5f7aHdf1UpUvE22dVmf7BL8eQ/zLZhjgh7Wo=
github.com/sagernet/sing v0.6.11-0.20250521033217-30d675ea099b/go.mod h1:ARkL0gM13/Iv5VCZmci/NuoOlePoIsW0m7BWfln/Hak=
github.com/sagernet/sing-mux v0.3.2 h1:meZVFiiStvHThb/trcpAkCrmtJOuItG5Dzl1RRP5/NE=
github.com/sagernet/sing-mux v0.3.2/go.mod h1:pht8iFY4c9Xltj7rhVd208npkNaeCxzyXCgulDPLUDA=
github.com/sagernet/sing-quic v0.5.0-beta.2 h1:j7KAbBuGmsKwSxVAQL5soJ+wDqxim4/llK2kxB0hSKk=
@ -180,8 +180,8 @@ github.com/sagernet/sing-shadowsocks2 v0.2.1 h1:dWV9OXCeFPuYGHb6IRqlSptVnSzOelnq
github.com/sagernet/sing-shadowsocks2 v0.2.1/go.mod h1:RnXS0lExcDAovvDeniJ4IKa2IuChrdipolPYWBv9hWQ=
github.com/sagernet/sing-shadowtls v0.2.1-0.20250503051639-fcd445d33c11 h1:tK+75l64tm9WvEFrYRE1t0YxoFdWQqw/h7Uhzj0vJ+w=
github.com/sagernet/sing-shadowtls v0.2.1-0.20250503051639-fcd445d33c11/go.mod h1:sWqKnGlMipCHaGsw1sTTlimyUpgzP4WP3pjhCsYt9oA=
github.com/sagernet/sing-tun v0.6.10-0.20250703121732-a0881ada3251 h1:eH9naJXvyF/DZDk0V1SYkL6ypYD+A1tUFWLcT7PRezg=
github.com/sagernet/sing-tun v0.6.10-0.20250703121732-a0881ada3251/go.mod h1:fisFCbC4Vfb6HqQNcwPJi2CDK2bf0Xapyz3j3t4cnHE=
github.com/sagernet/sing-tun v0.6.10-0.20250630100036-8763c24e4935 h1:wha4BG4mrEKaIoouVyiU5BcPfKD1n0LkiL4vqdjaVps=
github.com/sagernet/sing-tun v0.6.10-0.20250630100036-8763c24e4935/go.mod h1:fisFCbC4Vfb6HqQNcwPJi2CDK2bf0Xapyz3j3t4cnHE=
github.com/sagernet/sing-vmess v0.2.4-0.20250605032146-38cc72672c88 h1:0pVm8sPOel+BoiCddW3pV3cKDKEaSioVTYDdTSKjyFI=
github.com/sagernet/sing-vmess v0.2.4-0.20250605032146-38cc72672c88/go.mod h1:IL8Rr+EGwuqijszZkNrEFTQDKhilEpkqFqOlvdpS6/w=
github.com/sagernet/smux v1.5.34-mod.2 h1:gkmBjIjlJ2zQKpLigOkFur5kBKdV6bNRoFu2WkltRQ4=

View File

@ -130,14 +130,9 @@ func NewInbound(ctx context.Context, router adapter.Router, logger log.ContextLo
deprecated.Report(ctx, deprecated.OptionTUNGSO)
}
platformInterface := service.FromContext[platform.Interface](ctx)
tunMTU := options.MTU
if tunMTU == 0 {
if platformInterface != nil && platformInterface.UnderNetworkExtension() {
tunMTU = 4000
} else {
tunMTU = 9000
}
tunMTU = 9000
}
var udpTimeout time.Duration
if options.UDPTimeout != 0 {
@ -213,7 +208,7 @@ func NewInbound(ctx context.Context, router adapter.Router, logger log.ContextLo
},
udpTimeout: udpTimeout,
stack: options.Stack,
platformInterface: platformInterface,
platformInterface: service.FromContext[platform.Interface](ctx),
platformOptions: common.PtrValueOrDefault(options.Platform),
}
for _, routeAddressSet := range options.RouteAddressSet {

View File

@ -31,9 +31,6 @@ type HTTPConn struct {
}
func NewHTTP1Conn(conn net.Conn, request *http.Request) *HTTPConn {
if request.Header.Get("Host") == "" {
request.Header.Set("Host", request.Host)
}
return &HTTPConn{
Conn: conn,
request: request,
@ -92,6 +89,9 @@ func (c *HTTPConn) writeRequest(payload []byte) error {
if err != nil {
return err
}
if c.request.Header.Get("Host") == "" {
c.request.Header.Set("Host", c.request.Host)
}
for key, value := range c.request.Header {
_, err = writer.Write([]byte(F.ToString(key, ": ", strings.Join(value, ", "), CRLF)))
if err != nil {