A Clash/mihomo YAML is hostile input run as root, so mihomo never reads the profile's file: the driver reduces it line by line (awk, no YAML parser) to the top-level keys the spec allows, keeps a dropped block only for the anchors it defines (inert, under a name mihomo does not read), takes interface-name and routing-mark out of every proxy and group, appends the mark, allow-lan, bind-address, tun, dns and the loopback controller last, guards the written file and lets mihomo -t and run only that file.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn