Clash / mihomo
Want a complete routing config instead (import into Clash Verge and go, with your own subscriptions on top)? See Clash Verge full config.
Add two sections to your own config. Full example: Clash/example-config.yaml.
Clash/*.yaml are behavior: classical rule-provider files (a payload: list), meant to be merged into your existing config.
One node for both
yaml
rule-providers:
ai-proxy:
type: http
behavior: classical
format: yaml
interval: 86400
url: "https://raw.githubusercontent.com/ma-wenqian/ai-proxy-rules/main/Clash/ai-proxy.yaml"
path: ./ruleset/ai-proxy.yaml
rules:
- RULE-SET,ai-proxy,AI # AI = your own proxy group nameSeparate nodes
yaml
rule-providers:
openai:
type: http
behavior: classical
format: yaml
interval: 86400
url: "https://raw.githubusercontent.com/ma-wenqian/ai-proxy-rules/main/Clash/openai.yaml"
path: ./ruleset/openai.yaml
claude:
type: http
behavior: classical
format: yaml
interval: 86400
url: "https://raw.githubusercontent.com/ma-wenqian/ai-proxy-rules/main/Clash/claude.yaml"
path: ./ruleset/claude.yaml
rules:
- RULE-SET,openai,OpenAI
- RULE-SET,claude,ClaudeApple Intelligence
Always its own provider; point it at a US node group.
yaml
rule-providers:
apple-intelligence:
type: http
behavior: classical
format: yaml
interval: 86400
url: "https://raw.githubusercontent.com/ma-wenqian/ai-proxy-rules/main/Clash/apple-intelligence.yaml"
path: ./ruleset/apple-intelligence.yaml
rules:
- RULE-SET,apple-intelligence,AppleIntelligence # before any apple / icloud ruleThree things to watch
RULE-SETmust come before catch-alls likeGEOIP,CN,DIRECTorMATCH, otherwise it will never be reached. Apple Intelligence also has to sit above anyapple/iclouddirect rules, which overlap with its domains.- The policy name (
AI/OpenAI/Claudeabove) has to match a group that actually exists in yourproxy-groups, or the config will fail to load. format: yamlis a mihomo field; drop that line on older Clash Premium.