mirror of
https://github.com/SagerNet/sing-box.git
synced 2026-05-13 13:57:05 +00:00
dns: Add preferred_by rule item
This commit is contained in:
parent
e171852b19
commit
fdec2fe051
12 changed files with 208 additions and 4 deletions
|
|
@ -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 ""
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
],
|
||||
|
|
@ -488,6 +493,18 @@ Available values: `wifi`, `cellular`, `ethernet` and `other`.
|
|||
|
||||
匹配源设备从 DHCP 租约获取的主机名。
|
||||
|
||||
#### preferred_by
|
||||
|
||||
!!! question "自 sing-box 1.14.0 起"
|
||||
|
||||
匹配指定 DNS 服务器的首选域名。
|
||||
|
||||
| 类型 | 匹配 |
|
||||
|-------------|--------------------------|
|
||||
| `hosts` | 匹配预定义条目和 hosts 文件中的条目 |
|
||||
| `local` | 匹配 hosts 中的条目和邻居解析得到的主机名 |
|
||||
| `tailscale` | 匹配 MagicDNS 主机和 DNS 路由后缀 |
|
||||
|
||||
#### wifi_ssid
|
||||
|
||||
!!! quote ""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue