# 此版本以中国大陆 ASN 直连代替 GeoIP-CN 直连
#https://raw.githubusercontent.com/PaPerseller/chn-iplist/master/Shadowrocket-ASN.conf
[General]
bypass-system = true
skip-proxy = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, localhost, *.local, captive.apple.com
tun-excluded-routes = 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 = https://1.12.12.12/dns-query, https://120.53.53.53/dns-query, https://doh.pub/dns-query, https://223.5.5.5/dns-query, https://223.6.6.6/dns-query, https://dns.alidns.com/dns-query
fallback-dns-server = https://1.12.12.12/dns-query, https://120.53.53.53/dns-query, https://doh.pub/dns-query, https://223.5.5.5/dns-query, https://223.6.6.6/dns-query, https://dns.alidns.com/dns-query
ipv6 = false
prefer-ipv6 = false
dns-fallback-system = false
dns-direct-system = false
icmp-auto-reply = true
always-reject-url-rewrite = false
private-ip-answer = true
dns-direct-fallback-proxy = true

[Rule]
# Ads
// others
RULE-SET,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/BanAD.list,REJECT
DOMAIN-SET,https://raw.githubusercontent.com/TG-Twilight/AWAvenue-Ads-Rule/main/Filters/AWAvenue-Ads-Rule-Surge.list,REJECT			
DOMAIN-SUFFIX,log.tagtic.cn,REJECT 	
DOMAIN-SUFFIX,gzads.com,REJECT
DOMAIN-SUFFIX,gozendata.com,REJECT
DOMAIN-SUFFIX,gz-data.com,REJECT
DOMAIN-KEYWORD,umeng,REJECT

// google
DOMAIN-SUFFIX,ads.fmdisk.com,REJECT
DOMAIN-SUFFIX,ads.feemoo.com,REJECT
DOMAIN-SUFFIX,googleads.g.doubleclick.net,REJECT
DOMAIN-KEYWORD,googleads,REJECT
DOMAIN-SUFFIX,ads.google.com,REJECT
DOMAIN-SUFFIX,afd.l.google.com,REJECT
DOMAIN-SUFFIX,doubleclick.com,REJECT
DOMAIN-SUFFIX,doubleclick.net,REJECT
DOMAIN-SUFFIX,google-analytics.com,REJECT
DOMAIN-SUFFIX,googlesyndication.com,REJECT
DOMAIN-SUFFIX,googletagmanager.com,REJECT
DOMAIN-SUFFIX,googletakes.com,REJECT
DOMAIN-SUFFIX,mobileads.google.com,REJECT

# DIRECT
// special direct
RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Shadowrocket/WeChat/WeChat.list,DIRECT
RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Shadowrocket/BiliBili/BiliBili.list,DIRECT
RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Shadowrocket/Weibo/Weibo.list,DIRECT
USER-AGENT,netease*,DIRECT
DOMAIN-SUFFIX,softpedia.com,DIRECT
DOMAIN-KEYWORD,moutai,DIRECT
DOMAIN-KEYWORD,sina,DIRECT
DOMAIN-SUFFIX,fonts.googleapis.com,DIRECT
DOMAIN-SUFFIX,fonts.gstatic.com,DIRECT
RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Shadowrocket/China/China.list,DIRECT
DOMAIN-SET,https://github.com/blackmatrix7/ios_rule_script/raw/master/rule/Shadowrocket/China/China_Domain.list,DIRECT

// Apple direct
DOMAIN-SET,https://raw.githubusercontent.com/Loyalsoldier/surge-rules/release/apple.txt,DIRECT
DOMAIN-SUFFIX,gdmf.apple.com,DIRECT
IP-CIDR,17.0.0.0/8,DIRECT,no-resolve
IP-CIDR,63.92.224.0/19,DIRECT,no-resolve
IP-CIDR,65.199.22.0/23,DIRECT,no-resolve
IP-CIDR,139.178.128.0/18,DIRECT,no-resolve
IP-CIDR,144.178.0.0/19,DIRECT,no-resolve
IP-CIDR,144.178.36.0/22,DIRECT,no-resolve
IP-CIDR,144.178.48.0/20,DIRECT,no-resolve
IP-CIDR,192.35.50.0/24,DIRECT,no-resolve
IP-CIDR,198.183.17.0/24,DIRECT,no-resolve
IP-CIDR,205.180.175.0/24,DIRECT,no-resolve

