Skip to content

Latest commit

 

History

History
99 lines (71 loc) · 3.66 KB

README.md

File metadata and controls

99 lines (71 loc) · 3.66 KB

Proxy Rules

Proxy rule lists for Surge (iOS/macOS) and Clash Verge Rev (Windows). Both clients share the same .list rule files under surge/.

Surge License

English · 中文

Rule Categories

File Description
blocked.list Domains requiring proxy access (social media, AI services, etc.)
unblock.list Domestic domains routed directly
openai.list OpenAI / ChatGPT domains
claude.list Anthropic Claude domains
google.list Google services
netflix.list Netflix streaming
telegram.list Telegram messaging

Quick Start

1. Clone

git clone https://github.com/turinglambdaai/proxy-rules.git
cd proxy-rules

2. Surge (iOS / macOS)

Reference the rule sets in your [Rule] section:

[Rule]
RULE-SET,https://raw.githubusercontent.com/turinglambdaai/proxy-rules/master/surge/unblock.list,DIRECT
RULE-SET,https://raw.githubusercontent.com/turinglambdaai/proxy-rules/master/surge/openai.list,OpenAI
RULE-SET,https://raw.githubusercontent.com/turinglambdaai/proxy-rules/master/surge/claude.list,Claude
RULE-SET,https://raw.githubusercontent.com/turinglambdaai/proxy-rules/master/surge/google.list,Google
RULE-SET,https://raw.githubusercontent.com/turinglambdaai/proxy-rules/master/surge/netflix.list,Netflix
RULE-SET,https://raw.githubusercontent.com/turinglambdaai/proxy-rules/master/surge/telegram.list,Telegram
RULE-SET,https://raw.githubusercontent.com/turinglambdaai/proxy-rules/master/surge/blocked.list,Proxy
GEOIP,CN,DIRECT
FINAL,Proxy

The OpenAI / Claude / Google / Netflix / Telegram policy names match the proxy groups generated by scripts/sub.rkt; adjust them to your own group names if you roll a config manually.

3. Clash Verge Rev (Windows)

Paste the contents of scripts/clash-verge.js into Subscription > Global Extend Script. It automatically groups proxy nodes by region and configures rule-providers pointing to this repository's surge/*.list files.

Subscription Conversion

Generate a full Surge configuration from a subscription URL using scripts/sub.rkt (Racket):

  1. Create scripts/.env with your subscription URL:

    SURGE_SUB_URL=https://your-subscription-url
    
  2. Create scripts/surge-template.conf with your static Surge sections (General, Rule, Host, Rewrite, MITM, etc.), using {{PROXY_SECTION}} as a placeholder for proxy nodes.

  3. Run the converter:

    racket scripts/sub.rkt

    This outputs a complete Surge config to surge/surge.conf.

Project Structure

proxy-rules/
├── surge/               # Rule files (manually maintained)
│   ├── blocked.list     # Proxy-required domains
│   ├── unblock.list     # Direct-connect domestic domains
│   ├── openai.list      # OpenAI / ChatGPT
│   ├── claude.list      # Anthropic Claude
│   ├── google.list      # Google services
│   ├── netflix.list     # Netflix
│   └── telegram.list    # Telegram
└── scripts/
    ├── clash-verge.js   # Clash Verge Rev global extend script
    └── sub.rkt          # Subscription-to-Surge config converter (Racket)

Maintenance

Edit the .list files under surge/ directly. After committing, Surge and Clash Verge will pull the updated rules on their next refresh cycle.

Requirements

  • Surge or Clash Verge Rev as the proxy client
  • Racket (optional, only needed for subscription conversion with sub.rkt)

License

Licensed under the MIT License.