Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
1.4 kB
6
Indexable
Never
## DNS
ipversion_prefer: 4
upstream {
  alidns: 'udp://223.5.5.5:53'
  googledns: 'tcp+udp://8.8.8.8:53'
}
routing {
  request {
    qname(geosite:category-ads) -> reject
    qname(geosite:category-ads-all) -> reject
    qname(geosite:cn) -> alidns

    fallback: googledns
  }
  response {
    upstream(googledns) -> accept
    !qname(geosite:cn) && ip(geoip:private) -> googledns

    fallback: accept
  }
}

## Route
pname(NetworkManager, systemd-resolved, dnsmasq) -> must_direct
#ipversion(6) -> direct
dip(224.0.0.0/3, 'ff00::/8') -> direct
dip(geoip:private) -> direct
dip(geoip:cn) -> direct
domain(geosite:cn) -> direct
domain(geosite:category-ads-all) -> block
# 目标非常用端口都走直连,避免BT流量走代理
!dport(21,22,23,53,80,123,143,194,443,465,587,853,993,995,998) -> direct
dip(8.8.8.8, 8.8.4.4) -> hk

# Custom
domain(suffix:cm.steampowered.com, suffix:steamserver.net) -> direct
domain(geosite:google) -> hk

# ChatGPT
domain(geosite:openai) -> auto
domain(suffix:auth0.com) -> auto
domain(suffix:sentry.io) -> auto
domain(suffix:hcaptcha.com) -> auto
domain(suffix:recaptcha.net) -> auto
domain(suffix:gvt1.com) -> auto
domain(suffix:gvt2.com) -> auto
domain(suffix:gvt3.com) -> auto
domain(suffix:msftconnecttest.com) -> auto
domain(suffix:live.com) -> auto
domain(suffix:sfx.ms) -> auto
domain(suffix:microsoft.com) -> auto

fallback: auto
Leave a Comment