# Surge 回国配置 (Return-to-China Configuration) # 适用于海外用户通过中国代理访问国内服务 # Rule sets sourced from https://github.com/SukkaW/Surge (ruleset.skk.moe) [General] loglevel = notify 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-server = 223.5.5.5, 114.114.114.114, 119.29.29.29 encrypted-dns-server = https://223.5.5.5/dns-query internet-test-url = http://www.baidu.com proxy-test-url = http://cp.cloudflare.com/generate_204 test-timeout = 3 ipv6 = false show-error-page-for-reject = true [Proxy] # 请将以下代理替换为您的中国服务器信息,然后将名称添加到下方代理组 # Please replace the example below with your China server details, then add the name to the group # ChinaServer = http, server-address, port, username, password [Proxy Group] # 中国代理组 - 用于路由国内流量(将您的代理名称添加到此列表) # China proxy group - add your proxy name(s) to this selector, e.g.: China = select, ChinaServer, DIRECT China = select, DIRECT [Rule] # --- 广告拦截 / Ad Blocking --- # (SukkaW/Surge: domainset/reject + non_ip/reject + ip/reject) DOMAIN-SET,https://ruleset.skk.moe/List/domainset/reject.conf,REJECT,extended-matching,pre-matching DOMAIN-SET,https://ruleset.skk.moe/List/domainset/reject_extra.conf,REJECT,pre-matching RULE-SET,https://ruleset.skk.moe/List/non_ip/reject.conf,REJECT,extended-matching,pre-matching RULE-SET,https://ruleset.skk.moe/List/non_ip/reject-no-drop.conf,REJECT-NO-DROP,extended-matching,pre-matching RULE-SET,https://ruleset.skk.moe/List/non_ip/reject-drop.conf,REJECT-DROP,pre-matching RULE-SET,https://ruleset.skk.moe/List/ip/reject.conf,REJECT-DROP # --- 国内域名 → 中国代理 / Chinese Domestic Domains → China Proxy --- # (SukkaW/Surge: non_ip/domestic + non_ip/apple_cn) RULE-SET,https://ruleset.skk.moe/List/non_ip/domestic.conf,China,extended-matching RULE-SET,https://ruleset.skk.moe/List/non_ip/apple_cn.conf,China,extended-matching RULE-SET,https://ruleset.skk.moe/List/non_ip/neteasemusic.conf,China,extended-matching # --- 国内 IP → 中国代理 / Chinese Domestic IPs → China Proxy --- # (SukkaW/Surge: ip/domestic + ip/china_ip) RULE-SET,https://ruleset.skk.moe/List/ip/domestic.conf,China RULE-SET,https://ruleset.skk.moe/List/ip/china_ip.conf,China # --- 局域网 / LAN --- RULE-SET,LAN,DIRECT # --- 兜底规则:其余流量直连 / Final: all other traffic goes direct --- GEOIP,CN,China FINAL,DIRECT,dns-failed [Host] localhost = 127.0.0.1