diff --git a/docs/configuration/dns/rule.md b/docs/configuration/dns/rule.md index 4ceecf927..19006be07 100644 --- a/docs/configuration/dns/rule.md +++ b/docs/configuration/dns/rule.md @@ -544,6 +544,15 @@ See [DNS Rule Actions](../rule_action/) for details. Moved to [DNS Rule Action](../rule_action#route). +### Legacy DNS Mode + +`legacyDNSMode` is an internal compatibility mode that is automatically detected from your DNS rule +configuration. It is disabled when any rule uses features introduced in sing-box 1.14.0 such as +`evaluate`, `match_response`, response fields (`response_rcode`, `response_answer`, etc.), +`query_type`, or `ip_version`. When disabled, `ip_cidr` and `ip_is_private` require `match_response` +to be set, and deprecated fields like `strategy`, `ip_accept_any`, and `rule_set_ip_cidr_accept_empty` +are no longer accepted. + ### Address Filter Fields Only takes effect for address requests (A/AAAA/HTTPS). When the query results do not match the address filtering rule items, the current rule will be skipped. diff --git a/docs/configuration/dns/rule.zh.md b/docs/configuration/dns/rule.zh.md index b47e59958..d35474cf0 100644 --- a/docs/configuration/dns/rule.zh.md +++ b/docs/configuration/dns/rule.zh.md @@ -542,6 +542,14 @@ Available values: `wifi`, `cellular`, `ethernet` and `other`. 已移动到 [DNS 规则动作](../rule_action#route). +### Legacy DNS Mode + +`legacyDNSMode` 是一种内部兼容模式,会根据 DNS 规则配置自动检测。 +当任何规则使用了 sing-box 1.14.0 引入的特性(如 `evaluate`、`match_response`、 +响应字段(`response_rcode`、`response_answer` 等)、`query_type` 或 `ip_version`)时, +该模式将被自动禁用。禁用后,`ip_cidr` 和 `ip_is_private` 需要设置 `match_response`, +且已废弃的字段(如 `strategy`、`ip_accept_any`、`rule_set_ip_cidr_accept_empty`)将不再被接受。 + ### 地址筛选字段 仅对地址请求 (A/AAAA/HTTPS) 生效。 当查询结果与地址筛选规则项不匹配时,将跳过当前规则。 @@ -579,17 +587,6 @@ Available values: `wifi`, `cellular`, `ethernet` and `other`. 当 `legacyDNSMode` 未启用时,`match_response` 必须设为 `true`。 -#### ip_accept_any - -!!! question "自 sing-box 1.12.0 起" - -!!! failure "已在 sing-box 1.14.0 废弃" - - `ip_accept_any` 已废弃且将在 sing-box 1.16.0 中被移除。 - 仅在 `legacyDNSMode` 中可用。请使用 `match_response` 和响应项替代。 - -匹配任意 IP。 - #### rule_set_ip_cidr_accept_empty !!! question "自 sing-box 1.10.0 起" @@ -601,6 +598,17 @@ Available values: `wifi`, `cellular`, `ethernet` and `other`. 使规则集中的 `ip_cidr` 规则接受空查询响应。 +#### ip_accept_any + +!!! question "自 sing-box 1.12.0 起" + +!!! failure "已在 sing-box 1.14.0 废弃" + + `ip_accept_any` 已废弃且将在 sing-box 1.16.0 中被移除。 + 仅在 `legacyDNSMode` 中可用。请使用 `match_response` 和响应项替代。 + +匹配任意 IP。 + ### 响应字段 !!! question "自 sing-box 1.14.0 起" diff --git a/docs/configuration/dns/rule_action.md b/docs/configuration/dns/rule_action.md index 7cc6aba6d..2a7517528 100644 --- a/docs/configuration/dns/rule_action.md +++ b/docs/configuration/dns/rule_action.md @@ -39,11 +39,11 @@ Tag of target server. !!! question "Since sing-box 1.12.0" -!!! warning +!!! failure "Deprecated in sing-box 1.14.0" - `strategy` is deprecated and only supported in `legacyDNSMode`. + `strategy` is deprecated in sing-box 1.14.0 and will be removed in sing-box 1.16.0. -Set domain strategy for this query in `legacyDNSMode`. +Set domain strategy for this query. Only supported when `legacyDNSMode` is active. One of `prefer_ipv4` `prefer_ipv6` `ipv4_only` `ipv6_only`. diff --git a/docs/configuration/dns/rule_action.zh.md b/docs/configuration/dns/rule_action.zh.md index ab0c2e1bd..f0fa3bf2a 100644 --- a/docs/configuration/dns/rule_action.zh.md +++ b/docs/configuration/dns/rule_action.zh.md @@ -39,11 +39,11 @@ icon: material/new-box !!! question "自 sing-box 1.12.0 起" -!!! warning +!!! failure "已在 sing-box 1.14.0 废弃" - `strategy` 已废弃,且仅在 `legacyDNSMode` 中可用。 + `strategy` 已在 sing-box 1.14.0 废弃,且将在 sing-box 1.16.0 中被移除。 -在 `legacyDNSMode` 中为此查询设置域名策略。 +为此查询设置域名策略。仅在 `legacyDNSMode` 启用时可用。 可选项:`prefer_ipv4` `prefer_ipv6` `ipv4_only` `ipv6_only`。