[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 = system, 114.114.114.114, 119.29.29.29,223.5.5.5
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-SUFFIX,log.tagtic.cn,REJECT 	
DOMAIN-SUFFIX,wwads.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
DOMAIN-KEYWORD,pagead,REJECT

# DIRECT
// 本地/局域网地址
DOMAIN-SET,https://raw.githubusercontent.com/Loyalsoldier/surge-rules/release/private.txt,DIRECT
DOMAIN-SUFFIX,ip6-localhost,DIRECT
DOMAIN-SUFFIX,ip6-loopback,DIRECT
IP-CIDR,100.64.0.0/10,DIRECT
IP-CIDR,127.0.0.0/8,DIRECT
IP-CIDR,::1/128,DIRECT
IP-CIDR,fc00::/7,DIRECT
IP-CIDR,fe80::/10,DIRECT
IP-CIDR,fd00::/8,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/ACL4SSR/ACL4SSR/master/Clash/Ruleset/Bilibili.list,DIRECT
RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Shadowrocket/Weibo/Weibo.list,DIRECT
USER-AGENT,QQ*,DIRECT
USER-AGENT,TIM*,DIRECT
USER-AGENT,%E7%BD%91%E6%98%93,DIRECT
USER-AGENT,netease*,DIRECT
DOMAIN-SUFFIX,softpedia.com,DIRECT
DOMAIN-SUFFIX,qq.com,DIRECT
DOMAIN-KEYWORD,moutai,DIRECT
DOMAIN-KEYWORD,sina,DIRECT
DOMAIN-SUFFIX,fonts.googleapis.com,DIRECT
DOMAIN-SUFFIX,fonts.gstatic.com,DIRECT

// Apple direct
DOMAIN,apple.comscoreresearch.com,DIRECT
DOMAIN-SUFFIX,apple-cloudkit.com,DIRECT
DOMAIN-SUFFIX,apple.co,DIRECT
DOMAIN-SUFFIX,apple.com.cn,DIRECT
DOMAIN-SUFFIX,crashlytics.com,DIRECT
DOMAIN-SUFFIX,icloud-content.com,DIRECT
DOMAIN-SUFFIX,icloud.com.cn,DIRECT
DOMAIN-SUFFIX,me.com,DIRECT
DOMAIN-SUFFIX,appldnld.apple.com,DIRECT
DOMAIN-SUFFIX,apps.apple.com,DIRECT
DOMAIN-SUFFIX,mzstatic.com,DIRECT
DOMAIN-SUFFIX,cdn-cn2.apple-mapkit.com,DIRECT
DOMAIN-SUFFIX,cdn-cn3.apple-mapkit.com,DIRECT
DOMAIN-SUFFIX,cdn-apple.com,DIRECT
DOMAIN-SUFFIX,cdn-cn4.apple-mapkit.com,DIRECT
DOMAIN-SUFFIX,cdn2.apple-mapkit.com,DIRECT
DOMAIN-SUFFIX,cdn1.apple-mapkit.com,DIRECT
DOMAIN-SUFFIX,cdn4.apple-mapkit.com,DIRECT
DOMAIN-SUFFIX,cdn3.apple-mapkit.com,DIRECT
DOMAIN-SUFFIX,cds.apple.com,DIRECT
DOMAIN-SUFFIX,cl2.apple.com,DIRECT
DOMAIN-SUFFIX,cl4-cn.apple.com,DIRECT
DOMAIN-SUFFIX,cl1.apple.com,DIRECT
DOMAIN-SUFFIX,cl5.apple.com,DIRECT
DOMAIN-SUFFIX,cl3.apple.com,DIRECT
DOMAIN-SUFFIX,cl4.apple.com,DIRECT
DOMAIN-SUFFIX,clientflow.apple.com,DIRECT
DOMAIN-SUFFIX,configuration.apple.com,DIRECT
DOMAIN-SUFFIX,cstat.apple.com,DIRECT
DOMAIN-SUFFIX,download.developer.apple.com,DIRECT
DOMAIN-SUFFIX,gsp11-cn.ls.apple.com,DIRECT
DOMAIN-SUFFIX,gsp12-cn.ls.apple.com,DIRECT
DOMAIN-SUFFIX,gsp13-cn.ls.apple.com,DIRECT
DOMAIN-SUFFIX,gsp4-cn.ls.apple.com.edgekey.net.globalredir.akadns.net,DIRECT
DOMAIN-SUFFIX,gsp4-cn.ls.apple.com.edgekey.net,DIRECT
DOMAIN-SUFFIX,gsp4-cn.ls.apple.com,DIRECT
DOMAIN-SUFFIX,gsp5-cn.ls.apple.com,DIRECT
DOMAIN-SUFFIX,gspe19-cn-ssl.ls.apple.com,DIRECT
DOMAIN-SUFFIX,gspe19-cn.ls.apple.com,DIRECT
DOMAIN-SUFFIX,gspe21-ssl.ls.apple.com,DIRECT
DOMAIN-SUFFIX,iadsdk.apple.com,DIRECT
DOMAIN-SUFFIX,gspe35-ssl.ls.apple.com,DIRECT
DOMAIN-SUFFIX,images.apple.com.akadns.net,DIRECT
DOMAIN-SUFFIX,images.apple.com.edgekey.net.globalredir.akadns.net,DIRECT
DOMAIN-SUFFIX,icloud.cdn-apple.com,DIRECT
DOMAIN-SUFFIX,init-p01md.apple.com,DIRECT
DOMAIN-SUFFIX,images.apple.com,DIRECT
DOMAIN-SUFFIX,init-p01st.push.apple.com,DIRECT
DOMAIN-SUFFIX,aaplimg.com,DIRECT
DOMAIN-SUFFIX,iphone-ld.apple.com,DIRECT
DOMAIN-SUFFIX,is1-ssl.mzstatic.com,DIRECT
DOMAIN-SUFFIX,init-s01st.push.apple.com,DIRECT
DOMAIN-SUFFIX,is1.mzstatic.com,DIRECT
DOMAIN-SUFFIX,is2-ssl.mzstatic.com,DIRECT
DOMAIN-SUFFIX,is2.mzstatic.com,DIRECT
DOMAIN-SUFFIX,is3-ssl.mzstatic.com,DIRECT
DOMAIN-SUFFIX,is3.mzstatic.com,DIRECT
DOMAIN-SUFFIX,is4-ssl.mzstatic.com,DIRECT
DOMAIN-SUFFIX,is4.mzstatic.com,DIRECT
DOMAIN-SUFFIX,is5-ssl.mzstatic.com,DIRECT
DOMAIN-SUFFIX,is5.mzstatic.com,DIRECT
DOMAIN-SUFFIX,mesu.apple.com,DIRECT
DOMAIN-SUFFIX,itunesconnect.apple.com,DIRECT
DOMAIN-SUFFIX,itunes.apple.com,DIRECT
DOMAIN-SUFFIX,ocsp.apple.com,DIRECT
DOMAIN-SUFFIX,pancake.apple.com,DIRECT
DOMAIN-SUFFIX,oscdn.apple.com,DIRECT
DOMAIN-SUFFIX,s.mzstatic.com,DIRECT
DOMAIN-SUFFIX,music.apple.com,DIRECT
DOMAIN-SUFFIX,akadns.net,DIRECT
DOMAIN-SUFFIX,store.apple.com.edgekey.net,DIRECT
DOMAIN-SUFFIX,store.apple.com,DIRECT
DOMAIN-SUFFIX,store.storeimages.cdn-apple.com,DIRECT
DOMAIN-SUFFIX,support.apple.com,DIRECT
DOMAIN-SUFFIX,swcdn.g.aaplimg.com,DIRECT
DOMAIN-SUFFIX,swcdn.apple.com,DIRECT
DOMAIN-SUFFIX,swcatalog.apple.com,DIRECT
DOMAIN-SUFFIX,reserve-prime.apple.com,DIRECT
DOMAIN-SUFFIX,updates-http.cdn-apple.com.akadns.net,DIRECT
DOMAIN-SUFFIX,swscan.apple.com,DIRECT
DOMAIN-SUFFIX,swdist.apple.com,DIRECT
DOMAIN-SUFFIX,updates-http.cdn-apple.com,DIRECT
DOMAIN-SUFFIX,updates.cdn-apple.com,DIRECT
DOMAIN-SUFFIX,www.apple.com.edgekey.net.globalredir.akadns.net,DIRECT
DOMAIN-SUFFIX,www.apple.com.edgekey.net,DIRECT
DOMAIN-SUFFIX,valid.apple.com,DIRECT
DOMAIN-SUFFIX,www.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

# PROXY
// telegram
RULE-SET,https://raw.githubusercontent.com/VirgilClyne/GetSomeFries/main/ruleset/ASN.Telegram.list,PROXY

// special proxy
DOMAIN-SUFFIX,ampproject.org,PROXY,force-remote-dns
DOMAIN-SUFFIX,ampproject.net,PROXY,force-remote-dns
DOMAIN-SUFFIX,analytics.twitter.com,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,github,PROXY,force-remote-dns
DOMAIN-KEYWORD,instagram,PROXY,force-remote-dns
DOMAIN-KEYWORD,twitter,PROXY,force-remote-dns
DOMAIN-KEYWORD,twimg,PROXY,force-remote-dns
DOMAIN-KEYWORD,telegram,PROXY,force-remote-dns
DOMAIN-SUFFIX,humblebundle.com,PROXY,force-remote-dns
DOMAIN-KEYWORD,steam,PROXY,force-remote-dns
DOMAIN-KEYWORD,googleapis.cn,PROXY,force-remote-dns
DOMAIN-KEYWORD,v2ex,PROXY,force-remote-dns

//Google
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-SUFFIX,ytimg.com,PROXY,force-remote-dns
DOMAIN-SUFFIX,ggpht.com,PROXY,force-remote-dns
DOMAIN-KEYWORD,gmail,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

GEOIP,CN,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
