Compare commits

..

27 Commits

Author SHA1 Message Date
世界
1ea23490b5 documentation: Bump version 2025-09-10 10:32:48 +08:00
世界
0717b3363a Fix read ICMPv6 echo reply from gVisor 2025-09-10 10:32:48 +08:00
世界
23af702b27 Improve ktls rx error handling 2025-09-10 10:32:48 +08:00
世界
160663e1cf Improve compatibility for kTLS 2025-09-10 10:32:48 +08:00
世界
b8eb32ba99 ktls: Add warning for inappropriate scenarios 2025-09-09 18:10:17 +08:00
世界
52ad6e1a97 documentation: Bump version 2025-09-09 18:10:17 +08:00
世界
9f8c760500 Update Go to 1.25.1 2025-09-09 18:10:17 +08:00
世界
1b9f28ea46 Add support for kTLS
Reference: https://gitlab.com/go-extension/tls
2025-09-09 18:10:17 +08:00
世界
a4675aa4cb Add proxy support for ICMP echo request 2025-09-09 18:08:44 +08:00
世界
e225c6cb69 Fix resolve using resolved 2025-09-09 18:03:44 +08:00
世界
2ecdd9bf47 documentation: Update behavior of local DNS server on darwin 2025-09-09 18:03:44 +08:00
世界
b27ab0047d Stop using DHCP on iOS and tvOS
We do not have the `com.apple.developer.networking.multicast` entitlement and are unable to obtain it for non-technical reasons.
2025-09-09 18:03:44 +08:00
世界
ef06f8a726 Remove use of ldflags -checklinkname=0 on darwin 2025-09-09 18:03:44 +08:00
世界
fa65ddd158 Fix local DNS server on darwin
We mistakenly believed that `libresolv`'s `search` function worked correctly in NetworkExtension, but it seems only `getaddrinfo` does.

This commit changes the behavior of the `local` DNS server in NetworkExtension to prefer DHCP, falling back to `getaddrinfo` if DHCP servers are unavailable.

It's worth noting that `prefer_go` does not disable DHCP since it respects Dial Fields, but `getaddrinfo` does the opposite. The new behavior only applies to NetworkExtension, not to all scenarios (primarily command-line binaries) as it did previously.

In addition, this commit also improves the DHCP DNS server to use the same robust query logic as `local`.
2025-09-09 18:03:43 +08:00
世界
388638e830 Fix legacy DNS config 2025-09-09 18:03:43 +08:00
世界
6b197e2143 Fix rule-set format 2025-09-09 18:03:43 +08:00
世界
1f6dbf8dd3 documentation: Remove outdated icons 2025-09-09 18:03:43 +08:00
世界
dd0aaaf1a9 documentation: Improve local DNS server 2025-09-09 18:03:42 +08:00
世界
4a47639bbd Use libresolv in local DNS server on darwin 2025-09-09 18:03:42 +08:00
世界
13a056f57e Use resolved in local DNS server if available 2025-09-09 18:03:42 +08:00
xchacha20-poly1305
8f415a7a88 Fix rule set version 2025-09-09 18:03:42 +08:00
世界
4d5de561da documentation: Add preferred_by route rule item 2025-09-09 18:03:41 +08:00
世界
8550a342b1 Add preferred_by route rule item 2025-09-09 18:03:41 +08:00
世界
0dab162b96 documentation: Add interface address rule items 2025-09-09 18:03:41 +08:00
世界
8d3e6d39a2 Add interface address rule items 2025-09-09 18:03:41 +08:00
neletor
a9e2b9e402 Add support for ech retry configs 2025-09-09 18:03:41 +08:00
Zephyruso
69d96cfdc3 Add /dns/flush-clash meta api 2025-09-09 18:03:41 +08:00
8 changed files with 106 additions and 43 deletions

View File

@@ -92,7 +92,7 @@ jobs:
set -xeuo pipefail
mkdir -p dist
go build -v -trimpath -o dist/sing-box -tags "${BUILD_TAGS}" \
-ldflags '-s -buildid= -X github.com/sagernet/sing-box/constant.Version=${{ needs.calculate_version.outputs.version }} -checklinkname=0' \
-ldflags '-s -buildid= -X github.com/sagernet/sing-box/constant.Version=${{ needs.calculate_version.outputs.version }}' \
./cmd/sing-box
env:
CGO_ENABLED: "0"

View File

