有没有更好的建议?
1. 添加国内 dns 服务器, 设置为 `china` 组(都使用 udp,且从默认组排除)
```sh
电信 202.96.128.86
电信 v6 240e:1f:1::1
腾讯 119.29.29.29
腾讯 v6 2402:4e00:
阿里 223.5.5.5
阿里 v6 2400:3200::1
百度 180.76.76.76
百度 v6 2400:da00:6666
```
2. 添加国外 dns 服务器, 设置为 `gfw` 组
```sh
OpenDNS https://208.67.222.222/dns-query
DNS.SB https://185.222.222.222/dns-query
CloudflareDNS https://1.1.1.1/dns-query
Quad9DNS https://9.9.9.9:5053/dns-query
```
3. 添加定时任务下载文件 `smartdns-domains.china.conf`到 `/etc/smartdns/domain-set/` 目录下并重启
4. SmartDNS 自定义设置
```conf
# 关闭 ddns 域名的缓存, 域名过期缓存, 设置 china 组
domain-rules /*-a.example.com/ -no-cache -no-serve-expired -nameserver china
# 加载 china 域名
domain-set -name chinalist -file /etc/smartdns/domain-set/smartdns-domains.china.conf
# china 域名 china 组 默认测速 允许 ipv6 双栈优选 首次查询最快 ping
domain-rules /domain-set:chinalist/ -nameserver china -speed-check-mode ping,tcp:80,tcp:443 -address -6 -dualstack-ip-selection yes -response-mode first-ping
# 全局 gfw 组 不测速 禁用 ipv6 禁用双栈优选 首次查询最快响应
domain-rules /./ -nameserver gfw -speed-check-mode none -address #6 dualstack-ip-selection no -response-mode fastest-response
# 设置缓存路径
cache-file /root/smartdns.cache
```
1
DAPTX4869 99 天前
server-https https://1.0.0.1/dns-query -group foreign -exclude-default-group -proxy proxy
#分流解析规则 domain-set -name domain-proxy-list -file '/etc/smartdns/geosite.txt' domain-rules /domain-set:domain-proxy-list/ -nameserver foreign -no-serve-expired -speed-check-mode none -address#6 大概配置, 区别是分流组使用了 proxy |
2
txydhr 99 天前 via iPhone
需要加,exclude-default-group ,不然同时纳入默认 dns 之一
|
3
edw1n 99 天前
```
server-name smartdns prefetch-domain yes serve-expired yes cache-size 4096000 dnsmasq-lease-file /tmp/dhcp.leases rr-ttl-min 60 rr-ttl-max 86400 log-size 64K log-num 1 log-level error log-file /var/log/smartdns.log audit-size 64K audit-num 1 cache-persist yes cache-file /etc/smartdns/smartdns.cache proxy-server socks5://127.0.0.1:1070 -name default-proxy mdns-lookup yes resolv-file /tmp/resolv.conf.d/resolv.conf.auto bind [::]:6053@br-lan bind [::]:6053@lo bind-tcp [::]:6053@br-lan bind-tcp [::]:6053@lo bind [::]:6553@br-lan -group passwall_proxy -force-aaaa-soa bind [::]:6553@lo -group passwall_proxy -force-aaaa-soa bind-tcp [::]:6553@br-lan -group passwall_proxy -force-aaaa-soa bind-tcp [::]:6553@lo -group passwall_proxy -force-aaaa-soa server 218.2.2.2 server 218.4.4.4 server-https https://dns.alidns.com/dns-query server-tls dns.alidns.com server-https https://doh.pub/dns-query server-tls dot.pub server 223.5.5.5 server 119.29.29.29 server 8.8.8.8 -group passwall_proxy -exclude-default-group -proxy default-proxy -check-edns server-https https://dns.google/dns-query -group passwall_proxy -exclude-default-group -proxy default-proxy server-tls dns.google -group passwall_proxy -exclude-default-group -proxy default-proxy server 1.1.1.1 -group passwall_proxy -exclude-default-group -proxy default-proxy -check-edns server-tls cloudflare-dns.com -group passwall_proxy -exclude-default-group -proxy default-proxy server-https https://1dot1dot1dot1.cloudflare-dns.com/ -group passwall_proxy -exclude-default-group -proxy default-proxy domain-set -name domain-block-list -file /etc/smartdns/domain-block.list domain-rules /domain-set:domain-block-list/ -address # conf-file /etc/smartdns/address.conf conf-file /etc/smartdns/blacklist-ip.conf conf-file /etc/smartdns/custom.conf ``` 可以参考我的配置 proxy-server socks5://127.0.0.1:1070 -name default-proxy 这部分是设置了本地的 PassWall 端口 |
5
jqtmviyu OP @txydhr #2
`1. 添加国内 dns 服务器, 设置为 `china` 组(都使用 udp,且从默认组排除)` gfw 是默认组, china 组已从默认排除, 我是通过 luci 界面配置的. |