Compare commits

..

23 Commits

Author SHA1 Message Date
世界
d03b4eaf0a
documentation: Bump version 2025-08-28 12:12:00 +08:00
世界
cc3e2fb8fb
Fix local DNS server crash 2025-08-28 12:12:00 +08:00
世界
7cb1cacd89
Add proxy support for ICMP echo request 2025-08-28 12:12:00 +08:00
世界
aa47149382
Fix resolve using resolved 2025-08-28 12:12:00 +08:00
世界
57c6c2b40e
documentation: Update behavior of local DNS server on darwin 2025-08-28 12:11:59 +08:00
世界
ea822eedfc
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-08-28 12:11:59 +08:00
世界
2284fc465c
Remove use of ldflags -checklinkname=0 on darwin 2025-08-28 12:11:59 +08:00
世界
b4d4a38cd4
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-08-28 12:11:59 +08:00
世界
feeace6ee2
Fix legacy DNS config 2025-08-28 12:11:59 +08:00
世界
af2446c150
Fix rule-set format 2025-08-28 12:11:59 +08:00
世界
6010e6cb67
documentation: Remove outdated icons 2025-08-28 12:11:58 +08:00
世界
f3cc2fdb73
documentation: Improve local DNS server 2025-08-28 12:11:58 +08:00
世界
71f7c7ec43
Use libresolv in local DNS server on darwin 2025-08-28 12:11:58 +08:00
世界
9e33df85ab
Use resolved in local DNS server if available 2025-08-28 12:11:57 +08:00
xchacha20-poly1305
e2065120d4
Fix rule set version 2025-08-28 12:11:57 +08:00
世界
fecafd3cb1
documentation: Add preferred_by route rule item 2025-08-28 12:11:57 +08:00
世界
c5f6e22ddb
Add preferred_by route rule item 2025-08-28 12:11:57 +08:00
世界
cd7cabcbae
documentation: Add interface address rule items 2025-08-28 12:11:57 +08:00
世界
7b9b6642d6
Add interface address rule items 2025-08-28 12:11:56 +08:00
neletor
331ba48a6a
Add support for ech retry configs 2025-08-28 12:11:56 +08:00
Zephyruso
1612e98bc6
Add /dns/flush-clash meta api 2025-08-28 12:11:56 +08:00
世界
980e96250b
Bump version 2025-08-28 12:11:30 +08:00
世界
963bc4b647
Enforce Tailscale NoLogsNoSupport 2025-08-28 10:30:13 +08:00
5 changed files with 19 additions and 5 deletions

@ -1 +1 @@
Subproject commit 24b26130071bd96c660deeecc4931a3e31339681
Subproject commit 9d71ede01a1a51bb459847bb5d4444b2846c77de

View File

@ -2,6 +2,14 @@
icon: material/alert-decagram
---
#### 1.13.0-alpha.8
* Fixes and improvements
#### 1.12.4
* Fixes and improvements
#### 1.13.0-alpha.7
* Add reject support for ICMP echo supports **1**

2
go.mod
View File

@ -36,7 +36,7 @@ require (
github.com/sagernet/sing-tun v0.7.0-beta.1.0.20250827122908-b76e852f59b0
github.com/sagernet/sing-vmess v0.2.7
github.com/sagernet/smux v1.5.34-mod.2
github.com/sagernet/tailscale v1.80.3-mod.6
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

4
go.sum
View File

@ -185,8 +185,8 @@ github.com/sagernet/sing-vmess v0.2.7 h1:2ee+9kO0xW5P4mfe6TYVWf9VtY8k1JhNysBqsiY
github.com/sagernet/sing-vmess v0.2.7/go.mod h1:5aYoOtYksAyS0NXDm0qKeTYW1yoE1bJVcv+XLcVoyJs=
github.com/sagernet/smux v1.5.34-mod.2 h1:gkmBjIjlJ2zQKpLigOkFur5kBKdV6bNRoFu2WkltRQ4=
github.com/sagernet/smux v1.5.34-mod.2/go.mod h1:0KW0+R+ycvA2INW4gbsd7BNyg+HEfLIAxa5N02/28Zc=
github.com/sagernet/tailscale v1.80.3-mod.6 h1:oJs0jpRNS/12+mPf3r9maxWl9dWy1RanugLNmsF74Gs=
github.com/sagernet/tailscale v1.80.3-mod.6/go.mod h1:EBxXsWu4OH2ELbQLq32WoBeIubG8KgDrg4/Oaxjs6lI=
github.com/sagernet/tailscale v1.80.3-sing-box-1.13-mod.1 h1:cWM1iPwqIE1t06ft80wpvFB4xbhOpIFI+TFnTw2gnbs=
github.com/sagernet/tailscale v1.80.3-sing-box-1.13-mod.1/go.mod h1:EBxXsWu4OH2ELbQLq32WoBeIubG8KgDrg4/Oaxjs6lI=
github.com/sagernet/wireguard-go v0.0.1-beta.7 h1:ltgBwYHfr+9Wz1eG59NiWnHrYEkDKHG7otNZvu85DXI=
github.com/sagernet/wireguard-go v0.0.1-beta.7/go.mod h1:jGXij2Gn2wbrWuYNUmmNhf1dwcZtvyAvQoe8Xd8MbUo=
github.com/sagernet/ws v0.0.0-20231204124109-acfe8907c854 h1:6uUiZcDRnZSAegryaUGwPC/Fj13JSHwiTftrXhMmYOc=

View File

@ -110,11 +110,17 @@ func (w *stackDevice) DialContext(ctx context.Context, network string, destinati
}
var networkProtocol tcpip.NetworkProtocolNumber
if destination.IsIPv4() {
if !w.inet4Address.IsValid() {
return nil, E.New("missing IPv4 local address")
}
networkProtocol = header.IPv4ProtocolNumber
bind.Addr = tun.AddressFromAddr(w.inet4Address)
} else {
if !w.inet6Address.IsValid() {
return nil, E.New("missing IPv6 local address")
}
networkProtocol = header.IPv6ProtocolNumber
bind.Addr = tun.AddressFromAddr(w.inet4Address)
bind.Addr = tun.AddressFromAddr(w.inet6Address)
}
switch N.NetworkName(network) {
case N.NetworkTCP: