[General] # Latency Benchmark internet-test-url = http://bing.com proxy-test-url = http://cp.cloudflare.com/generate_204 test-timeout = 5 # GeoIP Database geoip-maxmind-url = https://raw.githubusercontent.com/Loyalsoldier/geoip/release/Country.mmdb # IPv6 Support # 开启 IPv6 会让 Surge 同时请求域名的 A 与 AAAA 记录,这可能略微的增加延迟。若 DNS 服务器无法正确响应 AAAA 查询,则可能导致严重的卡顿,仅在需要时开启。 ipv6 = true # --- Wi-Fi ACCESS --- # Surge 可以作为一个标准的 HTTP/SOCKS5 代理服务器向 wi-Fi 网络下的其他设备提供服务器 # Surge Mac - 默认 HTTP 端口号:6152,SOCKS5 端口号:6153 http-listen = 0.0.0.0:6152 socks5-listen = 0.0.0.0:6153 # --- REMOTE CONTROLLER --- # 允许 Surge 请求查看器或 Surge CLI 进行管理控制 # 默认仅允许外部控制器通过 USB 进行控制。如果想要允许由 Wi-Fi 控制可以将 127.0.0.1 改为 0.0.0.0 external-controller-access = key@127.0.0.1:6160 # HTTP API & Web Dashboard # This option allows using HTTP APIs to control http-api = key@127.0.0.1:6166 # 使用 HTTPS 替代 HTTP 协议,需要先配置 MitM 的 CA 证书,同时需要在客户端设备上手动安装并信任 CA 证书 http-api-tls = false # 开启该选项后可以通过浏览器控制 Surge,本机浏览器输入127.0.0.1:6166 http-api-web-dashboard = true # --- COMPATIBILITY --- # 该选项将使得发往这些域名或者 IP 段的请求由 Surge VIF 进行处理(而不是 Surge Proxy),该选项用于修正和某些应用的兼容性问题 # 兼容模式 # 0:禁用 # 1:Proxy with Loopback Address # 2:Proxy Only # 3:VIF Only # 4:VIF Proxy:不使用 127.0.0.1 的回环地址作为代理,使用 VIF 的虚拟代理地址,将产生额外的性能开销 # 5:不作为默认路由:不声明为默认路由,但声明若干个小路由以覆盖所有地址(与 Surge Mac 增强模式行为相同) # 这种配置下由于 VIF 不是主网络设备无法配置系统代理。部分应用在该模式下会认为 VPN 未开启以解决特殊兼容性问题,如 HomeKit Security Camera # ⚠️ 请仅在指引下使用,开启后部分功能可能无法使用 compatibility-mode = 0 # 跳过代理 skip-proxy = 192.168.0.0/24, 10.0.0.0/8, 172.16.0.0/12, 127.0.0.1, localhost, *.local # 排除简单主机名 exclude-simple-hostnames = true # --- DNS --- # The IP addresses of upstream DNS servers dns-server = 119.29.29.29, 114.114.114.114 # 从 /etc/hosts 读取 DNS 记录 read-etc-hosts = true # ENCRYPTED DNS # 如果配置了加密 DNS,传统 DNS 将仅用作解析 DOH 域名和测试网络连通性 # 支持的协议: # DNS over HTTPS: https://doh.pub/dns-query # DNS over HTTP/3: h3://example.com # DNS over QUIC: quic://example.com # encrypted-dns-server = https://223.5.5.5/ // 除非当地 ISP 有严重的 DNS 污染问题,否则没必要开启 DoH,传统 DNS 的性能最优,网络异常后恢复速度最快 doh-skip-cert-verification = true # 代理请求本地 DNS 映射 # 开启该选项后,如果访问的域名配置有本地 DNS 映射,surge 将使用本地 IP 地址进行请求,不在远端进行解析。仅对配置了 IP 地址的本地 DNS 映射生效 use-local-host-item-for-proxy = true # 使加密 DNS 请求通过代理策略执行 encrypted-dns-follow-outbound-mode = false # --- ROUTING --- # 包含所有网络请求 include-all-networks = false # 包含本地网络请求 include-local-networks = false # --- ADVANCED --- # Log Level loglevel = notify # 当遇到 REJECT 策略时返回错误页 show-error-page-for-reject = true # Always Real IP Hosts # 当 Surge VIF 处理 DNS 问题时,此选项要求 Surge 返回一个真正的 IP 地址,而不是一个 Fake IP # DNS 数据包将被转发到上游 DNS 服务器 # 例如由于游戏主机会使用 STUN 技术进行 NAT 穿透,需要进行一些额外的配置才能正常工作 always-real-ip = link-ip.nextdns.io, *.msftconnecttest.com, *.msftncsi.com, *.srv.nintendo.net, *.stun.playstation.net, xbox.*.microsoft.com, *.xboxlive.com, *.logon.battlenet.com.cn, *.logon.battle.net, stun.l.google.com # Hijack DNS # 默认情况下,Surge 只对发送到 Surge DNS 地址(198.18.0.2)的 DNS 查询返回 Fack IP 地址。发送到标准 DNS 的查询将被转发 # 如 Google 系智能硬件产品会无视 DHCP 配置强行使用 8.8.8.8 和 8.8.4.4,需要配置 Surge 强行劫持才可以正常工作 hijack-dns = 8.8.8.8:53, 8.8.4.4:53 # TCP Force HTTP Hosts # 使 Surge 将 TCP 连接视为 HTTP 请求。Surge HTTP 引擎将处理请求,并且所有高级功能都将可用,如截取、重写和脚本 # 支持通配符 * 及 ?; # 使用前缀 - 排除主机名; # 默认情况下,只对 80 端口的请求进行处理(使用 example.com:443 指定端口或 example.com:0 表示所有端口); # 表示匹配所有主机名为 IP 地址的连接; # 表示匹配所有主机名为 IPv4 地址的连接; # 表示匹配所有主机名为 IPv6 地址的连接。 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 # VIF Included Routes # tun-included-routes = 192.168.1.12/32 # 当 Wi-Fi 不是首选网络时 SSID 组策略使用默认策略 use-default-policy-if-wifi-not-primary = false # 控制当 UDP 流量被匹配到一个不支持 UDP 转发的策略时的行为 # - DIRECT:回退到 DIRECT 策略(默认) # - REJECT:回退到 REJECT 策略 udp-policy-not-supported-behaviour = REJECT [Replica] # 抓取流量 => 过滤器 1为开启,0为关闭 # 隐藏 Apple 请求 hide-apple-request = 1 # 隐藏 Crashlytics 请求 hide-crash-reporter-request = 1 # 隐藏 UDP 会话 hide-udp = 1 # 关键词过滤器 # none(关闭关键词过滤器) / whitelist(仅记录包含关键词的请求) / blacklist(仅记录不包含关键词的请求) / pattern(记录匹配通配符的请求) keyword-filter-type = blacklist keyword-filter = icloud, ocsp, logs, analytic, imap, adthor, applovin, appnext, talk, dropbox, github, spys, nexdns, 149.154, 91.108 [Proxy] # 直接连接 IPV4-ONLY = direct, ip-version=v4-only IPV6-ONLY = direct, ip-version=v6-only IPV4-prefer = direct, ip-version=prefer-v4 IPV6-prefer = direct, ip-version=prefer-v6 # 该段定义可用的策略组 # 一个策略组可以包括多个子策略 # 子策略可以是一个代理策略,或者另一个策略组,或者是一个内置策略 (DIRECT 或 REJECT). # DIRECT 表示将该请求直接发往目标服务器 # REJECT 表示拒绝该请求,当连接类型为 HTTP 时,会返回一个错误页面。(该行为可被 show-error-page-for-reject 参数控制) # REJECT-TINYGIF 表示拒绝该请求,当连接类型为 HTTP 时,返回一个 1px 的 GIF 图片响应。若为其他类型连接则直接断开。该策略主要用于 Web 广告屏蔽。 # REJECT-DROP 表示拒绝该请求,与 REJECT 不同的是,该策略将静默抛弃请求。因为部分程序有着十分暴力的重试逻辑,连接失败后会立刻进行重试,导致请求风暴。如果发往某主机名的请求短时间内大量触发 REJECT/REJECT-TINYGIF 策略(当前版本的阈值为 30 秒内 10 次),为了避免产生大量资源浪费,Surge 将自动升级策略为 REJECT-DROP 策略。 # REJECT-NO-DROP 表示不使用默认的自动丢包逻辑,这样 Surge 每次都会返回 ICMP Port Unreachable,应用会立刻回退而不是等超时。 # CELLULAR 表示优先使用数据网络; # CELLULAR-ONLY 表示仅使用数据网络; # HYBRID 表示尝试并发使用 Wi-Fi 和数据网络建立连接,仅当混合网络开关未开启时有意义。 # NO-HYBRID 表示当 Wi-Fi可用时永不尝试数据网络,仅当混合网络或 i-Fi 助力选项开启时有意义。 # - 新增 IPv4 & IPv6 偏好参数,对于所有策略,可附带参数 ip-version=,可选参数有: # * dual:默认行为,在双栈网络上将并发使用 v4 和 v6 地址并选取最快速的结果。 # * prefer-v4:若DNS解析获得了 A 与 AAAA 记录,优先使用 A 记录,否则使用 AAAA 记录。 # * prefer-v6:若DNS解析获得了 A 与 AAAA 记录,优先使用 AAAA 记录,否则使用 A 记录。 # * v4-only:仅使用 A 记录,若未获得A记录则失败。 # * v6-only:仅使用 AAAA 记录,若未获得 AAAA 记录则失败。 # 可配合 direct 类型策略使用,如:IPV6-ONLY = direct, ip-version=v6-only # DIRECT = direct, ip-version=prefer-v4 # HYBRID = direct, hybrid=true, ip-version=dual # 有 5 种策略组类型: "select", "url-test", "fallback", "ssid" 和 "load-balance" # select: 具体哪个子策略将被使用,由用户界面上进行选择。 # url-test: 具体哪个子策略将被使用,通过测试到具体 URL 的访问速度选择延迟最低的策略 # 参数: # url: 测试时用到的目标 URL. # interval: 可选, 秒 (默认值: 600s) # 指定在多长时间后,上次的测试结果将被抛弃。 # tolerance: 可选, 毫秒 (默认值: 100ms) # 只有当新的优选线路,比原优选线路的响应时间,大于该值的时候,才会触发线路变更。 # timeout: 可选, 秒 (默认值: 5s) # 如果某策略在该时间后依然没有完成,放弃该策略。 # fallback: 与 url-test 组基本一致,区别是只关心子策略是否可用而不关心具体延迟,然后 # 从可用策略中选择靠前的策略。可以通过调小 timeout 参数将缓慢线路也标记为不可用。 # 该类型没有 tolerance 参数。 # ssid: 具体哪个子策略将被使用,根据 Wi-FI 的 SSID、BSSID、路由 IP 地址决定 # 参数: # default: 必填 # 默认策略。 # cellular: 可选 # 在数据网络下的策略。 若不填,那么默认策略将被使用。 # load-balance: 随机从子策略中选取一个策略使用。当配置了 url 参数时,会 # 按照 fallback 组的行为进行可用性检查,然后仅从可用的子策略中随机选取。 # 参数: # 除 url、timeout、interval外,还有一个参数: # persistent:当 persistent=true 时,对于同一目标主机名,将尽量使用同一个策略。 # 避免因出口 IP 不同而触发目标网站的风险控制。但当可用性改变时可能导致策略变化。 [Proxy Group] 🔰 节点选择 = select, 🇭🇰 Hong Kong, 🇨🇳 Taiwan, 🇯🇵 Japan, 🇰🇷 Korea, 🇺🇸 United States, 🇸🇬 Singapore, subscription1, subscription2, 🖥 自建 subscription1 = select, policy-path=https://sub.store/download/subscription1 subscription2 = select, policy-path=https://sub.store/download/TM%20Cloud 🖥 自建 = select, policy-path=https://sub.store/download/Server 🚫 AdBlock = select, REJECT, DIRECT, hidden=true 🚫 系统更新 = select, REJECT, DIRECT, hidden=true 🚫 PD = select, REJECT, DIRECT, hidden=true 🇨🇳 国内App = select, DIRECT, 🔰 节点选择, 🇭🇰 Hong Kong, 🇨🇳 Taiwan, 🇯🇵 Japan, 🇰🇷 Korea, 🇺🇸 United States, 🇸🇬 Singapore, hidden=true  苹果服务 = select, DIRECT, 🔰 节点选择, 🇭🇰 Hong Kong, 🇨🇳 Taiwan, 🇯🇵 Japan, 🇰🇷 Korea, 🇺🇸 United States, 🇸🇬 Singapore, hidden=true ✈ Telegram = select, 🔰 节点选择, 🇭🇰 Hong Kong, 🇨🇳 Taiwan, 🇸🇬 Singapore, hidden=true 💻 Streaming = select, 🔰 节点选择, 🇭🇰 Hong Kong, 🇨🇳 Taiwan, 🇯🇵 Japan, 🇰🇷 Korea, 🇺🇸 United States, 🇸🇬 Singapore, hidden=true 📺 Netflix = select, 🔰 节点选择, 🇭🇰 Hong Kong, 🇨🇳 Taiwan, 🇯🇵 Japan, 🇰🇷 Korea, 🇺🇸 United States, 🇸🇬 Singapore, hidden=true 🎬 YouTube = select, 🔰 节点选择, 🇭🇰 Hong Kong, 🇨🇳 Taiwan, 🇯🇵 Japan, 🇰🇷 Korea, 🇺🇸 United States, 🇸🇬 Singapore, hidden=true 🎸 解锁网易云音乐 = select, DIRECT, policy-path=https://sub.store/download/UnblockNeteaseMusic 🇭🇰 Hong Kong = fallback, include-other-group="subscription1,subscription2", policy-regex-filter=(?=.*(香港|HK|(?i)Hong))^((?!(手游|游戏|倍|game)).)*$, timeout=3, interval=600, evaluate-before-use=true, hidden=true # 🇭🇰 Urltest = url-test, include-other-group="subscription1,subscription2", policy-regex-filter=(?=.*(香港|HK|(?i)Hong))^((?!(手游|游戏|倍|game)).)*$, interval=600, tolerance=100, evaluate-before-use=true, hidden=true # 🇭🇰 Load balance = load-balance, include-other-group="subscription1,subscription2", policy-regex-filter=(?=.*(香港|HK|(?i)Hong))^((?!(手游|游戏|倍|game)).)*$, interval=-1, tolerance=100, persistent=true, hidden=true 🇨🇳 Taiwan = fallback, include-other-group="subscription1,subscription2", policy-regex-filter=(?=.*(台湾|台灣|TW|(?i)Taiwan))^((?!(手游|游戏|倍|game)).)*$, timeout=3, interval=600, evaluate-before-use=true, hidden=true # 🇨🇳 Urltest = url-test, include-other-group="subscription1,subscription2", policy-regex-filter=(?=.*(台湾|台灣|TW|(?i)Taiwan))^((?!(手游|游戏|倍|game)).)*$, interval=600, tolerance=100, evaluate-before-use=true, hidden=true # 🇨🇳 Load balance = load-balance, include-other-group="subscription1,subscription2", policy-regex-filter=(?=.*(台湾|台灣|TW|(?i)Taiwan))^((?!(手游|游戏|倍|game)).)*$, interval=-1, tolerance=100, persistent=true, hidden=true 🇯🇵 Japan = fallback, include-other-group="subscription1,subscription2", policy-regex-filter=(?=.*(日本|JP|(?i)Japan))^((?!(手游|游戏|倍|game)).)*$, timeout=3, interval=600, evaluate-before-use=true, hidden=true # 🇯🇵 Urltest = url-test, include-other-group="subscription1,subscription2", policy-regex-filter=(?=.*(日本|JP|(?i)Japan))^((?!(手游|游戏|倍|game)).)*$, interval=600, tolerance=100, evaluate-before-use=true, hidden=true # 🇯🇵 Load balance = load-balance, include-other-group="subscription1,subscription2", policy-regex-filter=(?=.*(日本|JP|(?i)Japan))^((?!(手游|游戏|倍|game)).)*$, interval=-1, tolerance=100, persistent=true, hidden=true 🇰🇷 Korea = fallback, include-other-group="subscription1,subscription2", policy-regex-filter=(?=.*(韩国|韓國|南朝鲜|KR|(?i)Korean))^((?!(手游|游戏|倍|game)).)*$, timeout=3, interval=600, evaluate-before-use=true, hidden=true # 🇰🇷 Urltest = url-test, include-other-group="subscription1,subscription2", policy-regex-filter=(?=.*(韩国|韓國|南朝鲜|KR|(?i)Korean))^((?!(手游|游戏|倍|game)).)*$, interval=600, tolerance=100, evaluate-before-use=true, hidden=true # 🇰🇷 Load balance = load-balance, include-other-group="subscription1,subscription2", policy-regex-filter=(?=.*(韩国|韓國|南朝鲜|KR|(?i)Korean))^((?!(手游|游戏|倍|game)).)*$, interval=-1, tolerance=100, persistent=true, hidden=true 🇺🇸 United States = fallback, include-other-group="subscription1,subscription2", policy-regex-filter=(?=.*(美国|美國|US|(?i)States|American))^((?!(手游|游戏|倍|game)).)*$, timeout=3, interval=600, evaluate-before-use=true, hidden=true # 🇺🇸 Urltest = url-test, include-other-group="subscription1,subscription2", policy-regex-filter=(?=.*(美国|美國|US|(?i)States|American))^((?!(手游|游戏|倍|game)).)*$, interval=600, tolerance=100, evaluate-before-use=true, hidden=true # 🇺🇸 Load balance = load-balance, include-other-group="subscription1,subscription2", policy-regex-filter=(?=.*(美国|美國|US|(?i)States|American))^((?!(手游|游戏|倍|game)).)*$, interval=-1, tolerance=100, persistent=true, hidden=true 🇸🇬 Singapore = fallback, include-other-group="subscription1,subscription2", policy-regex-filter=(?=.*(新加坡|狮城|SG|(?i)Singapore))^((?!(手游|游戏|倍|game)).)*$, timeout=3, interval=600, evaluate-before-use=true, hidden=true # 🇸🇬 Urltest = url-test, include-other-group="subscription1,subscription2", policy-regex-filter=(?=.*(新加坡|狮城|SG|(?i)Singapore))^((?!(手游|游戏|倍|game)).)*$, interval=600, tolerance=100, evaluate-before-use=true, hidden=true # 🇸🇬 Load balance = load-balance, include-other-group="subscription1,subscription2", policy-regex-filter=(?=.*(新加坡|狮城|SG|(?i)Singapore))^((?!(手游|游戏|倍|game)).)*$, interval=-1, tolerance=100, persistent=true, hidden=true 🕹 FINAL = select, 🔰 节点选择, DIRECT # 该段定义请求处理规则 # 一个规则有三个基础部分: # 类型, 值, 策略 # 比如: DOMAIN-SUFFIX,apple.com, DIRECT # IP-CIDR, 192.168.0.0/16,ProxyA # 有 3 种基于域名的规则: "DOMAIN", "DOMAIN-SUFFIX" 和 "DOMAIN-KEYWORD" # 参数: # force-remote-dns: 可选 (默认值: false) # 如果某请求被该规则匹配, 且策略不是DIRECT. 那么 DNS 查询将永远在远端代理服务 # 器执行, 即使该请求由 Surge TUN 处理. # 更多信息请参见手册. # 有 2 种基于 IP 的规则: "IP-CIDR" and "GEOIP". # 如果是一个使用域名进行访问的请求,那么 Surge 将进行 DNS 查询以确认是否应该被 # 该规则匹配. 若 DNS 查询失败,将放弃规则匹配过程并直接给出错误。 # OPTIONS: # no-resolve: 可选 (默认值: false) # 如果是一个使用域名进行访问的请求,跳过该条规则,不触发 DNS 查询。 [Rule] # --- CUSTOM RULES --- # 网易云音乐 DOMAIN-SUFFIX,music.126.net,DIRECT # 屏蔽系统更新 RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/release/rule/Surge/SystemOTA/SystemOTA.list,🚫 系统更新 DOMAIN-SUFFIX,vercel.app,🔰 节点选择 // Sub-Store 的 Web 页面 IP-ASN,4134,DIRECT,no-resolve // China Telecom # HTTP3/QUIC 协议基于 UDP,部分地区 ISP 或线路 UDP 容易受到干扰或限速,屏蔽掉以阻止 HTTP 3 流量的 UDP 流量,强制回退到 TCP。 # REJECT-NO-DROP 表示不使用默认的自动丢包逻辑,这样 Surge 每次都会返回 ICMP Port Unreachable,应用会立刻回退而不是等超时。 AND,((PROTOCOL,UDP), (DEST-PORT,443)),REJECT-NO-DROP # Download (For MacOS) 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 # External Resources Update AND,((DOMAIN,raw.githubusercontent.com), (DOMAIN-SUFFIX,github.io), (USER-AGENT,Surge/*)),🕹 FINAL,notification-text="♻️External Resources Update",notification-interval=3600 # Blocking UDP Packets by Youtube and ins AND,((DOMAIN-SUFFIX,googlevideo.com), (DOMAIN-SUFFIX,gvt1.com), (DOMAIN-SUFFIX,cdninstagram.com), (PROTOCOL,UDP)),REJECT # --- RULE-SET --- # AdBlock RULE-SET,https://ruleset.skk.moe/List/non_ip/reject.conf,REJECT DOMAIN-SET,https://ruleset.skk.moe/List/domainset/reject.conf,REJECT-TINYGIF DOMAIN-SET,https://ruleset.skk.moe/List/domainset/reject_phishing.conf,REJECT RULE-SET,https://ruleset.skk.moe/List/ip/reject.conf,REJECT-DROP RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Advertising/Advertising_Resolve.list,REJECT DOMAIN-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Advertising/Advertising_Domain.list,REJECT RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Hijacking/Hijacking.list,REJECT RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Privacy/Privacy.list,REJECT DOMAIN-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Privacy/Privacy_Domain.list,REJECT # Direct RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Direct/Direct.list,DIRECT # ParakkeksDesktop RULE-SET,https://raw.githubusercontent.com/PoetryU/Scientist/master/QuantumultX/Filter/ParallelsDesktop.list,🚫 PD # NeteaseMusic RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/NetEaseMusic/NetEaseMusic.list,🎸 解锁网易云音乐 # iRingo (Optional) # DOMAIN-SET,https://raw.githubusercontent.com/VirgilClyne/iRingo/main/RuleSet/Look_Up.Wikipedia.list,🔰 节点选择 # DOMAIN-SET,https://raw.githubusercontent.com/VirgilClyne/iRingo/main/RuleSet/News.list,🔰 节点选择 # China SocialApp ip RULE-SET,https://raw.githubusercontent.com/PoetryU/Scientist/master/QuantumultX/Filter/CNsocial.list,🇨🇳 国内App # China RULE-SET,https://ruleset.skk.moe/List/non_ip/domestic.conf,DIRECT RULE-SET,https://ruleset.skk.moe/List/non_ip/direct.conf,DIRECT RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/ChinaMax/ChinaMax_Resolve.list,DIRECT DOMAIN-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/ChinaMax/ChinaMax_Domain.list,DIRECT RULE-SET,https://ruleset.skk.moe/List/ip/china_ip.conf,DIRECT # Apple(CDN) DOMAIN-SET,https://ruleset.skk.moe/List/domainset/apple_cdn.conf,DIRECT RULE-SET,https://ruleset.skk.moe/List/non_ip/apple_services.conf, 苹果服务 # Telegram RULE-SET,https://ruleset.skk.moe/List/non_ip/telegram.conf,✈ Telegram RULE-SET,https://ruleset.skk.moe/List/ip/telegram.conf,✈ Telegram # Netflix RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Netflix/Netflix.list,📺 Netflix # YouTube RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/YouTube/YouTube.list,🎬 YouTube # Streaming RULE-SET,https://ruleset.skk.moe/List/non_ip/stream.conf,💻 Streaming RULE-SET,https://ruleset.skk.moe/List/ip/stream.conf,💻 Streaming # Global RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Proxy/Proxy.list,🔰 节点选择 DOMAIN-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Proxy/Proxy_Domain.list,🔰 节点选择 RULE-SET,https://ruleset.skk.moe/List/non_ip/global_plus.conf,🔰 节点选择 RULE-SET,https://ruleset.skk.moe/List/non_ip/global.conf,🔰 节点选择 IP-CIDR,0.0.0.0/32,REJECT,no-resolve # Local Area Network & GeoIP China # 以下规则将触发本地 DNS 解析 OR,((RULE-SET,SYSTEM), (RULE-SET,LAN), (GEOIP,CN)),DIRECT FINAL,🕹 FINAL,dns-failed [Host] # 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 # Router Admin Panel amplifi.lan = server:syslib // Ubiquiti Amplifi Router router.synology.com = server:syslib // Synology Router sila.razer.com = server:syslib // Razer Sila Router router.asus.com = server:syslib // Asus Router routerlogin.net = server:syslib // Netgear Router orbilogin.com = server:syslib // Netgear Obri Router www.LinksysSmartWiFi.com = server:syslib // Linksys Router LinksysSmartWiFi.com = server:syslib // Linksys Router myrouter.local = server:syslib // Linksys Router www.miwifi.com = server:syslib // Xiaomi Mi WiFi Router miwifi.com = server:syslib // Xiaomi Mi WiFi Router mediarouter.home = server:syslib // Huawei Router tplogin.cn = server:syslib // TP-Link Router tplinklogin.net = server:syslib // TP-Link Router melogin.cn = server:syslib // MERCURY Router falogin.cn = server:syslib // FAST Router # CUSTOM HOST # 该段定义针对 HTTP 请求的 URL 重定向规则 # 有两种重定向方式: "header" 和 "302" # # Header 模式 # Surge 会修改发出的 http header,必要时还会修改 Host 字段。客户端将 # 感知不到这个重定向过程. 不支持重定向到一个 HTTPS 的地址。 # # 302 模式 # Surge 直接简单的返回一个 302 重定向回应。 [URL Rewrite] # CUSTOM URL header [MITM] # 跳过服务端证书验证 skip-server-cert-verify = true # MITM over HTTP/2 # MITM over HTTP/2:使用 HTTP/2 协议进行 MITM 解密,可在高并发下优化性能 h2 = true # 主机名 # Surge 仅会解密这里指定的主机名的请求,ios 系统和某些应用有严格的安全策略,仅信任某些特定的证书,对这些域名启动解密可能导致问题,如 *apple.com, *icloud.com. # 可使用通配符* 和? # 可使用前缀-将特定主机名排除 # 默认仅解密发往 443 端口的请求 # 可使用后缀:port 解密特定端口 # 可使用后缀:0解密所有端口 hostname = -*.apple.com, -*.icloud.com, -*.mzstatic.com, -*.crashlytics.com, -*.facebook.com, -*.instagram.com, www.google.com* [Script] Google CAPTCHA = type=http-response,pattern=^https:\/\/www\.google\.com(\.[a-z]+|)\/search\?q=,requires-body=1,debug=0,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/Google_CAPTCHA.js,max-size=0,timeout=10,ability=http-client-policy,argument=^(🇸🇬|🇭🇰)\s.*\d+$