|
|
# 官方手册 - https://manual.nssurge.com/
|
|
|
# 理解原理 - https://manual.nssurge.com/book/understanding-surge/cn/
|
|
|
# 帮助中心 - https://nssurge.zendesk.com/
|
|
|
# 技术社区 - https://community.nssurge.com
|
|
|
|
|
|
[General]
|
|
|
# 通用设置
|
|
|
|
|
|
# > 增强版 Wi-Fi 助理
|
|
|
# (在 Wi-Fi 网络不佳时尝试使用数据网络建立连接,请仅当使用不限量的数据流量时开启)
|
|
|
wifi-assist = false
|
|
|
|
|
|
# > Internet 测试 URL
|
|
|
internet-test-url = http://wifi.vivo.com.cn/generate_204
|
|
|
# > 代理测速 URL
|
|
|
proxy-test-url = http://cp.cloudflare.com/generate_204
|
|
|
# > 测试超时(秒)
|
|
|
test-timeout = 5
|
|
|
|
|
|
# > TLS 引擎
|
|
|
tls-provider = openssl
|
|
|
|
|
|
# > 自定义 GeoIP 数据库
|
|
|
geoip-maxmind-url = https://raw.githubusercontent.com/JMVoid/ipip2mmdb/release/Country.mmdb
|
|
|
|
|
|
# > IPv6 支持(默认关闭)
|
|
|
ipv6 = false
|
|
|
|
|
|
# > 允许 Wi-Fi 访问 (仅 iOS,若允许远程访问将「false」改为「true」)
|
|
|
allow-wifi-access = false
|
|
|
wifi-access-http-port = 6152
|
|
|
wifi-access-socks5-port = 6153
|
|
|
# > 允许 Wi-Fi 访问 (仅 macOS,若允许远程访问将「127.0.0.1」改为「0.0.0.0」)
|
|
|
http-listen = 127.0.0.1:6152
|
|
|
socks5-listen = 127.0.0.1:6153
|
|
|
|
|
|
# > 兼容模式 (仅 iOS)
|
|
|
# compatibility-mode = 0
|
|
|
# > 跳过代理
|
|
|
skip-proxy = 127.0.0.1, 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10, localhost, *.local, passenger.t3go.cn
|
|
|
# > 排除简单主机名
|
|
|
exclude-simple-hostnames = true
|
|
|
|
|
|
# > Network framwork
|
|
|
network-framework = false
|
|
|
|
|
|
# > DNS 服务器 (如无必要不建议使用 DNS over HTTPS)
|
|
|
dns-server = 119.29.29.29,system
|
|
|
# > 从 /etc/hosts 读取 DNS 记录
|
|
|
read-etc-hosts = true
|
|
|
|
|
|
# 高级设置
|
|
|
|
|
|
# > 日志级别
|
|
|
loglevel = notify
|
|
|
|
|
|
# > 当遇到 REJECT 策略时返回错误页
|
|
|
show-error-page-for-reject = true
|
|
|
|
|
|
# > Always Real IP Hosts
|
|
|
always-real-ip = msftconnecttest.com, msftncsi.com, *.msftconnecttest.com, *.msftncsi.com, *.srv.nintendo.net, *.stun.playstation.net, xbox.*.microsoft.com, *.xboxlive.com, *.battlenet.com.cn, *.battlenet.com, *.blzstatic.cn, *.battle.net
|
|
|
|
|
|
# > TCP Force HTTP Hosts
|
|
|
# KOOWO - 123.59.31.1,119.18.193.135, 122.14.246.33, 175.102.178.52
|
|
|
# TencentVideo - 116.253.24.*, 175.6.26.*, 220.169.153.*
|
|
|
force-http-engine-hosts = *.ott.cibntv.net, 123.59.31.1,119.18.193.135, 122.14.246.33, 175.102.178.52, 116.253.24.*, 175.6.26.*, 220.169.153.*
|
|
|
|
|
|
# > VIF Excluded Routes
|
|
|
tun-excluded-routes = 239.255.255.250/32
|
|
|
|
|
|
[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]
|
|
|
🌐Direct = direct
|
|
|
⛔️Reject = reject
|
|
|
🇨🇳TheHub = ss, 1.2.3.4, 443, encrypt-method=chacha20-ietf-poly1305, password=password
|
|
|
🇺🇸LosSantos = vmess, v2ray.cool, 443, username=a3482e88-686a-4a58-8126-99c9df64b7bf, tls=true, ws=true, ws-path=/v2ray.cool/
|
|
|
🇭🇰Sandbox = trojan, trojan.com, 443, password=password
|
|
|
|
|
|
[Proxy Group]
|
|
|
# 白名单模式 PROXY,黑名单模式 DIRECT
|
|
|
🧭Final = select, 🌑Proxy, 🌐Direct
|
|
|
# 节点选项
|
|
|
🌑Proxy = select, 🧯Fallback, 🕹AutoTest
|
|
|
# 国际流媒体服务
|
|
|
🎞Streaming = select, 🌑Proxy, 🕹AutoTest, 🦆DuckDuckGo
|
|
|
# 中国流媒体服务(面向海外版本)
|
|
|
🎞StreamingSE = select, 🌐Direct, 🇭🇰Sandbox
|
|
|
# 防御
|
|
|
🛡Guard = select, ⛔️Reject, 🌐Direct
|
|
|
# 可用性自动测试
|
|
|
🧯Fallback = fallback, 🇺🇸LosSantos, 🇨🇳TheHub
|
|
|
# 延迟自动测试
|
|
|
🕹AutoTest = url-test, 🦆DuckDuckGo, 🇺🇸LosSantos, 🇭🇰Sandbox
|
|
|
# 冲鸭机场 (代理服务商提供的代理列表订阅示例)
|
|
|
🦆DuckDuckGo = select, policy-path=https://duckduckgo.security/user/sub.php?token=DivineEngine
|
|
|
|
|
|
[Rule]
|
|
|
AND,((PROTOCOL,UDP),(DEST-PORT,443)),REJECT-NO-DROP
|
|
|
|
|
|
# Client
|
|
|
PROCESS-NAME,UUBooster,🌐Direct
|
|
|
# > Download
|
|
|
PROCESS-NAME,aria2c,🌐Direct
|
|
|
PROCESS-NAME,fdm,🌐Direct
|
|
|
PROCESS-NAME,Folx,🌐Direct
|
|
|
PROCESS-NAME,NetTransport,🌐Direct
|
|
|
PROCESS-NAME,Thunder,🌐Direct
|
|
|
PROCESS-NAME,Transmission,🌐Direct
|
|
|
PROCESS-NAME,uTorrent,🌐Direct
|
|
|
PROCESS-NAME,WebTorrent,🌐Direct
|
|
|
PROCESS-NAME,WebTorrent Helper,🌐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,🛡Guard
|
|
|
DOMAIN-SET,https://raw.githubusercontent.com/DivineEngine/Profiles/master/Surge/Ruleset/Guard/AdvertisingPlus.list,🛡Guard
|
|
|
|
|
|
# Privacy 隐私
|
|
|
# RULE-SET,https://raw.githubusercontent.com/DivineEngine/Profiles/master/Surge/Ruleset/Guard/Privacy.list,🛡Guard
|
|
|
|
|
|
# Hijacking 运营商劫持或恶意网站
|
|
|
RULE-SET,https://raw.githubusercontent.com/DivineEngine/Profiles/master/Surge/Ruleset/Guard/Hijacking.list,🛡Guard
|
|
|
|
|
|
# Streaming 国际流媒体服务
|
|
|
RULE-SET,https://raw.githubusercontent.com/DivineEngine/Profiles/master/Surge/Ruleset/StreamingMedia/Streaming.list,🎞Streaming
|
|
|
|
|
|
# StreamingSE 中国流媒体服务(面向海外版本)
|
|
|
RULE-SET,https://raw.githubusercontent.com/DivineEngine/Profiles/master/Surge/Ruleset/StreamingMedia/StreamingSE.list,🎞StreamingSE
|
|
|
|
|
|
# Global 全球加速
|
|
|
RULE-SET,https://raw.githubusercontent.com/DivineEngine/Profiles/master/Surge/Ruleset/Global.list,🌑Proxy
|
|
|
|
|
|
# Apple 服务
|
|
|
RULE-SET,https://raw.githubusercontent.com/DivineEngine/Profiles/master/Surge/Ruleset/Extra/Apple/Apple.list,🌐Direct
|
|
|
|
|
|
# China 中国直连
|
|
|
RULE-SET,https://raw.githubusercontent.com/DivineEngine/Profiles/master/Surge/Ruleset/China.list,🌐Direct
|
|
|
|
|
|
# Local Area Network 局域网
|
|
|
RULE-SET,LAN,🌐Direct
|
|
|
|
|
|
# GeoIP China
|
|
|
GEOIP,CN,🌐Direct
|
|
|
|
|
|
FINAL,🧭Final,dns-failed
|
|
|
|
|
|
[Host]
|
|
|
# > Apple
|
|
|
aaplimg.com = server:119.29.29.29
|
|
|
apple.com = server:119.29.29.29
|
|
|
apple-cloudkit.com = server:119.29.29.29
|
|
|
apple-mapkit.com = server:119.29.29.29
|
|
|
cdn-apple.com = server:119.29.29.29
|
|
|
mzstatic.com = server:119.29.29.29
|
|
|
*.aaplimg.com = server:119.29.29.29
|
|
|
*.apple.com = server:119.29.29.29
|
|
|
*.apple-cloudkit.com = server:119.29.29.29
|
|
|
*.apple-mapkit.com = server:119.29.29.29
|
|
|
*.cdn-apple.com = server:119.29.29.29
|
|
|
*.mzstatic.com = server:119.29.29.29
|
|
|
*apple.com.akadns.net = server:119.29.29.29
|
|
|
*.apple.com.edgekey.net = server:119.29.29.29
|
|
|
*.apple.com.edgekey.net.globalredir.akadns.net = server:119.29.29.29
|
|
|
*icloud.com.akadns.net = server:119.29.29.29
|
|
|
|
|
|
# > Firebase Cloud Messaging
|
|
|
mtalk.google.com = 108.177.125.188
|
|
|
|
|
|
# > Google Dl
|
|
|
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
|
|
|
|
|
|
# > PlayStation
|
|
|
*.dl.playstation.net = server:119.29.29.29
|
|
|
|
|
|
# > Router Admin Panel
|
|
|
falogin.cn = server:syslib
|
|
|
melogin.cn = server:syslib
|
|
|
router.asus.com = server:syslib
|
|
|
tplinklogin.net = server:syslib
|
|
|
tplogin.cn = server:syslib
|
|
|
|
|
|
# 解锁了「模块」功能的用户可以使用 General.sgmodule 后可移除 [URL Rewrite] 及 [MITM] 的「hostname = www.google.cn,api.abema.io」部分
|
|
|
# 建议使用 General.sgmodule,其他 .sgmodule 按需加入
|
|
|
# 未解锁「模块」功能的用户不要删除以下内容,参照说明(https://github.com/DivineEngine/Profiles/tree/master/Surge)使用快捷指令更新相关内容。
|
|
|
|
|
|
[Header Rewrite]
|
|
|
|
|
|
[URL Rewrite]
|
|
|
# Redirect Google Search Service
|
|
|
^https?:\/\/(www.)?(g|google)\.cn https://www.google.com 302
|
|
|
|
|
|
# Redirect Google Maps Service
|
|
|
^https?:\/\/(ditu|maps).google\.cn https://maps.google.com 302
|
|
|
|
|
|
# Redirect HTTP to HTTPS
|
|
|
^https?:\/\/(www.)?taobao\.com\/ https://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
|
|
|
|
|
|
# Redirect False to True
|
|
|
# > Firefox - www.firefox.com.cn
|
|
|
^https?:\/\/(www.)?firefox\.com\.cn\/(download\/)?$ https://www.mozilla.org/zh-CN/firefox/new/ 302
|
|
|
# > IGN China to IGN Global
|
|
|
^https?:\/\/(www.)?ign\.xn--fiqs8s\/ http://cn.ign.com/ccpref/us 302
|
|
|
# > Fake Website Made By C&J Marketing
|
|
|
^https?:\/\/(www.)?abbyychina\.com\/ https://www.abbyy.cn/ 302
|
|
|
^https?:\/\/(www.)?anydeskchina.cn/ https://anydesk.com/zhs 302
|
|
|
^https?:\/\/(www.)?bartender\.cc\/ https://www.macbartender.com/ 302
|
|
|
^https?:\/\/(www.)?(betterzipcn|betterzip)\.(com|net)\/ https://macitbetter.com/ 302
|
|
|
^https?:\/\/(www.)?beyondcompare\.cc\/ https://www.scootersoftware.com/ 302
|
|
|
^https?:\/\/(www.)?bingdianhuanyuan\.cn\/ https://www.faronics.com/zh-hans/products/deep-freeze 302
|
|
|
^https?:\/\/(www.)?chemdraw\.com\.cn\/ https://www.perkinelmer.com.cn/ 302
|
|
|
^https?:\/\/(www.)?codesoftchina\.com\/ https://www.teklynx.com/ 302
|
|
|
^https?:\/\/(www.)?coreldrawchina\.com\/ https://www.coreldraw.com/cn/ 302
|
|
|
^https?:\/\/(www.)?crossoverchina\.com\/ https://www.codeweavers.com/ 302
|
|
|
^https?:\/\/(www.)?dongmansoft\.com\/ https://www.udongman.cn/ 302
|
|
|
^https?:\/\/(www.)?earmasterchina\.cn\/ https://www.earmaster.com/ 302
|
|
|
^https?:\/\/(www.)?easyrecoverychina\.com\/ https://www.ontrack.com/ 302
|
|
|
^https?:\/\/(www.)?ediuschina\.com\/ https://www.grassvalley.com/ 302
|
|
|
^https?:\/\/(www.)?flstudiochina\.com\/ https://www.image-line.com/ 302
|
|
|
^https?:\/\/(www.)?formysql\.com\/ https://www.navicat.com.cn/ 302
|
|
|
^https?:\/\/(www.)?guitarpro\.cc\/ https://www.guitar-pro.com/ 302
|
|
|
^https?:\/\/(www.)?huishenghuiying\.com\.cn\/ https://www.coreldraw.com/cn/ 302
|
|
|
^https?:\/\/hypersnap\.mairuan\.com\/ https://www.hyperionics.com/ 302
|
|
|
^https?:\/\/(www.)?iconworkshop\.cn\/ https://www.axialis.com/ 302
|
|
|
^https?:\/\/(www.)?idmchina\.net\/ https://www.internetdownloadmanager.com/ 302
|
|
|
^https?:\/\/(www.)?imindmap\.cc\/ https://www.ayoa.com/previously-imindmap/ 302
|
|
|
^https?:\/\/(www.)?jihehuaban\.com\.cn\/ https://www.chartwellyorke.com/sketchpad/x24795.html 302
|
|
|
^https?:\/\/hypersnap\.mairuan\.com\/ https://www.keyshot.com/ 302
|
|
|
^https?:\/\/(www.)?kingdeecn\.cn\/ http://www.kingdee.com/ 302
|
|
|
^https?:\/\/(www.)?logoshejishi\.com https://www.sothink.com/product/logo-design-software/ 302
|
|
|
^https?:\/\/logoshejishi\.mairuan\.com\/ https://www.sothink.com/product/logo-design-software/ 302
|
|
|
^https?:\/\/(www.)?luping\.net\.cn\/ https://www.techsmith.com/ 302
|
|
|
^https?:\/\/(www.)?mathtype\.cn\/ https://www.dessci.com/ 302
|
|
|
^https?:\/\/(www.)?mindmanager\.(cc|cn)\/ https://www.mindjet.com/cn/ 302
|
|
|
^https?:\/\/(www.)?mindmapper\.cc\/ https://www.mindmapper.com/ 302
|
|
|
^https?:\/\/(www.)?(mycleanmymac|xitongqingli)\.com\/ https://macpaw.com/ 302
|
|
|
^https?:\/\/(www.)?nicelabel\.cc\/ https://www.nicelabel.com/zh/ 302
|
|
|
^https?:\/\/(www.)?ntfsformac\.cc\/ https://www.tuxera.com/products/tuxera-ntfs-for-mac-cn/ 302
|
|
|
^https?:\/\/(www.)?ntfsformac\.cn\/ https://china.paragon-software.com/home-mac/ntfs-for-mac/ 302
|
|
|
^https?:\/\/(www.)?overturechina\.com\/ https://sonicscores.com/ 302
|
|
|
^https?:\/\/(www.)?passwordrecovery\.cn\/ https://cn.elcomsoft.com/aopr.html 302
|
|
|
^https?:\/\/(www.)?pdfexpert\.cc\/ https://pdfexpert.com/zh 302
|
|
|
^https?:\/\/(www.)?photozoomchina\.com\/ https://www.benvista.com/ 302
|
|
|
^https?:\/\/(www.)?shankejingling\.com\/ https://www.sothink.com/product/flashdecompiler/ 302
|
|
|
^https?:\/\/cn\.ultraiso\.net\/ https://cn.ezbsystems.com/ultraiso/ 302
|
|
|
^https?:\/\/(www.)?vegaschina\.cn\/ https://www.vegascreativesoftware.com/ 302
|
|
|
^https?:\/\/(www.)?xshellcn\.com\/ https://www.netsarang.com/zh/xshell/ 302
|
|
|
^https?:\/\/(www.)?yuanchengxiezuo\.com\/ https://www.teamviewer.com/ 302
|
|
|
^https?:\/\/(www.)?zbrushcn\.com\/ https://pixologic.com/ 302
|
|
|
|
|
|
# AbeamTV - api.abema.io
|
|
|
^https?:\/\/api\.abema\.io\/v\d\/ip\/check - reject
|
|
|
|
|
|
# AICoin
|
|
|
^http:\/\/(www.)?aicoin\.cn\/$ https://www.aicoin.com/ 302
|
|
|
|
|
|
# Block Ads Start
|
|
|
|
|
|
# Block Ads End
|
|
|
|
|
|
[Script]
|
|
|
|
|
|
[SSID Setting]
|
|
|
|
|
|
[MITM]
|
|
|
skip-server-cert-verify = true
|
|
|
hostname = www.google.cn,www.firefox.com.cn,api.abema.io |