Skip to content

ClashConnectRules/Surge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

6 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Surge Configuration

Surge License

Advanced Surge Proxy Configuration
ๆ™บ่ƒฝๅˆ†ๆตใ€ๅนฟๅ‘Šๆ‹ฆๆˆชใ€ๆตๅช’ไฝ“่งฃ้”

Basic โ€ข DNS โ€ข Groups โ€ข Rules โ€ข Install

๐ŸŒ Language / ่ฏญ่จ€ๅˆ‡ๆข
๐Ÿ‡จ๐Ÿ‡ณ ็ฎ€ไฝ“ไธญๆ–‡ | ๐Ÿ‡บ๐Ÿ‡ธ English


๐Ÿ“ฅ Download

File Link
Surge.conf Download

โš™๏ธ Basic Settings

Setting Value Description
HTTP Port 6152 Wi-Fi sharing port
SOCKS5 Port 6153 Wi-Fi sharing port
Controller 6160 API control port
Dashboard 6166 Web dashboard port
IPv6 false Disabled by default

๐ŸŒ DNS Configuration

Type Server Provider
System 223.5.5.5, 223.6.6.6, 119.29.29.29 China DNS
DoH https://doh.pub/dns-query DNSPod
DoH https://dns.alidns.com/dns-query Alibaba
Hijack 8.8.8.8:53, 8.8.4.4:53 Google DNS

๐ŸŽฏ Proxy Groups

๐Ÿš€ Core Groups

Group Type Description
Mainland select China Direct
NoAuto select Main entry point
Automatic select Regional selection
AllServer select All subscription nodes
Proxy select Proxy policy

๐ŸŒ Regional Groups (Auto URL-Test)

Group Filter Interval Tolerance
Hong Kong ๐Ÿ‡ญ๐Ÿ‡ฐ ๆธฏ|๐Ÿ‡ญ๐Ÿ‡ฐ|้ฆ™ๆธฏ|HK|Hong 300s 50ms
Taiwan ๐Ÿ‡น๐Ÿ‡ผ ๅฐ|๐Ÿ‡น๐Ÿ‡ผ|ๅฐๆนพ|TW|Tai 300s 50ms
Japan ๐Ÿ‡ฏ๐Ÿ‡ต ๆ—ฅ|๐Ÿ‡ฏ๐Ÿ‡ต|ๆ—ฅๆœฌ|JP|Japan 300s 50ms
Singapore ๐Ÿ‡ธ๐Ÿ‡ฌ ๅก|๐Ÿ‡ธ๐Ÿ‡ฌ|ๆ–ฐๅŠ ๅก|็‹ฎๅŸŽ|SG 300s 50ms
United States ๐Ÿ‡บ๐Ÿ‡ธ ็พŽ|๐Ÿ‡บ๐Ÿ‡ธ|็พŽๅ›ฝ|US|States 300s 50ms
United Kingdom ๐Ÿ‡ฌ๐Ÿ‡ง ๐Ÿ‡ฌ๐Ÿ‡ง|่‹ฑๅ›ฝ|่‹ฑ|UK 300s 50ms
Korea ๐Ÿ‡ฐ๐Ÿ‡ท ้Ÿฉ|้Ÿฉๅ›ฝ|Korea|KR|๐Ÿ‡ฐ๐Ÿ‡ท 300s 50ms
Other Exclude above 300s 50ms

๐Ÿ“ฆ Service Groups

Group Default Purpose
AI Automatic ChatGPT, Claude, Bing AI
Apple Mainland โ†’ HK โ†’ US Apple services
Microsoft Mainland โ†’ HK โ†’ SG โ†’ US Microsoft services
OneDrive Mainland โ†’ HK โ†’ SG โ†’ US Cloud storage
Telegram Automatic โ†’ SG โ†’ US โ†’ HK Messaging
X Automatic โ†’ HK โ†’ TW โ†’ SG โ†’ JP โ†’ US Twitter/X
WeChat Mainland โ†’ HK โ†’ SG โ†’ US WeChat
Netflix HK โ†’ TW โ†’ SG โ†’ JP โ†’ US Netflix streaming
Disney+ HK โ†’ SG Disney+ streaming
YouTube Automatic โ†’ HK โ†’ TW โ†’ SG โ†’ JP โ†’ US YouTube streaming
TikTok TW โ†’ SG โ†’ JP โ†’ US TikTok unlock
Bilibili Mainland โ†’ HK โ†’ TW Bilibili (HK/TW unlock)
Speedtest Mainland โ†’ Auto โ†’ AllServer Speed test

๐Ÿ“‹ Rule Priority

 1. ๐Ÿ”ง Unbreak Rules    Fix broken connections โ†’ DIRECT
 2. ๐Ÿšซ Ad Blocking      SKK Ruleset โ†’ REJECT
 3. ๐Ÿ”’ Privacy          Block trackers
 4. ๐Ÿ“ฑ CN Apps          WeChat, NetEase, Bilibili, Weibo
 5. ๐ŸŽ Apple Services   App Store, Apple News, Apple TV
 6. ๐Ÿค– AI Services      OpenAI, Claude, Gemini, Bing
 7. ๐ŸŽฌ Streaming        Disney+, Netflix, TikTok, YouTube
 8. ๐ŸŒ Regional Unlock  US, EU, JP, KR, HK, TW streams
 9. ๐Ÿ’ฌ Social Media     Twitter, Telegram, Facebook, Instagram
