希望大佬帮忙看下 smart 这样设置分流有没有问题

45 天前
 jqtmviyu

域名白名单仓库与设置截图

有没有更好的建议?

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
```
997 次点击
所在节点    DNS
8 条回复
DAPTX4869
45 天前
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
txydhr
44 天前
需要加,exclude-default-group ,不然同时纳入默认 dns 之一
edw1n
44 天前
```
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 端口
jqtmviyu
44 天前
@DAPTX4869 #1 -address #6 应该少了空格吧
jqtmviyu
44 天前
@txydhr #2
`1. 添加国内 dns 服务器, 设置为 `china` 组(都使用 udp,且从默认组排除)`

gfw 是默认组, china 组已从默认排除, 我是通过 luci 界面配置的.
jqtmviyu
44 天前
@edw1n #3 你这也是在 openwrt 上使用的吗? 因为 luci 配置方便, 有些能点点点的就没放到自定义配置里了.
网上的教程很多, 我是不清楚自己的设置有没有冲突或者需要优化的地方.
DAPTX4869
44 天前
@jqtmviyu #4 忘了, 也是抄别人的改改
edw1n
44 天前
@jqtmviyu 是 openwrt ,luci 上找到对应的位置就行。这个就是 luci 配置完以后的配置文件

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/1065371

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX