Parsers basics: rewriting a profile as it downloads
Parsers (Settings → Parsers) and Mixin both modify configs, but at different moments: a Parser runs once at subscription download/update time and writes the result into the local profile; Mixin overlays dynamically on every load.
Basic syntax
Parsers are YAML describing "for which subscription, do what":
parsers:
- url: https://your-provider.com/subscribe?token=xxx
yaml:
prepend-rules:
- DOMAIN-SUFFIX,work-internal.com,DIRECT
append-proxies:
- name: my-backup
type: ss
server: 1.2.3.4
port: 8388
cipher: aes-256-gcm
password: your-password
url targets one subscription exactly; prepend-rules/append-rules insert before/after the rule list; prepend-proxies/append-proxies do the same for nodes — solving YAML-Mixin's replace-only pain, and scoped to a single subscription.
Parser vs Mixin: who does what
- Changes tied to one subscription (adding your own node to provider A) → Parser;
- Changes that must be global (one DNS config for every profile) → Mixin;
- When both exist: the Parser writes to the file first, then Mixin overlays at load.