Add search domain support for Tailscale DNS

This commit is contained in:
世界
2026-04-20 09:39:32 +08:00
parent 6ecd3deef5
commit b358fdd564
4 changed files with 80 additions and 6 deletions
+14 -1
View File
@@ -2,6 +2,10 @@
icon: material/new-box
---
!!! quote "Changes in sing-box 1.14.0"
:material-plus: [accept_search_domain](#accept_search_domain)
!!! question "Since sing-box 1.12.0"
# Tailscale
@@ -17,7 +21,8 @@ icon: material/new-box
"tag": "",
"endpoint": "ts-ep",
"accept_default_resolvers": false
"accept_default_resolvers": false,
"accept_search_domain": false
}
]
}
@@ -38,6 +43,14 @@ Indicates whether default DNS resolvers should be accepted for fallback queries
if not enabled, `NXDOMAIN` will be returned for non-Tailscale domain queries.
#### accept_search_domain
!!! question "Since sing-box 1.14.0"
When enabled, single-label queries (e.g. `my-device`) are retried against each Tailscale search domain until one resolves.
Default resolvers are not consulted for single-label queries regardless of `accept_default_resolvers`.
### Examples
=== "MagicDNS only"
+14 -1
View File
@@ -2,6 +2,10 @@
icon: material/new-box
---
!!! quote "sing-box 1.14.0 中的更改"
:material-plus: [accept_search_domain](#accept_search_domain)
!!! question "自 sing-box 1.12.0 起"
# Tailscale
@@ -17,7 +21,8 @@ icon: material/new-box
"tag": "",
"endpoint": "ts-ep",
"accept_default_resolvers": false
"accept_default_resolvers": false,
"accept_search_domain": false
}
]
}
@@ -38,6 +43,14 @@ icon: material/new-box
如果未启用,对于非 Tailscale 域名查询将返回 `NXDOMAIN`
#### accept_search_domain
!!! question "自 sing-box 1.14.0 起"
启用后,单标签查询(例如 `my-device`)将依次附加 Tailscale 搜索域进行重试,直到其中一个解析成功。
对于单标签查询,无论 `accept_default_resolvers` 是否启用,都不会使用默认 DNS 解析器。
### 示例
=== "仅 MagicDNS"