mihomo Configuration Basics: the YAML Structure Explained
A provider subscription is ultimately just a YAML file. Learn its structure and you graduate from “can import a link” to “can shape my own routing”.
Five core sections
- Basics: mixed-port, allow-lan for LAN sharing, mode for the default mode
- dns: resolution strategy; fake-ip speeds up lookups
- proxies: the node list — protocol, address, credentials per node
- proxy-groups: policy groups that organize nodes into auto-select, manual pick, etc.
- rules: routing rules matched top-down; first hit wins
What a rule looks like
DOMAIN-SUFFIX,youtube.com,PROXY sends youtube.com and subdomains through the group named PROXY; GEOIP,CN,DIRECT sends all Chinese IPs direct. Order matters — earlier rules win.
Editing advice
In Clash Verge Rev, use the global extend config to layer your changes on top of the subscription so updates never overwrite them, and run the built-in config check after editing.
Ready to get started?
Download Clash Verge Rev, FlClash or the mihomo core and be up in minutes.