10. ๐Ÿ”ง Other Global     OneDrive, Microsoft, GitHub, Speedtest
11. ๐Ÿ‡จ๐Ÿ‡ณ CN Rules        SKK + ChinaMax ruleset
12. ๐ŸŒ Global Rules     CDN, Global ruleset
13. ๐Ÿ  LAN              Local network โ†’ DIRECT
14. ๐ŸŽฏ Final Rule       FINAL โ†’ NoAuto

๐Ÿ”Œ Supported Protocols

Standard Community
HTTP / HTTPS Snell
SOCKS5 / SOCKS5-TLS Shadowsocks
SSH VMess
WireGuard Trojan
TUIC
Hysteria 2
AnyTLS

โœจ Special Features

๐Ÿ”„ URL Rewrite

Original Target Type
google.cn google.com 302
maps.google.cn maps.google.com 302
taobao.com HTTPS 302
jd.com HTTPS 302
mi.com HTTPS 302

๐Ÿ  Host Mapping

Service DNS Server Description
Taobao/Tmall/Alipay 223.5.5.5 Alibaba services
JD/QQ/WeChat 119.28.28.28 Tencent services
Bilibili/NetEase 119.29.29.29 Entertainment
Xiaomi 119.29.29.29 Xiaomi services
Router Admin System DNS Local devices

๐Ÿš€ Installation

Method 1: Manual Import

1. Download Surge.conf
2. Surge โ†’ Settings โ†’ Configuration
3. "Download from URL"
4. Paste URL โ†’ Confirm

Method 2: Replace File

1. Download Surge.conf
2. Replace in iCloud Surge folder
3. Restart Surge

Configure Subscription

AllServer = select, ..., policy-path=https://your-subscription-url

โš™๏ธ Configuration

Add Proxy Servers

Edit [Proxy] section:

# Shadowsocks
MySS = ss, 1.2.3.4, 8388, encrypt-method=aes-256-gcm, password=xxx

# VMess
MyVMess = vmess, 1.2.3.4, 443, username=uuid, ws=true, ws-path=/path

# Trojan
MyTrojan = trojan, example.com, 443, password=xxx

Enable MITM

1. Install Surge CA certificate
2. Trust in system settings
3. Settings โ†’ MITM โ†’ Enable

๐Ÿ“š Rule Sources

Source Description
blackmatrix7 Cross-platform rules
Skk.moe SKK ruleset
VirgilClyne ASN rules
Semporia TikTok unlock
zxfccmm4 Unbreak rules

โš ๏ธ Notes

Item Description
๐Ÿ”— Subscription Replace with your own subscription URL
๐Ÿ”„ Rule Update Rules auto-update from online sources
โฑ๏ธ Speed Test 300s interval, 3s timeout, 50ms tolerance
๐Ÿ” MITM Cert Required for URL rewrite
๐Ÿ” Node Filter Auto-filter nodes with "traffic/reset/expire" keywords

๐ŸŽ›๏ธ Remote Control

Service Address
External Controller surge@0.0.0.0:6160
HTTP API clashconnectrules@0.0.0.0:6166
Web Dashboard Enabled

๐Ÿ”ง Troubleshooting

Issue Solution
Cannot connect Check proxy config, verify server
Streaming blocked Use streaming-capable nodes
MITM fails Install/trust CA certificate
Rules not working Check rule order, view logs


๐ŸŽจ Custom Icons

Surge proxy groups support custom icons via the icon-url parameter. Follow this guide to personalize your icons.

Icon Format

In the [Proxy Group] section, each group can specify an icon-url:

Telegram = select, Automatic, Singapore, "United States", icon-url=https://example.com/icon.png

Icons should be PNG format, recommended size 120ร—120 px.

Recommended Icon Packs

These community icon packs cover popular apps, streaming services, flags, and more:

Qure Icon Pack

Icon Pack Link
Qure (ColorยทAll) QureColor-All.json
Qure (LightยทAll) QureLight-All.json
Qure (MiniยทAll) Quremini.json

Orz-3 Icon Pack

Icon Pack Link
Orz-3 (Color A) miniColor.json
Orz-3 (Color B) mini+.json
Orz-3 (Color C) mini.json
Orz-3 (Color D) face.json

Other Icon Packs

Icon Pack Link
tugepaopao (Color) Cute.json
shindgewongxj (Color) iconset.json
Semporia (Color Hand-drawn) Semporia.json
Colorful Static Flags ColorfulStaticFlag.json
TheMagic Icons TheRaw.json

ginibond Icon Series

Icon Pack Link
Airport Icons airport
QQ Classic QQ_Classic
Cute Cartoon Cute_Cartoon
Contact contact
Character character
RageBaby RageBaby

How to Add Icons

Step 1: Find an icon pack

Browse the icon pack's GitHub repository to find the PNG file you want.

Step 2: Get the icon direct link

The direct link format is:

https://raw.githubusercontent.com/<username>/<repo>/<branch>/<path>/<icon-name>.png

Tip: If you get links from Loon icon import URLs, the format is:

https://www.nsloon.com/openloon/import?iconset=https://raw.githubusercontent.com/...

Remove the https://www.nsloon.com/openloon/import?iconset= prefix and keep only the https://raw.githubusercontent.com/... part.

Step 3: Edit the config

Open Surge.conf, find the target proxy group, and replace or add the icon-url parameter:

# Before
YouTube = select, Automatic, ..., icon-url=https://old-icon.png

# After
YouTube = select, Automatic, ..., icon-url=https://raw.githubusercontent.com/xxx/YouTube.png

Step 4: Reload config

Reload the configuration file in Surge for the new icons to take effect.


๐Ÿ“„ Credits


๐Ÿ“„ License

MIT


Made with โค๏ธ for better internet experience

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors