mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-10-28 17:22:15 +08:00
merge_default_config overwrites the profile's mode with the verge-owned clash config, whose mode is always present (template seeds rule and patch semantics never clear it) and restricted to rule/global/direct; change_clash_mode is rejected by the core before persisting anything else. mode:script can therefore only arrive through a hand-crafted patch_clash call, and for that path an explicit invalid-mode validation error is more honest than silently rewriting to rule. mihomo rejects mode:script outright (invalid mode), and user merge/script chains run after the builtins, so the guard never covered them anyway.