From 648692977d0d8d46b8c95358a51d2600b5ec423b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Thu, 6 Mar 2025 14:02:16 +0800 Subject: [PATCH] documentation: Fix missing `ip_accept_any` DNS rule option --- docs/configuration/dns/rule.md | 38 +++++++++++++------- docs/configuration/dns/rule.zh.md | 46 +++++++++++++++--------- docs/configuration/dns/rule_action.zh.md | 3 +- 3 files changed, 55 insertions(+), 32 deletions(-) diff --git a/docs/configuration/dns/rule.md b/docs/configuration/dns/rule.md index 3039bffc..5d5cb7c3 100644 --- a/docs/configuration/dns/rule.md +++ b/docs/configuration/dns/rule.md @@ -4,6 +4,7 @@ icon: material/alert-decagram !!! quote "Changes in sing-box 1.12.0" + :material-plus: [ip_accept_any](#ip_accept_any) :material-delete-clock: [outbound](#outbound) !!! quote "Changes in sing-box 1.11.0" @@ -77,15 +78,6 @@ icon: material/alert-decagram "domain_regex": [ "^stun\\..+" ], - "geosite": [ - "cn" - ], - "source_geoip": [ - "private" - ], - "geoip": [ - "cn" - ], "source_ip_cidr": [ "10.0.0.0/24", "192.168.0.1" @@ -96,6 +88,7 @@ icon: material/alert-decagram "192.168.0.1" ], "ip_is_private": false, + "ip_accept_any": false, "source_port": [ 12345 ], @@ -147,8 +140,6 @@ icon: material/alert-decagram "geoip-cn", "geosite-cn" ], - // deprecated - "rule_set_ipcidr_match_source": false, "rule_set_ip_cidr_match_source": false, "rule_set_ip_cidr_accept_empty": false, "invert": false, @@ -156,7 +147,20 @@ icon: material/alert-decagram "direct" ], "action": "route", - "server": "local" + "server": "local", + + // Deprecated + + "rule_set_ipcidr_match_source": false, + "geosite": [ + "cn" + ], + "source_geoip": [ + "private" + ], + "geoip": [ + "cn" + ] }, { "type": "logical", @@ -451,7 +455,9 @@ Only takes effect for address requests (A/AAAA/HTTPS). When the query results do #### geoip -!!! question "Since sing-box 1.9.0" +!!! failure "Removed in sing-box 1.12.0" + + GeoIP is deprecated in sing-box 1.8.0 and removed in sing-box 1.12.0, check [Migration](/migration/#migrate-geoip-to-rule-sets). Match GeoIP with query response. @@ -473,6 +479,12 @@ Match private IP with query response. Make `ip_cidr` rules in rule-sets accept empty query response. +#### ip_accept_any + +!!! question "Since sing-box 1.12.0" + +Match any IP with query response. + ### Logical Fields #### type diff --git a/docs/configuration/dns/rule.zh.md b/docs/configuration/dns/rule.zh.md index 94ca4535..8973eba2 100644 --- a/docs/configuration/dns/rule.zh.md +++ b/docs/configuration/dns/rule.zh.md @@ -4,6 +4,7 @@ icon: material/alert-decagram !!! quote "sing-box 1.12.0 中的更改" + :material-plus: [ip_accept_any](#ip_accept_any) :material-delete-clock: [outbound](#outbound) !!! quote "sing-box 1.11.0 中的更改" @@ -77,15 +78,6 @@ icon: material/alert-decagram "domain_regex": [ "^stun\\..+" ], - "geosite": [ - "cn" - ], - "source_geoip": [ - "private" - ], - "geoip": [ - "cn" - ], "source_ip_cidr": [ "10.0.0.0/24", "192.168.0.1" @@ -96,6 +88,7 @@ icon: material/alert-decagram "192.168.0.1" ], "ip_is_private": false, + "ip_accept_any": false, "source_port": [ 12345 ], @@ -147,8 +140,6 @@ icon: material/alert-decagram "geoip-cn", "geosite-cn" ], - // 已弃用 - "rule_set_ipcidr_match_source": false, "rule_set_ip_cidr_match_source": false, "rule_set_ip_cidr_accept_empty": false, "invert": false, @@ -156,7 +147,19 @@ icon: material/alert-decagram "direct" ], "action": "route", - "server": "local" + "server": "local", + + // 已弃用 + "rule_set_ipcidr_match_source": false, + "geosite": [ + "cn" + ], + "source_geoip": [ + "private" + ], + "geoip": [ + "cn" + ] }, { "type": "logical", @@ -232,17 +235,17 @@ DNS 查询类型。值可以为整数或者类型名称字符串。 #### geosite -!!! failure "已在 sing-box 1.8.0 废弃" +!!! failure "已在 sing-box 1.12.0 中被移除" - Geosite 已废弃且可能在不久的将来移除,参阅 [迁移指南](/zh/migration/#geosite)。 + GeoSite 已在 sing-box 1.8.0 废弃且在 sing-box 1.12.0 中被移除,参阅 [迁移指南](/zh/migration/#geosite)。 匹配 Geosite。 #### source_geoip -!!! failure "已在 sing-box 1.8.0 废弃" +!!! failure "已在 sing-box 1.12.0 中被移除" - GeoIP 已废弃且可能在不久的将来移除,参阅 [迁移指南](/zh/migration/#geoip)。 + GeoIP 已在 sing-box 1.8.0 废弃且在 sing-box 1.12.0 中被移除,参阅 [迁移指南](/zh/migration/#geoip)。 匹配源 GeoIP。 @@ -451,7 +454,10 @@ Available values: `wifi`, `cellular`, `ethernet` and `other`. #### geoip -!!! question "自 sing-box 1.9.0 起" +!!! failure "已在 sing-box 1.12.0 中被移除" + + GeoIP 已在 sing-box 1.8.0 废弃且在 sing-box 1.12.0 中被移除,参阅 [迁移指南](/zh/migration/#geoip)。 + 与查询响应匹配 GeoIP。 @@ -467,6 +473,12 @@ Available values: `wifi`, `cellular`, `ethernet` and `other`. 与查询响应匹配非公开 IP。 +#### ip_accept_any + +!!! question "自 sing-box 1.12.0 起" + +匹配任意 IP。 + #### rule_set_ip_cidr_accept_empty !!! question "自 sing-box 1.10.0 起" diff --git a/docs/configuration/dns/rule_action.zh.md b/docs/configuration/dns/rule_action.zh.md index 7aa3da6d..c2921ace 100644 --- a/docs/configuration/dns/rule_action.zh.md +++ b/docs/configuration/dns/rule_action.zh.md @@ -13,8 +13,7 @@ icon: material/new-box ```json { - "action": "route", - // 默认 + "action": "route", // 默认 "server": "", "strategy": "", "disable_cache": false,