Clash / Mihomo guide
For clients running the Mihomo core. Older Clash cores don't support MRS; use YAML there.
Choose a format
Pick a format and profile in the subscription builder and copy the link. Any one of the three works:
| Builder format | behavior | format | Guide |
|---|---|---|---|
| Clash / Mihomo YAML | domain | yaml | Domain YAML |
| Clash / Mihomo MRS | domain | mrs | MRS |
| Clash / Mihomo Classical | classical | yaml | Classical YAML |
- Classical adds a few
DOMAIN-KEYWORDrules and has the widest coverage. Pick it if unsure. - MRS is the smallest and loads fastest, but only the Mihomo core can read it.
These are rule providers, not proxy subscriptions, so don't import them as subscriptions. The examples use the full-profile link; swap in the one you copied and keep behavior / format matched to the format.
Domain YAML
rule-providers:
awa_ads:
type: http
behavior: domain
format: yaml
path: ./rule_providers/AWAvenue-Ads-Rule-Clash.yaml
url: "https://raw.githubusercontent.com/TG-Twilight/AWAvenue-Ads-Rule/main/Filters/AWAvenue-Ads-Rule-Clash.yaml"
interval: 86400
rules:
- RULE-SET,awa_ads,REJECTMRS binary rule set
MRS is a binary file; it looks like gibberish in a browser, which is normal.
rule-providers:
awa_ads:
type: http
behavior: domain
format: mrs
path: ./rule_providers/AWAvenue-Ads-Rule-Clash.mrs
url: "https://raw.githubusercontent.com/TG-Twilight/AWAvenue-Ads-Rule/main/Filters/AWAvenue-Ads-Rule-Clash.mrs"
interval: 86400
rules:
- RULE-SET,awa_ads,REJECTClassical YAML
rule-providers:
awa_ads:
type: http
behavior: classical
format: yaml
path: ./rule_providers/AWAvenue-Ads-Rule-Clash-Classical.yaml
url: "https://raw.githubusercontent.com/TG-Twilight/AWAvenue-Ads-Rule/main/Filters/AWAvenue-Ads-Rule-Clash-Classical.yaml"
interval: 86400
rules:
- RULE-SET,awa_ads,REJECTMerge into your config
- Back up your working config.
- Add the snippet through your client's override, merge, or extension feature. Editing the downloaded subscription file directly gets overwritten on the next update.
- Merge
awa_adsinto the existingrule-providersandRULE-SET,awa_ads,REJECTinto the existingrules, aboveMATCHand any broadDIRECTrules. Don't add a secondrules:key; it would replace your existing rules. - Use Rule mode, save, and reload.
With a command-line core you can test the merged config first:
mihomo -t -d ./mihomo-check -f ./merged.yamlCheck that it works
Find awa_ads in the client's or dashboard's rule provider list; a non-zero entry count means the download worked. Connection logs then show requests matched by awa_ads and rejected.
If nothing matches, check that you're in Rule mode, that the snippet was actually merged, and that the RULE-SET line isn't below a rule that matches first.
Update and undo
interval: 86400 updates once a day; you can also update awa_ads manually in the dashboard. Updating your proxy subscription doesn't update rule providers.
For a false positive, find the domain in the connection log and add an allow rule above the RULE-SET line, e.g. DOMAIN,needed.example,DIRECT. To disable entirely, remove the RULE-SET,awa_ads,REJECT line and reload.
References: rule-providers, rules and matching order.