[General]
# 基本设置
bypass-system = true
skip-proxy = 127.0.0.1, 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10, localhost, *.local
bypass-tun = 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.0.0.0/24, 192.0.2.0/24, 192.88.99.0/24, 192.168.0.0/16, 198.18.0.0/15, 198.51.100.0/24, 203.0.113.0/24, 224.0.0.0/4, 255.255.255.255/32
dns-server = 223.5.5.5, 119.29.29.29
ipv6 = false
log-level = notify

[Rule]
# ======== TEMU 电商相关服务 ========
DOMAIN-SUFFIX,temu.com,PROXY
DOMAIN,temu.com,PROXY
DOMAIN-KEYWORD,temu,PROXY

# ======== SHEIN 电商相关服务 ========
DOMAIN-SUFFIX,shein.com,PROXY
DOMAIN,shein.com,PROXY
DOMAIN-SUFFIX,shein.net,PROXY
DOMAIN-SUFFIX,sheinside.com,PROXY

# ======== 亚马逊相关服务 ========
DOMAIN-SUFFIX,amazon.com,PROXY
DOMAIN,amazon.com,PROXY
DOMAIN-SUFFIX,amazon.co.uk,PROXY
DOMAIN-SUFFIX,amazon.de,PROXY
DOMAIN-SUFFIX,amazon.fr,PROXY
DOMAIN-SUFFIX,amazon.it,PROXY
DOMAIN-SUFFIX,amazon.es,PROXY
DOMAIN-SUFFIX,amazon.co.jp,PROXY
DOMAIN-SUFFIX,amazon.ca,PROXY
DOMAIN-SUFFIX,amazon.cn,PROXY
DOMAIN-SUFFIX,amazon.in,PROXY
DOMAIN-SUFFIX,amazon.com.au,PROXY
DOMAIN-SUFFIX,amazonaws.com,PROXY
DOMAIN-SUFFIX,amzn.com,PROXY
DOMAIN-SUFFIX,amazonpay.com,PROXY
DOMAIN-KEYWORD,amazon,PROXY

# ======== Google 中国服务 ========
DOMAIN-SUFFIX,services.googleapis.cn,PROXY
DOMAIN-SUFFIX,xn--ngstr-lra8j.com,PROXY

# ======== Apple 服务 ========
DOMAIN,safebrowsing.urlsec.qq.com,DIRECT
DOMAIN,safebrowsing.googleapis.com,DIRECT
DOMAIN,developer.apple.com,PROXY
DOMAIN-SUFFIX,digicert.com,PROXY
DOMAIN,ocsp.apple.com,PROXY
DOMAIN,ocsp.comodoca.com,PROXY
DOMAIN,ocsp.usertrust.com,PROXY
DOMAIN,ocsp.sectigo.com,PROXY
DOMAIN,ocsp.verisign.net,PROXY
DOMAIN-SUFFIX,apple-dns.net,PROXY
DOMAIN,testflight.apple.com,PROXY
DOMAIN,sandbox.itunes.apple.com,PROXY
DOMAIN,itunes.apple.com,PROXY
DOMAIN-SUFFIX,apps.apple.com,PROXY
DOMAIN-SUFFIX,blobstore.apple.com,PROXY
DOMAIN,cvws.icloud-content.com,PROXY

# Apple 国内直连
DOMAIN-SUFFIX,mzstatic.com,DIRECT
DOMAIN-SUFFIX,itunes.apple.com,DIRECT
DOMAIN-SUFFIX,icloud.com,DIRECT
DOMAIN-SUFFIX,icloud-content.com,DIRECT
DOMAIN-SUFFIX,me.com,DIRECT
DOMAIN-SUFFIX,aaplimg.com,DIRECT
DOMAIN-SUFFIX,cdn20.com,DIRECT
DOMAIN-SUFFIX,cdn-apple.com,DIRECT
DOMAIN-SUFFIX,akadns.net,DIRECT
DOMAIN-SUFFIX,akamaiedge.net,DIRECT
DOMAIN-SUFFIX,edgekey.net,DIRECT
DOMAIN-SUFFIX,mwcloudcdn.com,DIRECT
DOMAIN-SUFFIX,mwcname.com,DIRECT
DOMAIN-SUFFIX,apple.com,DIRECT
DOMAIN-SUFFIX,apple-cloudkit.com,DIRECT
DOMAIN-SUFFIX,apple-mapkit.com,DIRECT

