分享一下我的 Mihomo (Clash.meta 内核)配置模板
Sub-Converter 的模板,主要是对 dns 的部分做了一些适配,放置在 subconverter/base/clash.tpl,佬友们可以直接抄,或者觉得有不合理需要调整的地方也可以指正。
mixed-port: 7890 allow-lan: false mode: rule log-level: info tcp-concurrent: true global-client-fingerprint: chrome ipv6: false external-controller: '127.0.0.1:9090' hosts: dns.google: - 8.8.8.8 - 8.8.4.4 - '2001:4860:4860::8888' - '2001:4860:4860::8844' doh.pub: - 1.12.12.12 - 1.12.12.21 - 120.53.53.53 dns.alidns.com: - 223.5.5.5 - 223.6.6.6 - '2400:3200::1' - '2400:3200:baba::1' tun: enable: true stack: mixed dns-hijack: - 'any:53' - 'tcp://any:53' auto-route: true auto-detect-interface: true strict-route: true route-exclude-address: - 192.168.0.0/16 - 'fc00::/7' clash-for-android: append-system-dns: false profile: tracing: true store-selected: true store-fake-ip: true sniffer: enable: true override-destination: false force-dns-mapping: true parse-pure-ip: true sniff: TLS: ports: - 443 - 8443 HTTP: ports: - 80 - 8080-8880 QUIC: ports: - 443 - 8443 skip-domain: - Mijia Cloud - +.push.apple.com experimental: sniff-tls-sni: true dns: enable: true prefer-h3: false listen: '127.0.0.1:8853' respect-rules: true ipv6: false cache-algorithm: arc enhanced-mode: fake-ip fake-ip-range: 198.18.0.1/16 fake-ip-range6: 'fc00::/18' fake-ip-filter: - '*.lan' - '*.local' - '*.localhost' - '*.home.arpa' - time.*.com - time.*.gov - time.*.apple.com - ntp.*.com - +.pool.ntp.org - +.msftconnecttest.com - +.msftncsi.com - +.srv.nintendo.net - +.stun.playstation.net - xbox.*.microsoft.com - +.battlenet.com.cn - +.music.163.com - +.y.qq.com - +.bilivideo.cn - localhost.ptlogin2.qq.com - lens.l.google.com default-nameserver: - 223.5.5.5 - 119.29.29.29 nameserver: - 'https://dns.alidns.com/dns-query' - 'https://doh.pub/dns-query' fallback: - 'https://dns.google/dns-query' - 'https://1.1.1.1/dns-query' proxy-server-nameserver: - 'https://dns.alidns.com/dns-query' - 'https://doh.pub/dns-query' direct-nameserver: - 'https://dns.alidns.com/dns-query' - 'https://doh.pub/dns-query' nameserver-policy: 'geosite:cn': - 'https://dns.alidns.com/dns-query' - 'https://doh.pub/dns-query' dl.google.com: - 223.5.5.5 - 119.29.29.29 dl.l.google.com: - 223.5.5.5 - 119.29.29.29 +.in-addr.arpa: 10.0.0.1 +.ip6.arpa: 10.0.0.1 fallback-filter: geoip: true geoip-code: CN geosite: - gfw ipcidr: - 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.168.0.0/16 - 240.0.0.0/4
{% if local.clash.new_field_name == "true" %}
proxies: - name: dns-拦截 type: dns proxy-groups: ~ rules: ~
{% else %}
Proxy: ~ Proxy Group: ~ Rule: - 'DST-PORT,53,dns-拦截'
{% endif %}