@@ -134,7 +134,6 @@ func publishTestflight(ctx context.Context) error {
asc.PlatformTVOS,
}
}
waitingForProcess := false
for _, platform := range platforms {
log.Info(string(platform), " list builds")
for {
@@ -146,13 +145,12 @@ func publishTestflight(ctx context.Context) error {
return err
}
build := builds.Data[0]
if !waitingForProcess && (common.Contains(buildIDs, build.ID) || time.Since(build.Attributes.UploadedDate.Time) > 30*time.Minute) {
if common.Contains(buildIDs, build.ID) || time.Since(build.Attributes.UploadedDate.Time) > 30*time.Minute {
log.Info(string(platform), " ", tag, " waiting for process")
time.Sleep(15 * time.Second)
continue
}
if *build.Attributes.ProcessingState != "VALID" {
waitingForProcess = true
log.Info(string(platform), " ", tag, " waiting for process: ", *build.Attributes.ProcessingState)
time.Sleep(15 * time.Second)
continue

View File

@@ -8,6 +8,7 @@ import (
"net"
"net/http"
"net/url"
"os"
"strconv"
"sync"
"time"
@@ -177,7 +178,7 @@ func (t *HTTPSTransport) Exchange(ctx context.Context, message *mDNS.Msg) (*mDNS
startAt := time.Now()
response, err := t.exchange(ctx, message)
if err != nil {
if errors.Is(err, context.DeadlineExceeded) {
if errors.Is(err, os.ErrDeadlineExceeded) {
t.transportAccess.Lock()
defer t.transportAccess.Unlock()
if t.transportResetAt.After(startAt) {

View File

@@ -2,14 +2,6 @@
icon: material/alert-decagram
---
#### 1.13.0-alpha.11
* Fixes and improvements
#### 1.12.5
* Fixes and improvements
#### 1.13.0-alpha.10
* Improve kTLS support **1**
@@ -19,23 +11,96 @@ icon: material/alert-decagram
kTLS is now compatible with custom TLS implementations other than uTLS.
#### 1.13.0-alpha.9
* Add kTLS support **1**
* Fixes and improvements
**1**:
See [TLS](/configuration/shared/tls/).
#### 1.12.4
* Fixes and improvements
#### 1.13.0-alpha.7
* Add reject support for ICMP echo supports **1**
* Fixes and improvements
**1**:
You can now reject, drop, or directly reply to ICMP echo (ping) requests using `reject` Route Action.
See [Route Action](/configuration/route/rule_action/#reject).
#### 1.13.0-alpha.6
* Add proxy support for ICMP echo requests **1**
* Fixes and improvements
**1**:
You can now match ICMP echo (ping) requests using the new `icmp` network in routing rules.
Such traffic originates from `TUN`, `WireGuard`, and `Tailscale` inbounds and can be routed to `Direct`, `WireGuard`, and `Tailscale` outbounds.
See [Route Rule](/configuration/route/rule/#network).
#### 1.12.3
* Fixes and improvements
#### 1.13.0-alpha.4
* Fixes and improvements
#### 1.12.2
* Fixes and improvements
#### 1.13.0-alpha.3
* Improve `local` DNS server **1**
* Fixes and improvements
**1**:
On Apple platforms, Windows, and Linux (when using systemd-resolved),
`local` DNS server now works with Tun inbound which overrides system DNS servers.
See [Local DNS Server](/configuration/dns/server/local/).
#### 1.13.0-alpha.2
* Add `preferred_by` rule item **1**
* Fixes and improvements
**1**:
The new `preferred_by` routing rule item allows you to
match preferred domains and addresses for specific outbounds.
See [Route Rule](/configuration/route/rule/#preferred_by).
#### 1.13.0-alpha.1
* Add interface address rule items **1**
* Fixes and improvements
**1**:
New interface address rules allow you to dynamically adjust rules based on your network environment.
See [Route Rule](/configuration/route/rule/), [DNS Route Rule](/configuration/dns/rule/)
and [Headless Rule](/configuration/rule-set/headless-rule/).
#### 1.12.1
* Fixes and improvements
#### 1.12.0
### 1.12.0
* Refactor DNS servers **1**
* Add domain resolver options**2**
@@ -186,7 +251,7 @@ We continue to experience issues updating our sing-box apps on the App Store and
Until we rewrite and resubmit the apps, they are considered irrecoverable.
Therefore, after this release, we will not be repeating this notice unless there is new information.
### 1.11.15
#### 1.11.15
* Fixes and improvements
@@ -202,7 +267,7 @@ violated the rules (TestFlight users are not affected)._
We have significantly improved the performance of tun inbound on Apple platforms, especially in the gVisor stack.
### 1.11.14
#### 1.11.14
* Fixes and improvements
@@ -252,7 +317,7 @@ You can now choose what the DERP home page shows, just like with derper's `-home
See [DERP](/configuration/service/derp/#home).
### 1.11.13
#### 1.11.13
* Fixes and improvements
@@ -290,7 +355,7 @@ SSM API service is a RESTful API server for managing Shadowsocks servers.
See [SSM API Service](/configuration/service/ssm-api/).
### 1.11.11
#### 1.11.11
* Fixes and improvements
@@ -322,7 +387,7 @@ You can now set `bind_interface`, `routing_mark` and `reuse_addr` in Listen Fiel
See [Listen Fields](/configuration/shared/listen/).
### 1.11.10
#### 1.11.10
* Undeprecate the `block` outbound **1**
* Fixes and improvements
@@ -340,7 +405,7 @@ violated the rules (TestFlight users are not affected)._
* Update quic-go to v0.51.0
* Fixes and improvements
### 1.11.9
#### 1.11.9
* Fixes and improvements
@@ -351,7 +416,7 @@ violated the rules (TestFlight users are not affected)._
* Fixes and improvements
### 1.11.8
#### 1.11.8
* Improve `auto_redirect` **1**
* Fixes and improvements
@@ -368,7 +433,7 @@ violated the rules (TestFlight users are not affected)._
* Fixes and improvements
### 1.11.7
#### 1.11.7
* Fixes and improvements
@@ -384,7 +449,7 @@ violated the rules (TestFlight users are not affected)._
Now `auto_redirect` fixes compatibility issues between tun and Docker bridge networks,
see [Tun](/configuration/inbound/tun/#auto_redirect).
### 1.11.6
#### 1.11.6
* Fixes and improvements
@@ -425,7 +490,7 @@ See [Protocol Sniff](/configuration/route/sniff/).
See [Dial Fields](/configuration/shared/dial/#domain_resolver).
### 1.11.5
#### 1.11.5
* Fixes and improvements
@@ -441,7 +506,7 @@ violated the rules (TestFlight users are not affected)._
See [DNS Rule Action](/configuration/dns/rule_action/#predefined).
### 1.11.4
#### 1.11.4
* Fixes and improvements
@@ -497,7 +562,7 @@ Due to maintenance difficulties, sing-box 1.12.0 requires at least Go 1.23 to co
For Windows 7 users, legacy binaries now continue to compile with Go 1.23 and patches from [MetaCubeX/go](https://github.com/MetaCubeX/go).
### 1.11.3
#### 1.11.3
* Fixes and improvements
@@ -508,7 +573,7 @@ process._
* Fixes and improvements
### 1.11.1
#### 1.11.1
* Fixes and improvements
@@ -687,7 +752,7 @@ See [Hysteria2](/configuration/outbound/hysteria2/).
When `up_mbps` and `down_mbps` are set, `ignore_client_bandwidth` instead denies clients from using BBR CC.
### 1.10.7
#### 1.10.7
* Fixes and improvements
@@ -782,7 +847,7 @@ and the old outbound will be removed in sing-box 1.13.0.
See [Endpoint](/configuration/endpoint/), [WireGuard Endpoint](/configuration/endpoint/wireguard/)
and [Migrate WireGuard outbound fields to route options](/migration/#migrate-wireguard-outbound-to-endpoint).
### 1.10.2
#### 1.10.2
* Add deprecated warnings
* Fix proxying websocket connections in HTTP/mixed inbounds
@@ -919,7 +984,7 @@ See [Rule Action](/configuration/route/rule_action/).
* Update quic-go to v0.48.0
* Fixes and improvements
### 1.10.1
#### 1.10.1
* Fixes and improvements

8
go.mod
View File

@@ -27,20 +27,20 @@ require (
github.com/sagernet/gomobile v0.1.8
github.com/sagernet/gvisor v0.0.0-20250909151924-850a370d8506
github.com/sagernet/quic-go v0.52.0-beta.1
github.com/sagernet/sing v0.8.0-beta.1
github.com/sagernet/sing v0.7.8-0.20250909124511-ab3827767cea
github.com/sagernet/sing-mux v0.3.3
github.com/sagernet/sing-quic v0.5.2-0.20250909100920-da23407a63d5
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.8.0-beta.8
github.com/sagernet/sing-tun v0.8.0-beta.1.0.20250909152225-7de8ff7f20a3
github.com/sagernet/sing-vmess v0.2.8-0.20250909125414-3aed155119a1
github.com/sagernet/smux v1.5.34-mod.2
github.com/sagernet/tailscale v1.80.3-sing-box-1.13-mod.1
github.com/sagernet/wireguard-go v0.0.1-beta.7
github.com/sagernet/ws v0.0.0-20231204124109-acfe8907c854
github.com/spf13/cobra v1.9.1
github.com/stretchr/testify v1.11.1
github.com/stretchr/testify v1.10.0
github.com/vishvananda/netns v0.0.5
go.uber.org/zap v1.27.0
go4.org/netipx v0.0.0-20231129151722-fdeea329fbba
@@ -55,8 +55,6 @@ require (
howett.net/plist v1.0.1
)
//replace github.com/sagernet/sing => ../sing
require (
filippo.io/edwards25519 v1.1.0 // indirect
github.com/ajg/form v1.5.1 // indirect

12
go.sum
View File

@@ -167,8 +167,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.8.0-beta.1 h1:tBOdh/K/EBdXWuBxUJsZONyxDzyfzjdCF1Yq57QtpE4=
github.com/sagernet/sing v0.8.0-beta.1/go.mod h1:ARkL0gM13/Iv5VCZmci/NuoOlePoIsW0m7BWfln/Hak=
github.com/sagernet/sing v0.7.8-0.20250909124511-ab3827767cea h1:vkWFzPVlqnKq3FMpmh43ZVDbqHWapbv0Sh3vQc8oo7o=
github.com/sagernet/sing v0.7.8-0.20250909124511-ab3827767cea/go.mod h1:ARkL0gM13/Iv5VCZmci/NuoOlePoIsW0m7BWfln/Hak=
github.com/sagernet/sing-mux v0.3.3 h1:YFgt9plMWzH994BMZLmyKL37PdIVaIilwP0Jg+EcLfw=
github.com/sagernet/sing-mux v0.3.3/go.mod h1:pht8iFY4c9Xltj7rhVd208npkNaeCxzyXCgulDPLUDA=
github.com/sagernet/sing-quic v0.5.2-0.20250909100920-da23407a63d5 h1:vnRNLE0bBnz5NNbBoFH7NA7mlvNSa2Z4w+1Eb8pyX48=
@@ -179,8 +179,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.8.0-beta.8 h1:K/tPAiuW4Qf1usZvdqjAMVwaxAVE/fb64YqO9SCvcTg=
github.com/sagernet/sing-tun v0.8.0-beta.8/go.mod h1:DCGwHe70ujuzmQ3bvUnf9u1FFRoRvBQ1dDpqZov1ZDA=
github.com/sagernet/sing-tun v0.8.0-beta.1.0.20250909152225-7de8ff7f20a3 h1:zgT6GKg8eGtSz806t691yZ6UG7e79ga76Ikhbf79+nA=
github.com/sagernet/sing-tun v0.8.0-beta.1.0.20250909152225-7de8ff7f20a3/go.mod h1:9h+YEHr18YiQ63PB7Ug80B180cwU5E9gUpGEvQb/zlM=
github.com/sagernet/sing-vmess v0.2.8-0.20250909125414-3aed155119a1 h1:aSwUNYUkVyVvdmBSufR8/nRFonwJeKSIROxHcm5br9o=
github.com/sagernet/sing-vmess v0.2.8-0.20250909125414-3aed155119a1/go.mod h1:P11scgTxMxVVQ8dlM27yNm3Cro40mD0+gHbnqrNGDuY=
github.com/sagernet/smux v1.5.34-mod.2 h1:gkmBjIjlJ2zQKpLigOkFur5kBKdV6bNRoFu2WkltRQ4=
@@ -204,8 +204,8 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/tailscale/certstore v0.1.1-0.20231202035212-d3fa0460f47e h1:PtWT87weP5LWHEY//SWsYkSO3RWRZo4OSWagh3YD2vQ=
github.com/tailscale/certstore v0.1.1-0.20231202035212-d3fa0460f47e/go.mod h1:XrBNfAFN+pwoWuksbFS9Ccxnopa15zJGgXRFN90l3K4=
github.com/tailscale/go-winio v0.0.0-20231025203758-c4f33415bf55 h1:Gzfnfk2TWrk8Jj4P4c1a3CtQyMaTVCznlkLZI++hok4=

View File

@@ -5,6 +5,7 @@ import (
"errors"
"net"
"net/netip"
"os"
"strings"
"time"
@@ -661,7 +662,7 @@ func (r *Router) actionSniff(
}
if err != nil {
sniffBuffer.Release()
if !errors.Is(err, context.DeadlineExceeded) {
if !errors.Is(err, os.ErrDeadlineExceeded) {
fatalErr = err
return
}