mirror of
https://github.com/SagerNet/sing-box.git
synced 2026-04-14 12:48:28 +10:00
Fix evaluate response-match validation
This commit is contained in:
@@ -82,8 +82,9 @@ to match against using [`match_response`](/configuration/dns/rule/#match_respons
|
||||
Unlike `route`, it does **not** terminate rule evaluation.
|
||||
|
||||
Only allowed on top-level DNS rules (not inside logical sub-rules).
|
||||
The rule itself must not use `match_response` or contain sub-rules with Response Match Fields,
|
||||
since `evaluate` populates the response for subsequent rules to consume.
|
||||
Rules that use [`match_response`](/configuration/dns/rule/#match_response) or Response Match Fields
|
||||
require a preceding top-level rule with `evaluate` action. A rule's own `evaluate` action
|
||||
does not satisfy this requirement, because matching happens before the action runs.
|
||||
|
||||
#### server
|
||||
|
||||
|
||||
@@ -80,8 +80,9 @@ icon: material/new-box
|
||||
`evaluate` 向指定服务器发送 DNS 查询并保存响应,供后续规则通过 [`match_response`](/zh/configuration/dns/rule/#match_response) 和响应字段进行匹配。与 `route` 不同,它**不会**终止规则评估。
|
||||
|
||||
仅允许在顶层 DNS 规则中使用(不可在逻辑子规则内部使用)。
|
||||
该规则本身不可使用 `match_response` 或包含带有响应匹配字段的子规则,
|
||||
因为 `evaluate` 是为后续规则填充响应数据。
|
||||
使用 [`match_response`](/zh/configuration/dns/rule/#match_response) 或响应匹配字段的规则,
|
||||
需要位于更早的顶层 `evaluate` 规则之后。规则自身的 `evaluate` 动作不能满足这个条件,
|
||||
因为匹配发生在动作执行之前。
|
||||
|
||||
#### server
|
||||
|
||||
|
||||
Reference in New Issue
Block a user