#loon config
#Author: PaPerseller

[General]
doh-server = https://dns.alidns.com/dns-query, https://dns.google/dns-query
ipv6 = false
skip-proxy = 192.168.0.0/16,10.0.0.0/8,172.16.0.0/12,localhost,*.local,e.crashlynatics.com, captive.apple.com, sequoia.apple.com, seed-sequoia.siri.apple.com, *.ls.apple.com
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.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, 114.114.114.114, 119.29.29.29
allow-wifi-access = false
wifi-access-http-port = 7222
wifi-access-socks5-port = 7221
proxy-test-url = http://cp.cloudflare.com/generate_204
test-timeout = 3
interface-mode = auto

[Proxy]

[Remote Proxy]

[Proxy Group]

[Remote Filter]

[Rule]
#Type:DOMAIN-SUFFIX,DOMAIN,DOMAIN-KEYWORD,USER-AGENT,URL-REGEX,IP-CIDR
#Strategy:DIRECT,PROXY,REJECT
#Options:no-resolve(only for cidr)

# DIRECT
# PROXY
# Ads

GEOIP,cn,DIRECT
FINAL,PROXY

[Remote Rule]
https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/BanAD.list, policy=REJECT, tag=广告联盟, enabled=true
https://raw.githubusercontent.com/Loyalsoldier/surge-rules/release/reject.txt, policy=REJECT, tag=full-reject, enabled=false
https://raw.githubusercontent.com/TG-Twilight/AWAvenue-Ads-Rule/main/Filters/AWAvenue-Ads-Rule-Surge-RULE-SET.list, policy=REJECT, tag=ads, enabled=true
https://raw.githubusercontent.com/PaPerseller/chn-iplist/master/ruleset/reject-special.list, policy=REJECT, tag=special-ads, enabled=true

https://raw.githubusercontent.com/Loyalsoldier/surge-rules/release/ruleset/apple.txt, policy=DIRECT, tag=Apple, enabled=true
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Loon/WeChat/WeChat.list, policy=DIRECT, tag=wechat, enabled=true
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Loon/BiliBili/BiliBili.list, policy=DIRECT, tag=bilibili, enabled=true
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Loon/Weibo/Weibo.list, policy=DIRECT, tag=weibo, enabled=true
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Loon/China/China.list, policy=DIRECT, tag=China, enabled=true
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Loon/China/China_Domain.list, policy=DIRECT, tag=China_Domain, enabled=true
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Loon/Lan/Lan.list, policy=DIRECT, tag=Lan, enabled=true
https://raw.githubusercontent.com/PaPerseller/chn-iplist/master/ruleset/direct-special.list, policy=DIRECT, tag=special-direct, enabled=true
https://raw.githubusercontent.com/PaPerseller/chn-iplist/master/ruleset/ipv6-cidr6.list, policy=DIRECT, tag=ipv6-direct, enabled=false
https://raw.githubusercontent.com/VirgilClyne/GetSomeFries/main/ruleset/ASN.China.list, policy=DIRECT, tag=ASN-China, enabled=false

https://kelee.one/Tool/Loon/Lsr/AI.lsr, policy=PROXY, tag=AI, enabled=true
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Loon/Telegram/Telegram.list, policy=PROXY, tag=Telegram, enabled=true
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Loon/GitHub/GitHub.list, policy=PROXY, tag=Github, enabled=true
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Loon/ProxyLite/ProxyLite.list, policy=PROXY, tag=ProxyLite, enabled=true
https://raw.githubusercontent.com/PaPerseller/chn-iplist/master/ruleset/proxy-special.list, policy=PROXY, tag=special-proxy, enabled=true
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Shadowrocket/Proxy/Proxy.list, policy=PROXY, tag=full-proxy, enabled=false
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Shadowrocket/Proxy/Proxy_Domain.list, policy=PROXY, tag=full-proxy-domain, enabled=false

[Host]

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

[Script]

[Remote Script]

[Plugin]

[Mitm]
#ca-p12 =
#ca-passphrase =
hostname = *.google.cn,*.google.com.hk
skip-server-cert-verify = true