dns: Add preferred_by rule item

This commit is contained in:
世界
2026-08-30 17:41:40 +08:00
parent f8a623e0c6
commit 14b8f1bd4d
12 changed files with 208 additions and 4 deletions
+17
View File
@@ -6,6 +6,7 @@ icon: material/alert-decagram
:material-plus: [source_mac_address](#source_mac_address)
:material-plus: [source_hostname](#source_hostname)
:material-plus: [preferred_by](#preferred_by)
:material-plus: [match_response](#match_response)
:material-delete-clock: [rule_set_ip_cidr_accept_empty](#rule_set_ip_cidr_accept_empty)
:material-plus: [response_rcode](#response_rcode)
@@ -166,6 +167,10 @@ icon: material/alert-decagram
"source_hostname": [
"my-device"
],
"preferred_by": [
"local",
"ts-dns"
],
"wifi_ssid": [
"My WIFI"
],
@@ -496,6 +501,18 @@ Match source device MAC address.
Match source device hostname from DHCP leases.
#### preferred_by
!!! question "Since sing-box 1.14.0"
Match specified DNS servers' preferred domains.
| Type | Match |
|-------------|-----------------------------------------------------|
| `hosts` | Match predefined entries and entries in hosts files |
| `local` | Match hosts entries and neighbor-resolved hosts |
| `tailscale` | Match MagicDNS hosts and DNS route suffixes |
#### wifi_ssid
!!! quote ""