#!MANAGED-CONFIG https://raw.githubusercontent.com/HotKids/Rules/master/Surge/Profile.conf interval=43200 [General] # 通用设置 # > 增强版 Wi-Fi 助理 # 在 Wi-Fi 网络不佳时尝试使用数据网络建立连接,请仅当使用不限量的数据流量时开启 wifi-assist = false # > Internet 测试 URL internet-test-url = https://connectivitycheck.platform.hicloud.com/generate_204 # > 代理测速 URL proxy-test-url = https://cp.cloudflare.com/generate_204 # > 测试超时(秒) test-timeout = 5 # > 自定义 GeoIP 数据库 geoip-maxmind-url = https://raw.githubusercontent.com/Loyalsoldier/geoip/release/Country.mmdb # > IPv6 支持 ipv6 = false # 允许 IPv6 通过 Surge VIF(可选:off,auto,always) ipv6-vif = auto # > QUIC / HTTP3 自适应回退 # 遵循代理策略的 block-quic;新内核 auto 对支持 UDP 的代理使用 adaptive # 先尝试回退 TCP,无法回退时放行 QUIC;DIRECT 不拦截,旧内核沿用其 auto 行为 block-quic = per-policy # > 允许 Wi-Fi 访问(iOS) # 若允许远程访问将 false 改为 true allow-wifi-access = true wifi-access-http-port = 6152 wifi-access-socks5-port = 6153 # > 允许 Wi-Fi 访问(macOS) # 若允许远程访问将 127.0.0.1 改为 0.0.0.0 http-listen = 0.0.0.0:6152 socks5-listen = 0.0.0.0:6153 # > 远程控制器 # 允许外部控制器访问 Surge,Surge Dashboard 或 Surge CLI 进行管理控制 external-controller-access = 127.0.0.1:6170 http-api = HotKids@127.0.0.1:6171 http-api-mcp = true http-api-tls = false # > HTTP-API Web Dashboard # Safari 输入 127.0.0.1:6171,填入 HTTP-API 密码即可 http-api-web-dashboard = true # > 跳过代理 # 跳过某个域名或者 IP 段,这些目标主机将不会由 Surge Proxy 处理 # macOS 版本中,如果启用了 Set as System Proxy,这些值会被写入到系统网络代理设置 skip-proxy = localhost, *.local, *.lan, *.home, *.home.arpa, *.portal.*, captive.*, 10.0.0.0/8, 100.64.0.0/10, 127.0.0.0/8, 169.254.0.0/16, 172.16.0.0/12, 192.168.0.0/16, ::1/128, fe80::/10 # > 排除简单主机名 exclude-simple-hostnames = true # DNS 设置 # > DNS 服务器 # 兜底 DNS,加密 DNS 失败时使用 dns-server = 119.29.29.29, 223.5.5.5 # > 加密 DNS # 查询代理域名时跟随出站策略走代理,防止 DNS 泄露 encrypted-dns-server = https://doh.pub/dns-query, https://dns.alidns.com/dns-query encrypted-dns-follow-outbound-mode = true # > 加密 DNS 证书验证 encrypted-dns-skip-cert-verification = false # > 从 /etc/hosts 读取 DNS 记录 read-etc-hosts = true # > Hijack DNS # 劫持所有发往 53 端口的 DNS 查询,防止设备使用硬编码 DNS hijack-dns = *:53 # > Fake-IP 池 # 旁路由模式推荐开启 # fake-ip-range = 198.18.0.0/15 # 高级设置 # > 日志级别 loglevel = notify # > 当遇到 REJECT 策略时返回错误页 show-error-page-for-reject = true # > Always Real IP Hosts # 要求 Surge 返回真正的 IP 地址,而不是 Fake-IP # DNS 数据包将被转发到上游 DNS 服务器 always-real-ip = *.lan, *.local, *.localhost, *.home.arpa, *.msftncsi.com, *.msftconnecttest.com, *.srv.nintendo.net, *.stun.playstation.net, xbox.*.microsoft.com, *.xboxlive.com, *.turn.twilio.com, *.stun.twilio.com, stun.syncthing.net, stun.*, *.stun.*.*, 127.*.*.*.sslip.io, 127-*-*-*.sslip.io, *.127.*.*.*.sslip.io, *-127-*-*-*.sslip.io, 127.*.*.*.nip.io, 127-*-*-*.nip.io, *.127.*.*.*.nip.io, *-127-*-*-*.nip.io, time.*.com, time.*.gov, time.*.apple.com, ntp.*.com, *.mcdn.bilivideo.cn, localhost.*.qq.com, connectivitycheck.gstatic.com, captive.apple.com, *.spotify.com, *.battlenet.com.cn, *.blizzard.com # > TCP Force HTTP Hosts # 让 Surge 把 TCP 连接当作 HTTP 请求来处理 # Surge HTTP 引擎将处理这些请求,所有的高级功能如捕获、重写和脚本等都可以使用 force-http-engine-hosts = *.ott.cibntv.net, *.tc.qq.com, *.douyinvod.com, *.douyin.com, api*.amemv.com, *.xhscdn.com, *.xiaohongshu.com, *.bilibili.com, *.kuaishou.com, *.jd.com, *.pinduoduo.com, *.music.163.com, wmapi.meituan.com # > VIF Included Routes # 默认情况下,Surge VIF 接口会声明自己是默认路由 # 由于 Wi-Fi 接口的路由较小,有些流量可能不会通过 Surge VIF 接口 # tun-excluded-routes = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12 # > 路由防火墙 # include-all-networks = false # 允许 Surge VIF 接管局域网转发流量,使旁路由设备的 DNS 查询可被 hijack-dns 捕获 # include-local-networks = true #!MACOS-ONLY # > UDP 优先级 udp-priority = true # > UDP 策略不支持时的行为 # 如果没有代理服务器支持 UDP 转发,可修改为 direct 或注释此行 # 但需注意同一目标主机名 TCP 请求与 UDP 请求的源地址不同所造成的隐私及安全风险 udp-policy-not-supported-behaviour = REJECT [Host] [Ponte] server-proxy-name = 🏠 Gateway client-proxy-name = 🏠 Gateway [Proxy] 🔘 DIRECT = direct ⛔️ REJECT = reject 📛 REJECT-DROP = reject-drop 🚫 REJECT-NO-DROP = reject-no-drop 💢 REJECT-TINYGIF = reject-tinygif [Proxy Group] # Proxy 🔰 Proxy = select,🇭🇰 Hong Kong,🇨🇳 Taiwan,🇸🇬 Singapore,🇯🇵 Japan,🇺🇸 America,🇺🇳 Server,🔘 DIRECT, icon-url=https://raw.githubusercontent.com/HotKids/Rules/master/Quantumult/X/Images/Color/Outbound.png # Streaming Global 🎬 Streaming = select,🔰 Proxy,🇭🇰 Hong Kong,🇨🇳 Taiwan,🇸🇬 Singapore,🇯🇵 Japan,🇺🇸 America,🇺🇳 Server, icon-url=https://raw.githubusercontent.com/HotKids/Rules/master/Quantumult/X/Images/Color/Streaming.png # CNTV APAC 📺 CNTV = select,🔘 DIRECT,🇨🇳 Taiwan,🇭🇰 Hong Kong, icon-url=https://raw.githubusercontent.com/HotKids/Rules/master/Quantumult/X/Images/Color/StreamingCN.png # Apple # > Apple TV 🍏 Apple TV = select,🔘 DIRECT,🔰 Proxy,🇺🇸 America, icon-url=https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/Apple_2.png # > Apple Services 🍎 Apple = select,🔘 DIRECT,🔰 Proxy,🇺🇸 America,🇯🇵 Japan, icon-url=https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/Apple.png # Google 🔍 Google = select,🇺🇸 America,🔰 Proxy, icon-url=https://raw.githubusercontent.com/HotKids/Rules/master/Quantumult/X/Images/Color/Google.png # Telegram 📬 Telegram = select,🔰 Proxy,🇸🇬 Singapore,🔘 DIRECT, icon-url=https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/Telegram.png # AIGC 🤖 AIGC = select,🇺🇸 America,🇯🇵 Japan,🇸🇬 Singapore,🔰 Proxy, icon-url=https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/ChatGPT.png # Crypto 🪙 Crypto = select,🇺🇸 America,🔰 Proxy,🔘 DIRECT, icon-url=https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/Cryptocurrency_3.png # Finance 💳 Finance = select,🇺🇸 America,🔰 Proxy,🔘 DIRECT, icon-url=https://raw.githubusercontent.com/HotKids/Rules/master/Quantumult/X/Images/Color/Finance.png # Mail 📧 Mail = select,🔰 Proxy,🔘 DIRECT, icon-url=https://raw.githubusercontent.com/HotKids/Rules/master/Quantumult/X/Images/Color/Email.png # Speedtest ⏱️ Speedtest = select, 🔰 Proxy, 🔘 DIRECT, include-other-group=🇺🇳 Server, icon-url=https://raw.githubusercontent.com/HotKids/Rules/master/Quantumult/X/Images/Color/Speed.png # FRP 🏠 Gateway = select,🔘 DIRECT,🔰 Proxy, icon-url=https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/Back.png # Adblock 🚧 AdGuard = select, policy-path = https://raw.githubusercontent.com/HotKids/Rules/master/Surge/ADVERTISING.list, icon-url=https://raw.githubusercontent.com/HotKids/Rules/master/Quantumult/X/Images/Color/Block.png # Nodes 🇺🇳 Server = select,include-all-proxies=true, icon-url=https://raw.githubusercontent.com/HotKids/Rules/master/Quantumult/X/Images/Color/Club.png // 🇺🇳 Server = select,policy-path=https://hotkids.me, icon-url=https://raw.githubusercontent.com/HotKids/Rules/master/Quantumult/X/Images/Color/Club.png # Area 🇭🇰 Hong Kong = smart, include-other-group=🇺🇳 Server, policy-regex-filter=(?i)(?:🇭🇰|香港|Hong Kong|\b(?:HK|HKG)\d*\b), interval=600, evaluate-before-use=true, hidden=1, no-alert=1, include-all-proxies=0, icon-url=https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/Hong_Kong.png 🇨🇳 Taiwan = smart, include-other-group=🇺🇳 Server, policy-regex-filter=(?i)(?:🇨🇳|🇹🇼|台湾|Taiwan|\b(?:TW|TWN)\d*\b), interval=600, evaluate-before-use=true, hidden=1, no-alert=1, include-all-proxies=0, icon-url=https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/Taiwan.png 🇸🇬 Singapore = smart, include-other-group=🇺🇳 Server, policy-regex-filter=(?i)(?:🇸🇬|新加坡|Singapore|\b(?:SG|SGP)\d*\b), interval=600, evaluate-before-use=true, hidden=1, no-alert=1, include-all-proxies=0, icon-url=https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/Singapore.png 🇯🇵 Japan = smart, include-other-group=🇺🇳 Server, policy-regex-filter=(?i)(?:🇯🇵|日本|Japan|\b(?:JP|JPN)\d*\b), interval=600, evaluate-before-use=true, hidden=1, no-alert=1, include-all-proxies=0, icon-url=https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/Japan.png 🇺🇸 America = smart, include-other-group=🇺🇳 Server, policy-regex-filter=(?i)(?:🇺🇸|美国|United States|\b(?:US|USA)\d*\b), interval=600, evaluate-before-use=true, hidden=1, no-alert=1, include-all-proxies=0, icon-url=https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/United_States.png [Rule] # 标准 SSH 端口 AND,((DEST-PORT,22),(PROTOCOL,TCP)),🔘 DIRECT # Unbreak 后续规则修正,修复因规则拦截或分流不当导致的功能异常 RULE-SET,https://raw.githubusercontent.com/HotKids/Rules/master/Surge/RULE-SET/Bypass.list,🔘 DIRECT RULE-SET,https://raw.githubusercontent.com/HotKids/Rules/master/Surge/RULE-SET/Reroute.list,🔰 Proxy # Private 私有网络 DOMAIN-SET,https://raw.githubusercontent.com/Loyalsoldier/surge-rules/release/private.txt,🔘 DIRECT # HTTPDNS 请求/流量阻止 # RULE-SET,https://raw.githubusercontent.com/VirgilClyne/GetSomeFries/main/ruleset/HTTPDNS.Block.list,🚧 AdGuard # Advertising 广告 DOMAIN-SET,https://raw.githubusercontent.com/Loyalsoldier/surge-rules/release/reject.txt,🚧 AdGuard,extended-matching RULE-SET,https://raw.githubusercontent.com/HotKids/Rules/master/Surge/RULE-SET/Block.list,🚧 AdGuard,extended-matching # Phishing 钓鱼网站 DOMAIN-SET,https://raw.githubusercontent.com/HotKids/Rules/master/Surge/RULE-SET/Phishing.list,🚧 AdGuard,extended-matching # Bogus IP NXDOMAIN 劫持/僵尸网络 C2 RULE-SET,https://raw.githubusercontent.com/HotKids/Rules/master/Surge/RULE-SET/Bogus.list,📛 REJECT-DROP,no-resolve,pre-matching # Global Area Network # > Streaming by Region # >> Streaming TW RULE-SET,https://raw.githubusercontent.com/HotKids/Rules/master/Surge/RULE-SET/Streaming_TW.list,🇨🇳 Taiwan,extended-matching # >> Streaming JP RULE-SET,https://raw.githubusercontent.com/HotKids/Rules/master/Surge/RULE-SET/Streaming_JP.list,🇯🇵 Japan,extended-matching # >> Streaming US RULE-SET,https://raw.githubusercontent.com/HotKids/Rules/master/Surge/RULE-SET/Streaming_US.list,🇺🇸 America,extended-matching # > Streaming RULE-SET,https://raw.githubusercontent.com/HotKids/Rules/master/Surge/RULE-SET/Streaming.list,🎬 Streaming,extended-matching # > CNTV(适用于 iQIYI Intl,WeTV,Bilibili 等大陆在港台东南亚提供服务的流媒体服务) RULE-SET,https://raw.githubusercontent.com/HotKids/Rules/master/Surge/RULE-SET/CNTV.list,📺 CNTV,extended-matching # Global 全球代理规则 # > AIGC RULE-SET,https://raw.githubusercontent.com/HotKids/Rules/master/Surge/RULE-SET/Gemini.list,🔍 Google,extended-matching RULE-SET,https://raw.githubusercontent.com/HotKids/Rules/master/Surge/RULE-SET/GenAI.list,🤖 AIGC,extended-matching # > Apple # >> iCloud Private Relay RULE-SET,https://raw.githubusercontent.com/HotKids/Rules/master/Surge/RULE-SET/Apple/iCloud.PrivateRelay.list,🔰 Proxy,extended-matching # >> Apple News RULE-SET,https://raw.githubusercontent.com/HotKids/Rules/master/Surge/RULE-SET/Apple/Apple%20News.list,🇺🇸 America,extended-matching # >> Apple TV RULE-SET,https://raw.githubusercontent.com/HotKids/Rules/master/Surge/RULE-SET/Apple/Apple%20TV.list,🍏 Apple TV,extended-matching # >> Apple Services RULE-SET,https://raw.githubusercontent.com/HotKids/Rules/master/Surge/RULE-SET/Apple/Apple%20CN.list,🔘 DIRECT,extended-matching RULE-SET,https://raw.githubusercontent.com/HotKids/Rules/master/Surge/RULE-SET/Apple/Apple.list,🍎 Apple,extended-matching # > Google RULE-SET,https://raw.githubusercontent.com/HotKids/Rules/master/Surge/RULE-SET/Google.list,🔍 Google,extended-matching # > Telegram RULE-SET,https://raw.githubusercontent.com/HotKids/Rules/master/Surge/RULE-SET/Telegram.list,📬 Telegram,extended-matching # > Crypto RULE-SET,https://raw.githubusercontent.com/HotKids/Rules/master/Surge/RULE-SET/Crypto.list,🪙 Crypto,extended-matching # > Finance RULE-SET,https://raw.githubusercontent.com/HotKids/Rules/master/Surge/RULE-SET/Finance.list,💳 Finance,extended-matching # > Mail RULE-SET,https://raw.githubusercontent.com/HotKids/Rules/master/Surge/RULE-SET/Spark.list,📧 Mail,extended-matching # > Speedtest DOMAIN-SET,https://raw.githubusercontent.com/HotKids/Rules/master/Surge/RULE-SET/Speedtest.list,⏱️ Speedtest,extended-matching # Global (DNS Cache Pollution) / (IP Blackhole) / (Region-Restricted Access Denied) / (Network Jitter) DOMAIN-SET,https://raw.githubusercontent.com/Loyalsoldier/surge-rules/release/proxy.txt,🔰 Proxy,extended-matching # China Area Network DOMAIN-SET,https://raw.githubusercontent.com/Loyalsoldier/surge-rules/release/direct.txt,🔘 DIRECT RULE-SET,https://raw.githubusercontent.com/Loyalsoldier/surge-rules/release/cncidr.txt,🔘 DIRECT,no-resolve RULE-SET,https://raw.githubusercontent.com/VirgilClyne/GetSomeFries/main/ruleset/ASN.China.list,🔘 DIRECT,no-resolve # GEOIP,CN,🔘 DIRECT # Surge 的自动 REJECT 保护丢包,防止应用循环请求 IP-CIDR,0.0.0.0/32,REJECT,no-resolve # Local Area Network RULE-SET,LAN,🔘 DIRECT,no-resolve # Final FINAL,🔰 Proxy,dns-failed [Script] # Module ## https://github.com/HotKids/Rules/tree/master/Surge/Module # > macOS Client ## https://raw.githubusercontent.com/HotKids/Rules/master/Surge/Module/Client.sgmodule # > General Enhanced ## https://raw.githubusercontent.com/HotKids/Rules/master/Surge/Module/Profile.sgmodule # > DNS Enhanced(个人不建议使用) ## https://raw.githubusercontent.com/VirgilClyne/GetSomeFries/main/sgmodule/DNS.sgmodule # > HTTPDNS Block ## https://raw.githubusercontent.com/VirgilClyne/GetSomeFries/main/sgmodule/HTTPDNS.Block.sgmodule # > AdBlock Enhanced ## https://ruleset.skk.moe/Modules/sukka_enhance_adblock.sgmodule # > Bilibili(或使用本仓库 fork 版本) ## https://raw.githubusercontent.com/kokoryh/Sparkle/master/release/surge/module/bilibili.sgmodule # > NetEase Cloud Music(或使用本仓库 fork 版本) ## https://raw.githubusercontent.com/Keywos/rule/main/script/wy/wy.sgmodule # > RedNote(或使用本仓库 fork 版本) ## https://raw.githubusercontent.com/fmz200/wool_scripts/main/Surge/module/split/partX/Xiaohongshu.sgmodule # > Weibo(或使用本仓库 fork 版本) ## https://raw.githubusercontent.com/fmz200/wool_scripts/main/Surge/module/weibo.module # > JD Historical Price ## https://raw.githubusercontent.com/githubdulong/Script/master/Surge/jd_price2.sgmodule # > IP Security Monitor Panel ## https://raw.githubusercontent.com/HotKids/Rules/master/Surge/Module/Pannel/ip-security-panel.sgmodule # > Streaming & AI Service Monitor Panel ## https://raw.githubusercontent.com/HotKids/Rules/master/Surge/Module/Pannel/media-check-panel.sgmodule ### 更多模块请参阅 NSRingo/iRingo BiliUniverse/Universe VirgilClyne/GetSomeFries QingRex/LoonKissSurge 等项目。 [MITM] skip-server-cert-verify = true h2 = true ca-passphrase = Dler ca-p12 = MIIDGgIBAzCCAuAGCSqGSIb3DQEHAaCCAtEEggLNMIICyTCCAb8GCSqGSIb3DQEHBqCCAbAwggGsAgEAMIIBpQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQYwDgQI5e4W8st2yMMCAggAgIIBeBDhcB5oCpEtPyamF2QSSZMoKnIQ9idB7/spS4BgYMq/zDT8c7SDSKM746+4D98feqkJmAYFUWlXtXOHwSR8QlFad9dTYw4SulHDpDAVr/+da6iCX+LeQuducormCI6xVcmpfZ8qvHWzpfHy5mrKxkuyj5OHlehvYOedDZ9P9s9ME2qZFsffKC4kk398QPjoBMLCb73m7QcFdzdus7NuVAd/kYZRww7ODcXcb5a45Yv4NeRwRjnVT8eCgjGXjJXQgJPAtyAWPLW+o1uS132Qdkmg+8EjwuxL/lOu3rLKh0gWWUFHcxv2rg4OcezyoZuv70zs3A8Ju3wmQ6oZuakeRuRyKu6+9BtgOqxnoBwvTMCI4saY8E318DWZjBOzg9N2vPOhKDeoh8ES9TAbRlcp5Bnp5TWrPhae+XeHlHde5KCr3kjB15/DAhrlh7+ht18I/p1shnRKAd1tH6p62to51j9mSHNxOFFCbBPiFqBSnPmuV2SSOOYHcjUwggECBgkqhkiG9w0BBwGggfQEgfEwge4wgesGCyqGSIb3DQEMCgECoIG0MIGxMBwGCiqGSIb3DQEMAQMwDgQI/FfHqSBxFUoCAggABIGQIJa8eopsdqunR4ZwxWt/ThhdkRw2LFHTbgg5jWdAUQfK2b+I6+Wk9Dimdb2xGzAaYcAVt3ArbfuDTjDUTI4m3pzXBe/edyeXagr6i6DgM9TluB4OsG6hC/MFtF3rvqnCT3DGf5b48hSj0Y5OfJy+iFXmasxtwVIf4pFFylXOOJeJdQry1NgImb0nZwsS8NJAMSUwIwYJKoZIhvcNAQkVMRYEFHijHPCciGG5pbv+qBYZvjpHBIFnMDEwITAJBgUrDgMCGgUABBSxzZGBSpKB8R5FQ6wdiWxFka+xcgQIxB+kS2hfUpkCAggA