// steam direct
DOMAIN-SUFFIX,steamcdn-a.akamaihd.net,DIRECT
DOMAIN-SUFFIX,cm.steampowered.com,DIRECT
DOMAIN-SUFFIX,steamserver.net,DIRECT
DOMAIN-SUFFIX,cdn.mileweb.cs.steampowered.com.8686c.com,DIRECT
DOMAIN-SUFFIX,cdn-ws.content.steamchina.com,DIRECT
DOMAIN-SUFFIX,cdn-qc.content.steamchina.com,DIRECT
DOMAIN-SUFFIX,cdn-ali.content.steamchina.com,DIRECT
DOMAIN-SUFFIX,epicgames-download1-1251447533.file.myqcloud.com,DIRECT
DOMAIN-SUFFIX,dl.steam.clngaa.com,DIRECT
DOMAIN-SUFFIX,dl.steam.ksyna.com,DIRECT
DOMAIN-SUFFIX,st.dl.bscstorage.net,DIRECT
DOMAIN-SUFFIX,st.dl.eccdnx.com,DIRECT
DOMAIN-SUFFIX,st.dl.pinyuncloud.com,DIRECT
DOMAIN-SUFFIX,steampipe.steamcontent.tnkjmec.com,DIRECT
DOMAIN-SUFFIX,steampowered.com.8686c.com,DIRECT
DOMAIN-SUFFIX,steamstatic.com.8686c.com,DIRECT
DOMAIN-SUFFIX,wmsjsteam.com,DIRECT
DOMAIN-SUFFIX,xz.pphimalayanrt.com,DIRECT
DOMAIN-SUFFIX,cm.steampowered.com,DIRECT
DOMAIN-SUFFIX,steamcontent.com,DIRECT
DOMAIN-SUFFIX,steamusercontent.com,DIRECT
IP-CIDR,45.121.184.0/24,DIRECT,no-resolve
IP-CIDR,103.10.124.0/23,DIRECT,no-resolve
IP-CIDR,103.28.54.0/24,DIRECT,no-resolve
IP-CIDR,146.66.152.0/24,DIRECT,no-resolve
IP-CIDR,146.66.155.0/24,DIRECT,no-resolve
IP-CIDR,153.254.86.0/24,DIRECT,no-resolve
IP-CIDR,155.133.224.0/22,DIRECT,no-resolve
IP-CIDR,155.133.230.0/24,DIRECT,no-resolve
IP-CIDR,155.133.232.0/23,DIRECT,no-resolve
IP-CIDR,155.133.234.0/24,DIRECT,no-resolve
IP-CIDR,155.133.236.0/22,DIRECT,no-resolve
IP-CIDR,155.133.240.0/23,DIRECT,no-resolve
IP-CIDR,155.133.244.0/23,DIRECT,no-resolve
IP-CIDR,155.133.246.0/24,DIRECT,no-resolve
IP-CIDR,155.133.248.0/21,DIRECT,no-resolve
IP-CIDR,162.254.192.0/21,DIRECT,no-resolve
IP-CIDR,185.25.182.0/23,DIRECT,no-resolve
IP-CIDR,190.217.32.0/22,DIRECT,no-resolve
IP-CIDR,192.69.96.0/22,DIRECT,no-resolve
IP-CIDR,205.196.6.0/24,DIRECT,no-resolve
IP-CIDR,208.64.200.0/22,DIRECT,no-resolve
IP-CIDR,208.78.164.0/22,DIRECT,no-resolve
IP-CIDR,205.185.194.0/24,DIRECT,no-resolve

# PROXY
// telegram
RULE-SET,https://github.com/blackmatrix7/ios_rule_script/blob/master/rule/Shadowrocket/Telegram/Telegram.list,PROXY,force-remote-dns

// ai
RULE-SET,https://gitlab.com/lodepuly/vpn_tool/-/raw/master/Tool/Loon/Rule/AI.list,PROXY,force-remote-dns

// steam proxy
DOMAIN-SUFFIX,steamcommunity-a.akamaihd.net,PROXY,force-remote-dns
DOMAIN-SUFFIX,steamstore-a.akamaihd.net,PROXY,force-remote-dns
DOMAIN-SUFFIX,fanatical.com,PROXY,force-remote-dns
DOMAIN-SUFFIX,humblebundle.com,PROXY,force-remote-dns
DOMAIN-SUFFIX,playartifact.com,PROXY,force-remote-dns
DOMAIN-SUFFIX,steam-chat.com,PROXY,force-remote-dns
DOMAIN-SUFFIX,steamcommunity.com,PROXY,force-remote-dns
DOMAIN-SUFFIX,underlords.com,PROXY,force-remote-dns

// special proxy
RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Shadowrocket/ProxyLite/ProxyLite.list,PROXY,force-remote-dns
DOMAIN-SUFFIX,g.whatsapp.net,PROXY,force-remote-dns
DOMAIN-SUFFIX,us-west-2.amazonaws.com,PROXY,force-remote-dns
DOMAIN-SUFFIX,developer.apple.com,PROXY,force-remote-dns
DOMAIN-KEYWORD,appledaily,PROXY,force-remote-dns
DOMAIN-KEYWORD,instagram,PROXY,force-remote-dns
DOMAIN-SUFFIX,humblebundle.com,PROXY,force-remote-dns
DOMAIN-KEYWORD,telegram,PROXY,force-remote-dns
DOMAIN-KEYWORD,v2ex,PROXY,force-remote-dns
DOMAIN-KEYWORD,github,PROXY,force-remote-dns
DOMAIN-SUFFIX,emby.wtf,PROXY,force-remote-dns

//Google
DOMAIN-SUFFIX,ampproject.org,PROXY,force-remote-dns
DOMAIN-SUFFIX,ampproject.net,PROXY,force-remote-dns
DOMAIN-SUFFIX,goo.gl,PROXY,force-remote-dns
DOMAIN-SUFFIX,gvt1.com,PROXY,force-remote-dns
DOMAIN-SUFFIX,youtu.be,PROXY,force-remote-dns
DOMAIN-KEYWORD,google,PROXY,force-remote-dns
DOMAIN-KEYWORD,gstatic,PROXY,force-remote-dns
DOMAIN-KEYWORD,youtube,PROXY,force-remote-dns
DOMAIN-KEYWORD,googleapis.cn,PROXY,force-remote-dns

// 本地/局域网地址
RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Shadowrocket/Lan/Lan.list,DIRECT

RULE-SET,https://raw.githubusercontent.com/deezertidal/shadowrocket-rules/main/rule/ASN-CN.list,DIRECT
FINAL,PROXY

[Host]
localhost = 127.0.0.1

[URL Rewrite]
^https?:\/\/(www.)?(g|google)\.(cn|com\.hk) https://www.google.com 302

[MITM]
hostname = *.google.cn,*.google.com.hk