ai-proxy-rulesRoute only AI traffic through your proxy.
Domain and IP rules for OpenAI, Claude and Apple Intelligence. Everything else stays direct — no global mode needed just to reach api.anthropic.com.
Domain and IP rules for OpenAI, Claude and Apple Intelligence. Everything else stays direct — no global mode needed just to reach api.anthropic.com.
Web apps, APIs, Claude Code, sandboxes, login and CAPTCHA, Anthropic's own IP blocks, plus Siri / Apple Intelligence and Private Relay.
Rules live in one list; Clash and Shadowrocket files are generated from it and checked in CI.
Rules only. Use your own nodes — pick one, and only AI traffic goes through it.
Pick your client.
Add these lines to your config, above FINAL. Replace PROXY with your own policy group if you want a dedicated node.
RULE-SET,https://raw.githubusercontent.com/ma-wenqian/ai-proxy-rules/main/rules/openai.list,PROXY RULE-SET,https://raw.githubusercontent.com/ma-wenqian/ai-proxy-rules/main/rules/claude.list,PROXY
Apple Intelligence is a separate rule set: point it at a node in a supported region (e.g. US) and place it above any rule that sends apple.com / iCloud direct.
RULE-SET,https://raw.githubusercontent.com/ma-wenqian/ai-proxy-rules/main/rules/apple-intelligence.list,US
One tap on your iPhone or iPad imports the config. It contains no servers: PROXY is whichever server is selected in the app, and everything else goes direct.
Live from rules/*.list — the single source every other file is generated from. What each group is for: What's covered.
Loading rules…
curl, Node and Python ignore it.HTTPS_PROXY=http://127.0.0.1:7890 in your shell (this proxies everything).PROCESS-NAME,node — that pulls every Node process through the proxy. Domain rules are more precise.More in SDK times out?