同步操作将从 狐狸 Nomad./SmartDNS_China_List_Installer 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
用于优化您最喜爱的 DNS 服务器的中国特定 SmartDNS 配置。
SmartDNS 适用版本:Release 43 及以上
提升解析中国域名的速度
尽可能获取距离您最近的最佳 CDN 节点,但不会影响海外 CDN 结果
阻止 ISP 在 NXDOMAIN 结果中显示广告
本项目仅使用 bash
脚本生成 SmartDNS 配置文件,并对部分配置文件逻辑进行了修改。
不再生成测速相关的 domain-rules
配置,避免干扰 SmartDNS 现有测速模式。
DNS 服务器组配置文件为 dns-group.china.smartdns.conf
:
## 本项目 DNS 服务器组规则
server 223.5.5.5 -group flash -exclude-default-group
server 180.184.1.1 -group flash -exclude-default-group
server 119.29.29.29 -group flash -exclude-default-group
server 114.114.114.114 -group flash -exclude-default-group
由于添加了 -exclude-default-group
参数,只有规则内域名会使用该 DNS 服务器组。
本项目使用 DNS 服务器组 flash
替换了单个上游 DNS 服务器:
## 上游项目 nameserver 规则
nameserver /abc.com/114.114.114.114
nameserver /xyz.net/114.114.114.114
## 本项目 nameserver 规则
nameserver /abc.com/flash
nameserver /xyz.net/flash
此时,SmartDNS 在请求规则内域名时,将向指定的上游 DNS 服务器组发送请求。
上游 DNS 服务器:
223.5.5.5 180.184.1.1 119.29.29.29 114.114.114.114
配置文件路径:
/etc/smartdns.d
配置文件名:
dns-group.china.smartdns.conf
apple.china.smartdns.conf
google.china.smartdns.conf
accelerated-domains.china.smartdns.conf
bogus-nxdomain.china.smartdns.conf
下载本安装脚本,并赋予可执行权限
## 下载安装脚本
$ curl -LR -O https://gitee.com/callmer/smartdns_china_list_installer/raw/main/smartdns_plugin.sh
## 设置安装脚本权限
$ chmod +x smartdns_plugin.sh
编辑所需的上游 DNS 服务器列表(可选)
使用 root
权限运行脚本:
## 执行安装脚本
$ sudo ./smartdns_plugin.sh
定期执行脚本(可选)
## 编辑系统定时任务
$ sudo crontab -e
## 定时任务配置项
20 5 * * * /usr/bin/bash /path/to/smartdns_plugin.sh
没有这些项目,就不会有本项目 :)
Github: dnsmasq-china-list
Github: smartdns
Copyright © 2023 狐狸Nomad
This work is free. You can redistribute it and/or modify it under the
terms of the Do What The Fuck You Want To Public License, Version 2,
as published by Sam Hocevar. See the LICENSE file for more details.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。