# ======== 国内网站直连 ========
DOMAIN-SUFFIX,126.com,DIRECT
DOMAIN-SUFFIX,126.net,DIRECT
DOMAIN-SUFFIX,127.net,DIRECT
DOMAIN-SUFFIX,163.com,DIRECT
DOMAIN-SUFFIX,360buyimg.com,DIRECT
DOMAIN-SUFFIX,36kr.com,DIRECT
DOMAIN-SUFFIX,acfun.tv,DIRECT
DOMAIN-SUFFIX,air-matters.com,DIRECT
DOMAIN-SUFFIX,aixifan.com,DIRECT
DOMAIN-KEYWORD,alicdn,DIRECT
DOMAIN-KEYWORD,alipay,DIRECT
DOMAIN-KEYWORD,taobao,DIRECT
DOMAIN-SUFFIX,amap.com,DIRECT
DOMAIN-SUFFIX,autonavi.com,DIRECT
DOMAIN-KEYWORD,baidu,DIRECT
DOMAIN-SUFFIX,bdimg.com,DIRECT
DOMAIN-SUFFIX,bdstatic.com,DIRECT
DOMAIN-SUFFIX,bilibili.com,DIRECT
DOMAIN-SUFFIX,bilivideo.com,DIRECT
# ... (其他国内域名规则，保持 DIRECT)

# ======== 广告屏蔽 ========
DOMAIN-KEYWORD,admarvel,REJECT
DOMAIN-KEYWORD,admaster,REJECT
DOMAIN-KEYWORD,adsage,REJECT
DOMAIN-KEYWORD,adsmogo,REJECT
DOMAIN-KEYWORD,adsrvmedia,REJECT
DOMAIN-KEYWORD,adwords,REJECT
DOMAIN-KEYWORD,adservice,REJECT
DOMAIN-SUFFIX,appsflyer.com,REJECT
DOMAIN-KEYWORD,domob,REJECT
DOMAIN-SUFFIX,doubleclick.net,REJECT
# ... (其他广告屏蔽规则)

# ======== 国外网站代理 ========
DOMAIN-SUFFIX,9to5mac.com,PROXY
DOMAIN-SUFFIX,abpchina.org,PROXY
DOMAIN-SUFFIX,adblockplus.org,PROXY
DOMAIN-SUFFIX,adobe.com,PROXY
DOMAIN-SUFFIX,akamaized.net,PROXY
# ... (其他国外网站规则)

# ======== 抗 DNS 污染 ========
DOMAIN-KEYWORD,google,PROXY
DOMAIN-KEYWORD,gmail,PROXY
DOMAIN-KEYWORD,youtube,PROXY
DOMAIN-KEYWORD,facebook,PROXY
DOMAIN-SUFFIX,fb.me,PROXY
DOMAIN-SUFFIX,fbcdn.net,PROXY
DOMAIN-KEYWORD,twitter,PROXY
DOMAIN-KEYWORD,instagram,PROXY
DOMAIN-KEYWORD,dropbox,PROXY
DOMAIN-SUFFIX,twimg.com,PROXY
DOMAIN-KEYWORD,blogspot,PROXY
DOMAIN-SUFFIX,youtu.be,PROXY
DOMAIN-KEYWORD,whatsapp,PROXY

# ======== Telegram ========
DOMAIN-SUFFIX,telegra.ph,PROXY
DOMAIN-SUFFIX,telegram.org,PROXY
IP-CIDR,91.108.4.0/22,PROXY
IP-CIDR,91.108.8.0/21,PROXY
IP-CIDR,91.108.16.0/22,PROXY
IP-CIDR,91.108.56.0/22,PROXY
IP-CIDR,149.154.160.0/20,PROXY

# ======== LAN 和本地网络 ========
DOMAIN,injections.adguard.org,DIRECT
DOMAIN,local.adguard.org,DIRECT
DOMAIN-SUFFIX,local,DIRECT
IP-CIDR,127.0.0.0/8,DIRECT
IP-CIDR,172.16.0.0/12,DIRECT
IP-CIDR,192.168.0.0/16,DIRECT
IP-CIDR,10.0.0.0/8,DIRECT
IP-CIDR,17.0.0.0/8,DIRECT
IP-CIDR,100.64.0.0/10,DIRECT
IP-CIDR,224.0.0.0/4,DIRECT

# ======== 最终规则 ========
DOMAIN-SUFFIX,cn,DIRECT
DOMAIN-KEYWORD,-cn,DIRECT
GEOIP,CN,DIRECT
FINAL,PROXY

[Host]
localhost = 127.0.0.1

[URL Rewrite]
^http://(www.)?google.cn https://www.google.com 302