# Surge 的规则配置手册: https://manual.nssurge.com/ [General] # > 日志级别 loglevel = notify show-error-page-for-reject = true # > 允许Wi-Fi访问 wifi-assist = true allow-wifi-access = true wifi-access-http-port = 6152 wifi-access-socks5-port = 6153 http-listen = 0.0.0.0:6152 socks5-listen = 0.0.0.0:6153 # > All Hybrid 网络并发 all-hybrid = true # > IPv6 支持(默认关闭) ipv6 = true # > 测试超时(秒) test-timeout = 5 # > Internet 测试 URL internet-test-url = http://www.baidu.com # > 代理测速 URL proxy-test-url = http://www.google.com/generate_204 # > GeoIP数据库 geoip-maxmind-url = https://github.com/Hackl0us/GeoIP2-CN/raw/release/Country.mmdb # > 排除简单主机名 exclude-simple-hostnames = true # > DNS 服务器 dns-server = 223.5.5.5, 119.29.29.29 hijack-dns = 8.8.8.8:53, 8.8.4.4:53 # 从 Surge iOS 4 / Surge Mac 3.3.0 起,工具开始支持 DoH doh-server = https://doh.pub/dns-query, https://dns.alidns.com/dns-query # > 从 /etc/hosts 读取 DNS 记录 read-etc-hosts = true # > 远程控制器 http-api-web-dashboard = true use-default-policy-if-wifi-not-primary = false # > 跳过代理 skip-proxy = 192.168.0.0/24, 10.0.0.0/8, 172.16.0.0/12, 127.0.0.1, localhost, *.local # > Always Real IP always-real-ip = *.srv.nintendo.net, *.stun.playstation.net, xbox.*.microsoft.com, *.xboxlive.com*.srv.nintendo.net, *.stun.playstation.net, xbox.*.microsoft.com, *.xboxlive.com, *.battlenet.com.cn, *.battlenet.com, *.blzstatic.cn, *.battle.net # > Surge VIF # tun-excluded-routes = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12 # tun-included-routes = 192.168.1.12/32 # > 禁用 GEOIP 自动更新 disable-geoip-db-auto-update = false ipv6-vif = disabled external-controller-access = 请指定密码@0.0.0.0:6170 replica = true tls-provider = openssl network-framework = false [Replica] # > 隐藏 Apple 请求 hide-apple-request = false # > 隐藏崩溃追踪器请求 hide-crash-reporter-request = true # > 隐藏 UDP 会话 hide-udp = false # > 关键词过滤器 keyword-filter-type = false # ----------------------------- # Surge 的几种策略配置规范,请参考 https://manual.nssurge.com/policy/proxy.html # 不同的代理策略有*很多*可选参数,请参考上方连接的 Parameters 一段,根据需求自行添加参数。 # # Surge 现已支持 UDP 转发功能,请参考: https://trello.com/c/ugOMxD3u/53-udp-%E8%BD%AC%E5%8F%91 # Surge 现已支持 TCP-Fast-Open 技术,请参考: https://trello.com/c/ij65BU6Q/48-tcp-fast-open-troubleshooting-guide # Surge 现已支持 ss-libev 的全部加密方式和混淆,请参考: https://trello.com/c/BTr0vG1O/47-ss-libev-%E7%9A%84%E6%94%AF%E6%8C%81%E6%83%85%E5%86%B5 # ----------------------------- [Proxy] 🌐 全球直连 = direct # ProxyHTTP = http, 1.2.3.4, 443, username, password # ProxyHTTPS = https, 1.2.3.4, 443, username, password # ProxySOCKS5 = socks5, 1.2.3.4, 443, username, password # ProxySOCKS5TLS = socks5-tls, 1.2.3.4, 443, username, password # ProxySS = ss, 1.2.3.4, 8000, encrypt-method=chacha20-ietf-poly1305, password=abcd1234 # ProxyTrojan = trojan, 192.168.20.6, 443, password=password1 # ProxySnell = snell, 1.2.3.4, 8000, psk=password [Proxy Group] # > 策略组(下面的节点信息需与外部节点对应,若删除了外部节点里的节点,那么在策略组里也要删除。) ✈️ 节点选择 = select, 🇭🇰 香港节点, 🇺🇲 美国节点, 🇸🇬 新加坡节点, 🇯🇵 日本节点, 🇨🇳 台湾节点, 🚀 手动选择 📲 电报信息 = select, ✈️ 节点选择, 🇭🇰 香港节点, 🇺🇲 美国节点, 🇸🇬 新加坡节点, 🇯🇵 日本节点, 🇨🇳 台湾节点 🎥 奈飞视频 = select, 🇭🇰 香港节点, 🇺🇲 美国节点, 🇸🇬 新加坡节点, 🇯🇵 日本节点, 🇨🇳 台湾节点 🎬 迪士尼+ = select, 🇭🇰 香港节点, 🇺🇲 美国节点, 🇸🇬 新加坡节点, 🇯🇵 日本节点, 🇨🇳 台湾节点 📹 油管视频 = select, 🇭🇰 香港节点, 🇺🇲 美国节点, 🇸🇬 新加坡节点, 🇯🇵 日本节点, 🇨🇳 台湾节点 📽 哔哩哔哩 = select, 🌐 全球直连, 🇭🇰 香港节点, 🇯🇵 日本节点 🍿 国外媒体 = select, ✈️ 节点选择, 🇭🇰 香港节点, 🇺🇲 美国节点, 🇸🇬 新加坡节点, 🇯🇵 日本节点, 🇨🇳 台湾节点 🍔 国内媒体 = select, 🌐 全球直连, 🇭🇰 香港节点, 🇺🇲 美国节点, 🇸🇬 新加坡节点, 🇯🇵 日本节点, 🇨🇳 台湾节点 🍟 谷歌服务 = select, 🌐 全球直连, ✈️ 节点选择, 🇭🇰 香港节点, 🇺🇲 美国节点, 🇸🇬 新加坡节点, 🇯🇵 日本节点, 🇨🇳 台湾节点 Ⓜ️ 微软服务 = select, 🌐 全球直连, ✈️ 节点选择, 🇭🇰 香港节点, 🇺🇲 美国节点, 🇸🇬 新加坡节点, 🇯🇵 日本节点, 🇨🇳 台湾节点 🍎 苹果服务 = select, 🌐 全球直连, ✈️ 节点选择, 🇭🇰 香港节点, 🇺🇲 美国节点, 🇸🇬 新加坡节点, 🇯🇵 日本节点, 🇨🇳 台湾节点 🎮 游戏平台 = select, 🌐 全球直连, ✈️ 节点选择, 🇭🇰 香港节点, 🇺🇲 美国节点, 🇸🇬 新加坡节点, 🇯🇵 日本节点, 🇨🇳 台湾节点 Last = select,🌐 全球直连,✈️ 节点选择 # > 外部节点 🇭🇰 香港节点 = fallback, policy-path=https://sub.store/download/ip, update-interval=0, policy-regex-filter=(🇭🇰)|(港)|(Hong)|(HK) 🇨🇳 台湾节点 = fallback, policy-path=https://sub.store/download/ip, update-interval=0, policy-regex-filter=(🇨🇳)|(台)|(Tai)|(TW) 🇺🇲 美国节点 = fallback, policy-path=https://sub.store/download/ip, update-interval=0, policy-regex-filter=(🇺🇸)|(美)|(States)|(US) 🇯🇵 日本节点 = fallback, policy-path=https://sub.store/download/ip, update-interval=0, policy-regex-filter=(🇯🇵)|(日)|(Japan)|(JP) 🇸🇬 新加坡节点 = fallback, policy-path=https://sub.store/download/ip, update-interval=0, policy-regex-filter=(🇸🇬)|(新)|(Singapore)|(SG) 🚀 手动选择 = select, policy-path=https://sub.store/download/ip, update-interval=0, no-alert=0, hidden=0, include-all-proxies=0 [Rule] # 防止应用循环请求 IP-CIDR,0.0.0.0/32,REJECT,no-resolve # > 局域网地址 RULE-SET,https://github.com/blackmatrix7/ios_rule_script/raw/master/rule/Surge/Lan/Lan.list,🌐 全球直连 # > 苹果服务 RULE-SET,https://github.com/blackmatrix7/ios_rule_script/raw/master/rule/Surge/Apple/Apple_All_No_Resolve.list,🍎 苹果服务 # > 微软服务 RULE-SET,https://github.com/blackmatrix7/ios_rule_script/raw/master/rule/Surge/Microsoft/Microsoft.list,Ⓜ️ 微软服务 # > 社交平台 RULE-SET,https://github.com/blackmatrix7/ios_rule_script/raw/master/rule/Surge/Telegram/Telegram_Resolve.list,📲 电报信息 # > 游戏平台 RULE-SET,https://github.com/blackmatrix7/ios_rule_script/raw/master/rule/Surge/Epic/Epic.list,🎮 游戏平台 RULE-SET,https://github.com/blackmatrix7/ios_rule_script/raw/master/rule/Surge/Sony/Sony.list,🎮 游戏平台 RULE-SET,https://github.com/blackmatrix7/ios_rule_script/raw/master/rule/Surge/Steam/Steam.list,🎮 游戏平台 RULE-SET,https://github.com/blackmatrix7/ios_rule_script/raw/master/rule/Surge/Nintendo/Nintendo.list,🎮 游戏平台 # > 流媒体 RULE-SET,https://github.com/blackmatrix7/ios_rule_script/raw/master/rule/Surge/YouTube/YouTube.list,📹 油管视频 RULE-SET,https://github.com/blackmatrix7/ios_rule_script/raw/master/rule/Surge/Netflix/Netflix.list,🎥 奈飞视频 RULE-SET,https://github.com/blackmatrix7/ios_rule_script/raw/master/rule/Surge/Disney/Disney.list,🎬 迪士尼+ RULE-SET,https://github.com/blackmatrix7/ios_rule_script/raw/master/rule/Surge/BiliBili/BiliBili.list,📽 哔哩哔哩 RULE-SET,https://github.com/blackmatrix7/ios_rule_script/raw/master/rule/Surge/ChinaMedia/ChinaMedia.list,🍔 国内媒体 RULE-SET,https://github.com/blackmatrix7/ios_rule_script/raw/master/rule/Surge/GlobalMedia/GlobalMedia_All_No_Resolve.list,🍿 国外媒体 # > 谷歌服务 RULE-SET,https://github.com/blackmatrix7/ios_rule_script/raw/master/rule/Surge/Google/Google.list,🍟 谷歌服务 # > Proxy RULE-SET,https://github.com/blackmatrix7/ios_rule_script/raw/master/rule/Surge/Proxy/Proxy_All_No_Resolve.list,✈️ 节点选择 # > China ASN RULE-SET,https://github.com/blackmatrix7/ios_rule_script/raw/master/rule/Surge/ChinaASN/ChinaASN.list,🌐 全球直连 # RULE-SET,https://loon.arick.top/loon-china.list,🌐 全球直连 RULE-SET,https://github.com/blackmatrix7/ios_rule_script/raw/master/rule/Surge/ChinaMax/ChinaMax_All.list, direct # 去广告 RULE-SET,https://adrules.top/adrules.list,REJECT # > DNS 查询失败走 Final 规则 FINAL,Last,dns-failed [MITM] skip-server-cert-verify = true ca-passphrase = ca-p12 =