How klierbyck/clash-verge-rev-rules works
This repository provides Clash Verge Rev/Mihomo global-extension scripts for traffic routing. The user installs either the HTTP-rule or local-rule variant, after which main validates a subscribed proxy config and adds rule providers, ordered routing rules, and proxy groups. Traffic matches AI, GitHub, Telegram, media, or global rule sets, falls back to the domestic group, and can use regional auto-selection or an optional chained residential proxy. The scripts were sampled; the rule-set YAML contents were not, so their internal matching details are omitted.
Main entry points: script_http.js Service groups · script_local.js Local script · ai.yaml AI rules · github.yaml GitHub rules
Components 17
Client Setup
- Clash Verge Rev
- HTTP script
script_http.js - Local script
script_local.js
Rule Routing
- Config transform
script_http.js - Routing rules
script_http.js - Service groups
script_http.js
Proxy Selection
- Regional auto groups
script_http.js - Residential chain
script_http.js - Subscribed proxies
Rule Sources
- AI rules
ruleset/ai.yaml - GitHub rules
ruleset/github.yaml - Telegram rules
ruleset/telegram.yaml - Media rules
ruleset/media.yaml - Global rules
ruleset/global.yaml - Remote rule files
Other components
- Clash user
- Target traffic
Connections 26
- Clash user → Clash Verge Rev: configures
- Clash user → HTTP script: installs
- Clash user → Local script: installs
- Clash Verge Rev → Config transform: runs script
- HTTP script → Config transform: defines entry
- Local script → Config transform: defines variant
- Config transform → Routing rules: sets rules
- Config transform → Service groups: sets groups
- Config transform → Subscribed proxies: adds residential node
- Routing rules → AI rules: matches set
- Routing rules → GitHub rules: matches set
- Routing rules → Telegram rules: matches set
- Routing rules → Media rules: matches set
- Routing rules → Global rules: matches set
- Routing rules → Remote rule files: fetches sets
- AI rules → Service groups: routes to AI
- GitHub rules → Service groups: routes to GitHub
- Telegram rules → Service groups: routes to Telegram
- Media rules → Service groups: routes to media
- Global rules → Service groups: routes abroad
- Service groups → Regional auto groups: offers exits
- Service groups → Residential chain: offers chain
- Regional auto groups → Subscribed proxies: selects by region
- Residential chain → Regional auto groups: dials through
- Service groups → Target traffic: routes traffic
- Residential chain → Target traffic: forwards traffic