# Surge莫离配置 # 配置地址:https://github.com/Moli-X/Resources/raw/main/Surge/SurgePRO.conf # GitHub仓库地址:https://github.com/Moli-X 发现BUG请反馈: @GodMoliibot # 相关频道: https://t.me/QuantX # 相关群组:https://t.me/Skill_XX # 图标备用📮✉️📪📬💫💬💥🔨🥼🚫🔰🙈🍎🎬📺🎱🍐🐝🦁💡🌵🐯🎸💻📽🌏🕹📡🦑🌟🐷🦒🐳🚦📵🎧💊🔓🚦🚥🐼⛔️🈲🌐🎯🖲️🐦🔞🎵📱🚀💳♻️🙈🍱🔂📦🔀⏱ [General] # 通用设置 # > 日志等级 loglevel = notify # > 跳过代理 skip-proxy = skip-proxy = %APPEND% www.boc.com,www.baidu.com,yunbusiness.ccb.com,wxh.wo.cn,gate.lagou.com,www.abchina.com.cn,www.shanbay.com,login-service.mobile-bank.psbc.com,mobile-bank.psbc.com,emm.deltaww.com.cn,127.0.0.1, 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10, 17.0.0.0/8, localhost, *.local, *.crashlytics.com # > Always Real IP Hosts always-real-ip = *.srv.nintendo.net, *.stun.playstation.net, xbox.*.microsoft.com, *.xboxlive.com http-listen = 0.0.0.0:8888 socks5-listen = 0.0.0.0:8889 # > 允许 Wi-Fi 访问iOS allow-wifi-access = true wifi-access-http-port = 6152 wifi-access-socks5-port = 6153 # > Internet 测试 URL internet-test-url = http://www.baidu.com # > 代理测速 URL proxy-test-url = http://1.1.1.1/generate_204 # > 测试超时(秒) test-timeout = 5 # > 排除简单主机名 exclude-simple-hostnames = true # > IPv6 支持 ipv6 = false # > 当遇到 REJECT 策略时返回错误页 show-error-page-for-reject = true # > Wi-Fi 不是主接口则使用SSID组的默认策略 use-default-policy-if-wifi-not-primary = false # > 增强版 Wi-Fi 助理 wifi-assist = true # > DNS 服务器 dns-server = 223.5.5.5, 114.114.114.114, 119.29.29.29, system encrypted-dns-server = https://223.5.5.5/dns-query, https://dns.alidns.com/dns-query read-etc-hosts = true # > etc/hosts 读取 DNS 记录 include-all-networks = false # > 路由防火墙 # 包含所有的网络请求 include-local-networks = false # 包含本地网络请求 geoip-maxmind-url = https://github.com/Hackl0us/GeoIP2-CN/raw/release/Country.mmdb # > 自定义 GeoIP 数据库 disable-geoip-db-auto-update = false # > GeoIP 禁用自动更新 udp-policy-not-supported-behaviour = false # > UDP IP 防泄漏 http-api-tls = false # > HTTP-API-TLS http-api-web-dashboard = true # > Web 控制器 hide-vpn-icon = false # > 隐藏 VPN 图标 allow-hotspot-access = false # > All Hybrid 网络并发 # all-hybrid = false # > 兼容模式 # compatibility-mode = false # > 允许个人热点使用代理 external-controller-access = 123456@0.0.0.0:6170 ipv6-vif = disabled [Replica] # ---抓取流量的过滤--- # 0 为关闭,1 为开启 # > 隐藏所有发往.Apple.com和.icloud.com的请求 hide-apple-request = 0 # > 隐藏崩溃追踪器(Crashlytics)请求 hide-crash-reporter-request = 1 # > 隐藏 UDP 会话 hide-udp = 0 # > 关键词过滤器 # none 关闭关键词过滤器 # whitelist 仅记录包含关键字的请求 # blacklist(仅记录不包含关键字的请求 # pattern 匹配通配符的请求 keyword-filter-type = none # > 关键词 keyword-filter = (null) [Proxy] # DIRECT = direct # REJECT = reject 国内直连 = direct 广告拦截 = reject [Proxy Group] # 订阅链接替换:[encode后的订阅链接] 自动选择 = url-test, policy-path=[encode后的订阅链接], update-interval=0, no-alert=0, hidden=0, include-all-proxies=1 海外服务 = select, 自动选择, 香港服务, 台湾服务, 美国服务, 日本服务, no-alert=0, hidden=0, include-all-proxies=1, update-interval=0 电报服务 = select, 海外服务, 香港服务, 美国服务, 日本服务, 台湾服务, no-alert=0, hidden=0, include-all-proxies=0 油管服务 = select, 香港服务, 美国服务, 日本服务, 台湾服务, no-alert=0, hidden=0, include-all-proxies=0 香港服务 = url-test, update-interval=0, policy-regex-filter=🇭🇰|香港|HK|湾仔|港仔|九龙|HongKong, no-alert=0, hidden=0, include-all-proxies=0, include-other-group=自动选择 台湾服务 = url-test, update-interval=0, policy-regex-filter=🇨🇳|台湾|TW|台北|新竹|台中|桃园|台南|高雄|花莲, no-alert=0, hidden=0, include-all-proxies=0, include-other-group=自动选择 美国服务 = url-test, update-interval=0, policy-regex-filter=🇺🇸|美国|US|华盛顿|俄勒冈|内华达|拉斯维加斯|蒙大纳|怀俄明州|菲尼克斯|阿尔伯克基|丹佛|哥伦比亚, no-alert=0, hidden=0, include-all-proxies=0, include-other-group=自动选择 日本服务 = url-test, update-interval=0, policy-regex-filter=🇯🇵|日本|JP|东京|大阪|名古屋|福冈|仙台|京都|川日|泉日|埼玉|沪日|深日, no-alert=0, hidden=0, include-all-proxies=0, include-other-group=自动选择 [Rule] DOMAIN-SUFFIX,cupid.iqiyi.com,REJECT DOMAIN,iyes.youku.com,广告拦截 URL-REGEX,^http:\/\/.*\.cp31\.ott\.cibntv\.net\/youku\/,REJECT-TINYGIF URL-REGEX,^https?:\/\/api\.m\.jd\.com\/client\.action\?functionId=start$,REJECT-TINYGIF OR,((DOMAIN,pgdt.gtimg.cn), (AND,((USER-AGENT,live4iphoneRel*), (IP-CIDR,0.0.0.0/0,no-resolve)))),REJECT-DROP AND,((PROTOCOL,UDP), (DEST-PORT,443)),REJECT-NO-DROP AND,((DOMAIN,iosapps.itunes.apple.com), (SCRIPT,Apple策略优选)),海外服务 AND,((PROTOCOL,UDP), (DOMAIN-SUFFIX,googlevideo.com)),REJECT-NO-DROP DOMAIN,app-site-association.cdn-apple.com,REJECT DOMAIN,ocsp.apple.com,REJECT RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Whatsapp/Whatsapp.list,海外服务 RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Facebook/Facebook.list,美国服务 RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/GitHub/GitHub.list,香港服务 RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/TikTok/TikTok.list,美国服务 RULE-SET,https://raw.githubusercontent.com/Moli-X/Resources/main/Surge/Filter/OpenAI.list,日本服务 RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/WeChat/WeChat.list,国内直连 RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Spotify/Spotify.list,美国服务 RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/AppleProxy/AppleProxy.list,海外服务 RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Telegram/Telegram.list,电报服务 RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Twitter/Twitter.list,海外服务 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/ChinaMedia/ChinaMedia.list,国内直连 RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Google/Google.list,海外服务 RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/China/China.list,国内直连 GEOIP,CN,国内直连 FINAL,海外服务 [Host] # ---定义本地DNS记录--- # 该功能等同于 /etc/hosts,加上了泛解析和别名支持。 # > 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 # > 淘宝 *.taobao.com = server:223.5.5.5 # > 天猫 *.tmall.com = server:223.5.5.5 # > 阿里云 *.alicdn.com = server:223.5.5.5 *.aliyun.com = server:223.5.5.5 # > 腾迅 *.tencent.com = server:119.29.29.29 # > 腾讯QQ *.qq.com = server:119.29.29.29 # > 微信 *.weixin.com = server:119.29.29.29 *.qpic.cn = server:119.29.29.29 # > 京东 *.jd.com = server:119.29.29.29 # > 哔哩哔喱 *.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 # > 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 [URL Rewrite] ^https?:\/\/upos-hz-mirrorakam\.akamaized\.net\/(.*) https://upos-sz-mirrorcos.bilivideo.com/$1 302 # 有两种重定向方式: 'header' 和 '302' # 建议用模块 # Redirect Google Maps Service ^https?:\/\/(ditu|maps).google\.cn https://maps.google.com 302 # jingdong ^https?:\/\/(www.)?jd\.com\/ https://www.jd.com/ 302 [MITM] skip-server-cert-verify = true tcp-connection = true h2 = true hostname = %APPEND% sub.store, %INSERT% boxjs.com, boxjs.net [Script] [Panel] 配置重载 = script-name=配置重载,title=配置重载,content=配置重载,style=info,update-interval=-1