# RESTful web API listening address external-controller:127.0.0.1:9090
# DNS server settings # This section is optional. When not present, the DNS server will be disabled. dns: enable:false listen:0.0.0.0:53 ipv6:false# when the false, response to AAAA questions will be empty
# These nameservers are used to resolve the DNS nameserver hostnames below. # 默认只支持ip default-nameserver: -8.8.8.8
# 支持 UDP, TCP, DoT, DoH. 和指定端口 # 所有DNS请求都会不经过代理被转发到这些服务器,Clash会选择一个最快的返回结果 nameserver: -https://223.5.5.5/dns-query# 阿里云 -https://doh.pub/dns-query#腾讯云 -tls://dns.rubyfish.cn:853# DNS over TLS -https://1.1.1.1/dns-query# DNS over HTTPS -dhcp://en0# dns from dhcp
# 对于所有DNS请求,fallback和nameserver内的服务器都会同时查找 # 如果DNS结果为非国内IP(GEOIP country is not `CN`),会使用fallback内的服务器的结果 # 因为nameserver内为国内服务器,对国外域名可能有DNS污染。fallback内是国外服务器,能防止国外域名被DNS污染 fallback: -https://162.159.36.1/dns-query -https://dns.google/dns-query -tls://8.8.8.8:853
# DNS污染攻击的对策 fallback-filter: geoip:false# If geoip is true, when geoip matches geoip-code, clash will use nameserver results. Otherwise, Clash will only use fallback results. # geoip-code: CN ipcidr:# IPs in these subnets will be considered polluted, when nameserver results match these ip, clash will use fallback results. -0.0.0.0/8 -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 -240.0.0.0/4 -255.255.255.255/32 domain:#Domains in these list will be considered polluted, when lookup these domains, clash will use fallback results. -+.google.com -+.facebook.com -+.youtube.com -+.githubusercontent.com