key-start
Insert an array item at the beginning of the original list.
插入列表开头.yaml
key-start 结果 diff.yaml
key-start 无效类型.yaml
mixed-port is a scalar and dns is an object, so list insertion will not occur.
key-end
Appends array items to the end of the original list. For rules, the terminal MATCH section in the original configuration will remain after the new content; the internal order of the new content remains unchanged.
追加列表末尾.yaml
key-end 结果 diff.yaml
key-end 无效类型.yaml
mode is a scalar, mode-end does not turn it into a list, nor does it override mode.
key-merge
key-merge has different results for different field types:
List append
key-merge 列表.yaml
key-merge 列表结果 diff.yaml
Map merge
key-merge 映射.yaml
key-merge 映射结果 diff.yaml
key-merge 标量.yaml
mixed-port is a scalar, key-merge will be ignored and the port will not be turned into an object.
key-force
key-force directly replaces the entire field and skips field type processing. It is suitable for clearing the original list, replacing the entire object, or overwriting unknown structures.
key-force 列表.yaml
key-force 结果 diff.yaml
force takes precedence:
force 优先.yaml
MATCH,PROXY is left, and rules-start will not continue to execute.
Abbreviation
These two writing methods are shorthand for list operations:列表简写.yaml
列表简写结果 diff.yaml
简写用于标量.yaml
+mode and mode+ will only be recognized as list operations, the scalar mode will not be modified.
null list item
The value of the list modifier can be a single value, an array, or null:
null 列表项.yaml
DOMAIN-SUFFIX,example.com,DIRECT will eventually be inserted.
Sequence of multiple operations
Multiple operations can be used simultaneously on the same YAML file. The order of the list fields is:多个列表操作.yaml
多个列表操作结果 diff.yaml
key-force also exists for the same base key, all the above operations will be skipped.
MATCH Rules
Only strings in the original list whose first comma-separated segment is MATCH (case-insensitive) will be recognized as terminal rules. Objects, numbers, and other rules will not trigger movement; rules added by overwriting files will not be scanned again.
终端规则判断.yaml
