fix(client-config): 去掉 local DNS 的 detour:direct(sing-box 1.12 运行时 FATAL)

sing-box 1.12 start-service 阶段拒绝 DNS server detour 到空 direct 出站
(FATAL: detour to an empty direct outbound makes no sense)。local DNS 去掉
detour 后走默认路由,功能不变。已在节点用 `sing-box run`(空 inbound 复现
start-service)实测启动无 FATAL —— sing-box check 抓不到这类运行时错。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
wangjia
2026-06-18 21:51:10 +08:00
parent bdf67cb56e
commit 52edb377e4
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -126,7 +126,9 @@ func BuildClientConfig(node *nodes.NodeRow, dpUUID, deriveKey string) ([]byte, e
dns := map[string]any{
"servers": []any{
map[string]any{"tag": "remote", "type": "tls", "server": "8.8.8.8", "detour": "auto"},
map[string]any{"tag": "local", "type": "udp", "server": "223.5.5.5", "detour": "direct"},
// local 不带 detour:sing-box 1.12 拒绝 DNS detour 到空 direct 出站
// (FATAL: detour to an empty direct outbound makes no sense)。
map[string]any{"tag": "local", "type": "udp", "server": "223.5.5.5"},
},
"final": "remote",
"strategy": "ipv4_only",