From 4b3861232b6bdab67425453e542b2d2cd7e385d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Fri, 15 Aug 2025 12:55:03 +0800 Subject: [PATCH] documentation: Add `preferred_by` route rule item --- docs/configuration/route/rule.md | 18 +++++++++++++++++- docs/configuration/route/rule.zh.md | 18 +++++++++++++++++- 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/docs/configuration/route/rule.md b/docs/configuration/route/rule.md index a4864e44..89eecaaf 100644 --- a/docs/configuration/route/rule.md +++ b/docs/configuration/route/rule.md @@ -6,7 +6,8 @@ icon: material/new-box :material-plus: [interface_address](#interface_address) :material-plus: [network_interface_address](#network_interface_address) - :material-plus: [default_interface_address](#default_interface_address) + :material-plus: [default_interface_address](#default_interface_address) + :material-plus: [preferred_by](#preferred_by) !!! quote "Changes in sing-box 1.11.0" @@ -153,6 +154,10 @@ icon: material/new-box "wifi_bssid": [ "00:00:00:00:00:00" ], + "preferred_by": [ + "tailscale", + "wireguard" + ], "rule_set": [ "geoip-cn", "geosite-cn" @@ -428,6 +433,17 @@ Match WiFi SSID. Match WiFi BSSID. +#### preferred_by + +!!! question "Since sing-box 1.13.0" + +Match specified outbounds' preferred routes. + +| Type | Match | +|-------------|-----------------------------------------------| +| `tailscale` | Match MagicDNS domains and peers' allowed IPs | +| `wireguard` | Match peers's allowed IPs | + #### rule_set !!! question "Since sing-box 1.8.0" diff --git a/docs/configuration/route/rule.zh.md b/docs/configuration/route/rule.zh.md index d30dcad9..100344da 100644 --- a/docs/configuration/route/rule.zh.md +++ b/docs/configuration/route/rule.zh.md @@ -6,7 +6,8 @@ icon: material/new-box :material-plus: [interface_address](#interface_address) :material-plus: [network_interface_address](#network_interface_address) - :material-plus: [default_interface_address](#default_interface_address) + :material-plus: [default_interface_address](#default_interface_address) + :material-plus: [preferred_by](#preferred_by) !!! quote "sing-box 1.11.0 中的更改" @@ -150,6 +151,10 @@ icon: material/new-box "wifi_bssid": [ "00:00:00:00:00:00" ], + "preferred_by": [ + "tailscale", + "wireguard" + ], "rule_set": [ "geoip-cn", "geosite-cn" @@ -425,6 +430,17 @@ icon: material/new-box 匹配 WiFi BSSID。 +#### preferred_by + +!!! question "自 sing-box 1.13.0 起" + +匹配制定出站的首选路由。 + +| 类型 | 匹配 | +|-------------|--------------------------------| +| `tailscale` | 匹配 MagicDNS 域名和对端的 allowed IPs | +| `wireguard` | 匹配对端的 allowed IPs | + #### rule_set !!! question "自 sing-box 1.8.0 起"