forked from bunizao/TutuBetterRules
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Surge.conf
231 lines (208 loc) · 15.1 KB
/
Surge.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
[General]
# > tutu的surge配置 欢迎使用
# > 配置下载𝐔𝐑𝐋: https://raw.githubusercontent.com/bunizao/TutuBetterRules/tutu/Surge/Surge.conf
# > 使用教程查看:https://github.com/bunizao/TutuBetterRules/blob/tutu/Surge/README.md
# > 花样字体生成: https://qwerty.dev/fancy-font-generator/
# > 机场转义𝐄𝐍𝐂𝐎𝐃𝐄: https://www.urlencoder.org
# > 更新通知telegram频道:https://t.me/hututu00
# > 𝐔𝐩𝐝𝐚𝐭𝐞: 2022.12.31 13:58
# > 𝐕𝟐.𝟐.𝟏.𝟏
# General
http-listen = 0.0.0.0:8888
socks5-listen = 0.0.0.0:8889
external-controller-access = [email protected]:6170
# Lateracy
internet-test-url = http://wifi.vivo.com.cn/generate_204
proxy-test-url = http://cp.cloudflare.com/generate_204
test-timeout = 3
ipv6 = false
ipv6-vif = auto
show-error-page-for-reject = true
# Advanced
loglevel = notify
exclude-simple-hostnames = true
use-default-policy-if-wifi-not-primary = false
force-http-engine-hosts = %APPEND% boxjs.com, boxjs.net
always-real-ip = *.lan, cable.auth.com, *.msftconnecttest.com, *.msftncsi.com, *.*.*.srv.nintendo.net, *.*.stun.playstation.net, xbox.*.*.microsoft.com, *.*.xboxlive.com, stun.*, localhost.ptlogin2.qq.com, *.logon.battlenet.com.cn, *.logon.battle.net, *.blzstatic.cn, music.163.com, *.music.163.com, *.126.net, musicapi.taihe.com, music.taihe.com, songsearch.kugou.com, trackercdn.kugou.com, *.kuwo.cn, api-jooxtt.sanook.com, api.joox.com, joox.com, y.qq.com, *.y.qq.com, streamoc.music.tc.qq.com, mobileoc.music.tc.qq.com, isure.stream.qqmusic.qq.com, dl.stream.qqmusic.qq.com, aqqmusic.tc.qq.com, amobile.music.tc.qq.com, *.xiami.com, *.music.migu.cn, music.migu.cn, proxy.golang.org, *.mcdn.bilivideo.cn, *.cmpassport.com, id6.me, open.e.189.cn, mdn.open.wo.cn, auth.wosms.cn, *.jegotrip.com.cn, *.icitymobile.mobi, *.pingan.com.cn, *.cmbchina.com, pool.ntp.org, *.pool.ntp.org, ntp.*.com, time.*.com, ntp?.*.com, time?.*.com, time.*.gov, time.*.edu.cn, *.ntp.org.cn, PDC._msDCS.*.*, DC._msDCS.*.*, GC._msDCS.*.*
# DNS
hijack-dns = *:53
dns-server = 119.29.29.29, 223.5.5.5, system
read-etc-hosts = true
doh-skip-cert-verification = false
encrypted-dns-server = https://dns.alidns.com/dns-query
encrypted-dns-follow-outbound-mode = true
# > 跳过代理
skip-proxy = localhost, *.local, passenger.t3go.cn, e.crashlytics.com, captive.apple.com, app.yinxiang.com, injections.adguard.org, local.adguard.org, cable.auth.com, yunbusiness.ccb.com, 10.0.0.0/8, 100.64.0.0/10, 127.0.0.1/32, 169.254.0.0/16, 172.16.0.0/12, 192.168.0.0/16, 224.0.0.0/4, 240.0.0.0/4, ::1/128, fc00::/7, fd00::/8, fe80::/10, ff00::/8, 2001::/32, 2001:db8::/32, 2002::/16, ::ffff:0:0:0:0/1, ::ffff:128:0:0:0/1
# Others
allow-wifi-access = false
hide-vpn-icon = true
allow-hotspot-access = true
# network-framework = true
http-api = [email protected]:2500
http-api-web-dashboard = true
all-hybrid = false
wifi-access-http-port = 1314
[Replica]
# 0 为关闭,1 为开启
# > 隐藏 Apple 请求
hide-apple-request = 0
# > 隐藏崩溃追踪器请求
hide-crash-reporter-request = 1
# > 隐藏 UDP 会话
hide-udp = 0
# > 关键词过滤器
# none(关闭关键词过滤器) / whitelist(blacklist(仅记录包含关键字的请求)) / blacklist(仅记录不包含关键字的请求) / pattern(匹配通配符的请求)
# keyword-filter-type = none
# > 关键词
# keyword-filter = (null)
[Proxy Group]
# > 这是一个final规则 没有命中的连接会走以下的策略组
🏳️⚧️ = select, 🐼 Mainland, 𝐀𝐮𝐭𝐨𝐦𝐚𝐭𝐢𝐜
# > 这是你的机场链接填写的地方 在policy_path=后面粘贴你自己机场的訂閱連結(不要在这里粘贴 谢谢)
ℕ𝕖𝕩𝕚𝕥𝕒𝕝𝕝𝕪 = select, policy-path=https://naixisubs.com/downloadConfig/SurgeConfig.aspx?t=ss&urk=fucku114514
𝔽𝕝𝕠𝕨𝕖𝕣ℂ𝕝𝕠𝕦𝕕 = select, policy-path=sublink
# > 以下是策略组 需先配置好sub-store使用
𝐀𝐥𝐥𝐒𝐞𝐫𝐯𝐞𝐫 = select, policy-path=https://sub.store/download/collection/Surge, update-interval=0, no-alert=0, hidden=0
𝐏𝐫𝐨𝐱𝐲 = select, 𝐀𝐮𝐭𝐨𝐦𝐚𝐭𝐢𝐜, 𝐅𝐚𝐥𝐥𝐛𝐚𝐜𝐤, 🇭🇰Hong Kong, 🇨🇳Taiwan, 🇸🇬Singapore, 🇯🇵Japan, 🇺🇸United States, no-alert=0, hidden=1, include-all-proxies=0
𝐀𝐮𝐭𝐨𝐦𝐚𝐭𝐢𝐜 = url-test, policy-path=https://sub.store/download/collection/Surge, url=http://www.gstatic.com/generate_204, interval=600, tolerance=50
𝐅𝐚𝐥𝐥𝐛𝐚𝐜𝐤 = fallback, policy-path=https://sub.store/download/collection/Surge, url=http://www.gstatic.com/generate_204, interval=600, tolerance=50
🇭🇰Hong Kong = url-test, policy-path=https://sub.store/download/collection/Surge, policy-regex-filter=港|🇭🇰|香港|HK|Hong, interval=600, tolerance=50,update-interval=43200, no-alert=0, hidden=0, include-all-proxies=0
🇨🇳Taiwan = url-test, policy-path=https://sub.store/download/collection/Surge, policy-regex-filter=台|🇨🇳|台湾|TW|Tai, interval=600, tolerance=50,update-interval=43200, no-alert=0, hidden=0, include-all-proxies=0
🇯🇵Japan = url-test, policy-path=https://sub.store/download/collection/Surge, policy-regex-filter=日|🇯🇵|日本|JP|Japan, interval=600, tolerance=50,update-interval=43200, no-alert=0, hidden=0, include-all-proxies=0
🇸🇬Singapore = url-test, policy-path=https://sub.store/download/collection/Surge, policy-regex-filter=坡|🇸🇬|新加坡|狮城|SG|Singapore, interval=600, tolerance=50,update-interval=43200, no-alert=0, hidden=0, include-all-proxies=0
🇺🇸United States = url-test, policy-path=https://sub.store/download/collection/Surge, policy-regex-filter=美|🇺🇸|美国|US|States|American, interval=600, tolerance=50,update-interval=43200, no-alert=0, hidden=0, include-all-proxies=0
🐼 Mainland = select, DIRECT, hidden=1
𝑨𝒑𝒑𝒍𝒆 = select, 🐼 Mainland, 🇭🇰Hong Kong, 🇨🇳Taiwan, 🇸🇬Singapore, 🇯🇵Japan, 🇺🇸United States
📺 𝒃𝒊𝒍𝒊𝒃𝒊𝒍𝒊 = select, 🐼 Mainland, 🇭🇰Hong Kong, 🇨🇳Taiwan
🎥 𝑫𝒊𝒔𝒏𝒆𝒚+ = select, 🇭🇰Hong Kong, 🇸🇬Singapore
🎥 𝑵𝒆𝒕𝒇𝒍𝒊𝒙 = select, 🇭🇰Hong Kong, 🇨🇳Taiwan, 🇸🇬Singapore, 🇯🇵Japan, 🇺🇸United States
🏎 𝑺𝒑𝒆𝒆𝒅𝒕𝒆𝒔𝒕 = select, 🐼 Mainland, 𝐀𝐮𝐭𝐨𝐦𝐚𝐭𝐢𝐜, 𝐀𝐥𝐥𝐒𝐞𝐫𝐯𝐞𝐫
💵 𝑷𝒂𝒚𝑷𝒂𝒍 = select, 🐼 Mainland, 🇭🇰Hong Kong, 🇺🇸United States
✉️ 𝑻𝒆𝒍𝒆𝒈𝒓𝒂𝒎 = select, 𝐀𝐮𝐭𝐨𝐦𝐚𝐭𝐢𝐜, 🇸🇬Singapore, 🇺🇸United States
🎬 𝑻𝒊𝒌𝑻𝒐𝒌 = select, 🇨🇳Taiwan, 🇸🇬Singapore, 🇯🇵Japan, 🇺🇸United States
🕊️ 𝑻𝒘𝒊𝒕𝒕𝒆𝒓 = select, 𝐀𝐮𝐭𝐨𝐦𝐚𝐭𝐢𝐜, 🇭🇰Hong Kong, 🇨🇳Taiwan, 🇸🇬Singapore, 🇯🇵Japan, 🇺🇸United States
📹 𝒀𝒐𝒖𝑻𝒖𝒃𝒆 = select, 𝐀𝐮𝐭𝐨𝐦𝐚𝐭𝐢𝐜, 🇭🇰Hong Kong, 🇨🇳Taiwan, 🇸🇬Singapore, 🇯🇵Japan, 🇺🇸United States
🧣 𝑾𝒆𝒊𝒃𝒐 = select, 🐼 Mainland, 🇭🇰Hong Kong, 🇨🇳Taiwan, 🇸🇬Singapore, 🇯🇵Japan, 🇺🇸United States, 𝐀𝐥𝐥𝐒𝐞𝐫𝐯𝐞𝐫
[Rule]
# > Safari 防跳转
DOMAIN,app-site-association.cdn-apple.com,REJECT
# ban UDP on Youtube
AND,((PROTOCOL,UDP), (DOMAIN-SUFFIX,googlevideo.com)),REJECT-NO-DROP
# ban National Anti-fraud Center
DOMAIN,prpr.96110.cn.com,DIRECT
DOMAIN-KEYWORD,96110,REJECT
DOMAIN-SUFFIX,gjfzpt.cn,REJECT
# > Vercel --> sub-store
DOMAIN-SUFFIX,vercel.app,𝐏𝐫𝐨𝐱𝐲
# > Direct(Google|Proxy|Download|Spotify)
RULE-SET,https://raw.githubusercontent.com/bunizao/TutuBetterRules/tutu/RuleList/DOMAlN/Direct.list,DIRECT
# > Mail
DOMAIN-SUFFIX,smtp,DIRECT
URL-REGEX,(Subject|HELO|SMTP),DIRECT
# > Unbreak 后续规则修正
RULE-SET,https://raw.githubusercontent.com/DivineEngine/Profiles/master/Surge/Ruleset/Unbreak.list,DIRECT
# > Advertising 广告拦截
RULE-SET,https://raw.githubusercontent.com/DivineEngine/Profiles/master/Surge/Ruleset/Guard/Advertising.list,REJECT-TINYGIF
DOMAIN-SET,https://raw.githubusercontent.com/DivineEngine/Profiles/master/Surge/Ruleset/Guard/AdvertisingPlus.list,REJECT
# > 🆕 拒绝国家反诈中心请求
DOMAIN-SUFFIX,gjfzpt.cn,REJECT
# > Privacy 隐私保护
# RULE-SET,https://raw.githubusercontent.com/DivineEngine/Profiles/master/Surge/Ruleset/Guard/Privacy.list,REJECT-TINYGIF
# > 🆕 Anti-IPCheck 阻断大陆app的ip查询
RULE-SET,https://raw.githubusercontent.com/bunizao/TutuBetterRules/tutu/RuleList/DOMAlN/Anti-IPCheck.list,𝐏𝐫𝐨𝐱𝐲
# > 规则们的party
RULE-SET,https://raw.githubusercontent.com/DivineEngine/Profiles/master/Surge/Ruleset/Guard/Hijacking.list,REJECT-TINYGIF
# > Stream Media
RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/BiliBili/BiliBili.list,📺 𝒃𝒊𝒍𝒊𝒃𝒊𝒍𝒊
RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Disney/Disney.list,🎥 𝑫𝒊𝒔𝒏𝒆𝒚+
RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Netflix/Netflix.list,🎥 𝑵𝒆𝒕𝒇𝒍𝒊𝒙
RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/AbemaTV/AbemaTV.list,🇯🇵Japan //AbemaTV
RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Peacock/Peacock.list,🇺🇸United States //Peacock
RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/HBOUSA/HBOUSA.list,🇺🇸United States // HBO NOW && HBO MAX
RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/PayPal/PayPal.list,💵 𝑷𝒂𝒚𝑷𝒂𝒍
RULE-SET,https://raw.githubusercontent.com/bunizao/TutuBetterRules/tutu/RuleList/DOMAlN/Telegram.list,✉️ 𝑻𝒆𝒍𝒆𝒈𝒓𝒂𝒎
RULE-SET,https://raw.githubusercontent.com/Semporia/TikTok-Unlock/master/Surge/TikTok.list,🎬 𝑻𝒊𝒌𝑻𝒐𝒌
RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Speedtest/Speedtest.list,🏎 𝑺𝒑𝒆𝒆𝒅𝒕𝒆𝒔𝒕
RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Twitter/Twitter.list,🕊️ 𝑻𝒘𝒊𝒕𝒕𝒆𝒓
# > Youtube & Google Search
RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/YouTube/YouTube.list,📹 𝒀𝒐𝒖𝑻𝒖𝒃𝒆
RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/GoogleSearch/GoogleSearch.list,📹 𝒀𝒐𝒖𝑻𝒖𝒃𝒆
# > Apple
RULE-SET,https://raw.githubusercontent.com/bunizao/TutuBetterRules/tutu/RuleList/DOMAlN/Apple_Direct.list,DIRECT
RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/AppleNews/AppleNews.list,🇺🇸United States
RULE-SET,https://raw.githubusercontent.com/bunizao/TutuBetterRules/tutu/RuleList/DOMAlN/Apple_Proxy.list,𝐏𝐫𝐨𝐱𝐲
;RULE-SET,https://raw.githubusercontent.com/bunizao/TutuBetterRules/tutu/RuleList/DOMAlN/iCloudPrivateRelay.list,𝐏𝐫𝐨𝐱𝐲 // iCloud Private Relay:MacOS上的Surge网关才能用 iOS不需要请禁用。
RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Apple/Apple.list, 𝑨𝒑𝒑𝒍𝒆
RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Weibo/Weibo.list,🧣 𝑾𝒆𝒊𝒃𝒐
# > Github代理
RULE-SET,https://raw.githubusercontents.com/blackmatrix7/ios_rule_script/master/rule/Surge/GitHub/GitHub.list,𝐀𝐮𝐭𝐨𝐦𝐚𝐭𝐢𝐜
# > 🆕WeChat 根据你自己的Wechat DC选择策略
#RULE-SET,https://raw.githubusercontent.com/DivineEngine/Profiles/master/Surge/Ruleset/Extra/WeChat.list,🇸🇬Singapore
#RULE-SET,https://raw.githubusercontent.com/DivineEngine/Profiles/master/Surge/Ruleset/Extra/WeChat.list,🇺🇸United States
# > Streaming 国际流媒体服务
RULE-SET,https://raw.githubusercontent.com/DivineEngine/Profiles/master/Surge/Ruleset/StreamingMedia/Streaming.list,𝐏𝐫𝐨𝐱𝐲
# > Global 全球加速
RULE-SET,https://raw.githubusercontent.com/DivineEngine/Profiles/master/Surge/Ruleset/Global.list,𝐏𝐫𝐨𝐱𝐲
# > China 中国直连
RULE-SET,https://raw.githubusercontent.com/DivineEngine/Profiles/master/Surge/Ruleset/China.list,DIRECT
# > Local Area Network 局域网
RULE-SET,LAN,DIRECT
# > 先进的 ASN China 分流
RULE-SET,https://raw.githubusercontent.com/VirgilClyne/GetSomeFries/main/ruleset/ASN.China.list,DIRECT
# > 兜底规则
FINAL,🏳️⚧️,dns-failed
[Host]
*.taobao.com = server:223.5.5.5
*.tmall.com = server:223.5.5.5
*.alipay.com = server:223.5.5.5
*.alicdn.com = server:223.5.5.5
*.aliyun.com = server:223.5.5.5
*.jd.com = server:119.28.28.28
*.qq.com = server:119.28.28.28
*.tencent.com = server:119.28.28.28
*.weixin.com = server:119.28.28.28
*.bilibili.com = server:119.29.29.29
hdslb.com = server:119.29.29.29
*.163.com = server:119.29.29.29
*.126.com = server:119.29.29.29
*.126.net = server:119.29.29.29
*.127.net = server:119.29.29.29
*.netease.com = server:119.29.29.29
*.mi.com = server:119.29.29.29
*.xiaomi.com = server:119.29.29.29
dl.google.com = server:119.29.29.29
dl.l.google.com = server:119.29.29.29
update.googleapis.com = server:119.29.29.29
mtalk.google.com = 108.177.125.188
*testflight.apple.com = server:8.8.4.4
# > Router Admin Panel
router.asus.com = server:syslib // Asus Router
tplogin.cn = server:syslib // TP-Link Router
tplinklogin.net = server:syslib // TP-Link Router
[URL Rewrite]
# > 有两种重定向方式: 'header' 和 '302'
# > 建议用模块 header
# > ReDIRECT Google Search Service
^(http|https):\/\/(www.)?(g|google)\.cn https://www.google.com 302
# AbeamTV Unlock header
^https?:\/\/api\.abema\.io\/v\d\/ip\/check - reject
# ReDIRECT Google Service
^https?:\/\/(www.)?g\.cn https://www.google.com 302
^https?:\/\/(www.)?google\.cn https://www.google.com 302
# ReDIRECT HTTP to HTTPS
^https?:\/\/(www.)?taobao\.com\/ https://www.taobao.com/ 302
^https?:\/\/(www.)?jd\.com\/ https://www.jd.com/ 302
^https?:\/\/(www.)?mi\.com\/ https://www.mi.com/ 302
^https?:\/\/you\.163\.com\/ https://you.163.com/ 302
^https?:\/\/(www.)?suning\.com/ https://suning.com/ 302
^https?:\/\/(www.)?yhd\.com https://yhd.com/ 302
[Script]
Sub-Store Core=type=http-request,pattern=^https?:\/\/sub\.store\/((download)|api\/(preview|sync|(utils\/node-info))),script-path=https://git.iqiq.io/sub-store-org/Sub-Store/releases/latest/download/sub-store-1.min.js,requires-body=true,timeout=120,ability=http-client-policy
Sub-Store Simple=type=http-request,pattern=^https?:\/\/sub\.store,script-path=https://git.iqiq.io/sub-store-org/Sub-Store/releases/latest/download/sub-store-0.min.js,requires-body=true
Sub-Store Sync=type=cron,cronexp=0 0 * * *,wake-system=1,timeout=120,script-path=https://git.iqiq.io/sub-store-org/Sub-Store/releases/latest/download/cron-sync-artifacts.min.js
Rewrite: BoxJs = type=http-request,pattern=https?:\/\/boxjs\.(com|net),script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/box/chavy.boxjs.js, requires-body=true, timeout=120
[MITM]
hostname = sub.store
skip-server-cert-verify = true
tcp-connection = true
h2 = true