A local DNS server to obtain the fastest website IP for the best Internet experience, support DoT, DoH. 一个本地DNS服务器,获取最快的网站IP,获得最佳上网体验,支持DoH,DoT。
🎉2024新春版,完善功能,提升性能、可靠性,推荐更新。 ㊗️也祝福各位新春快乐。
ip-alias
选项,支持CDN IP加速,具体参考:https://pymumu.github.io/smartdns/config/ip-alias/ip-rules
和ip-set
参数,支持批量设置IP规则:https://pymumu.github.io/smartdns/config/ip-set/bind-https
选项,支持DOH服务器。client-rules
选项,支持按客户端MAC地址,IP分组:https://pymumu.github.io/smartdns/config/client-rule/group-begin
, group-end
,group-match
配置组选项,支持虚拟DNS服务器能力:https://pymumu.github.io/smartdns/config/rule-group/acl-enable
参数,配合client-rules
选项控制客户端访问权限。-
, .
用于匹配主域名:https://pymumu.github.io/smartdns/config/ad-block//domain/
类域名规则,增加/./
根域名规则设置, 在不指定/domain/的情况下为全局规则,如: address #6, domain-rules /./ -[rules...]server
参数增加短配置选项,
-g -> -group
-e -> -exclude-default-group
-p -> -proxy
-k -> -no-check-certificate
-b -> -bootstrap-dns
-R
选项和restart-on-crash yes
参数,当进程崩溃时自动重启进程。srv-record
用于配置SRV记录,可用于vlmcsdhttps-record
用于支持配置HTTPS记录,可支持ECH等安全特性。mdns-lookup
参数,用于通过mDNS查询本地主机名或IP地址反查等。log-syslog, audit-syslog
参数,支持配置smartdns输出日志到系统日志。max-query-limit
参数,配置最大并发请求数。cache-mem-size
参数,支持指定缓存占用的最大内存。smartdns帮助文档:https://pymumu.github.io/smartdns/ 非静态版本下载:https://github.com/PikuZheng/smartdns/releases/
Full Changelog: https://github.com/pymumu/smartdns/compare/Release43...Release45
force-qtype-SOA
支持范围的写法,如: force-qtype-SOA 1-23,48-64。address
参数支持多IP地址,支持最多8个IP地址,如:address /a.com/1.2.3.4,5.6.7.8*
,-
仅支持在域名开头)
// 前缀通配
*-a.example.com
// 仅匹配子域名
*.example.com
// 仅匹配主域名
-.example.com
-host-ip
指定IP地址。ddns-domain
选项,用于将DDNS域名解析为本机IP地址,避免上游查询。\
换行。log-console yes
。smartdns帮助文档:https://pymumu.github.io/smartdns/ 非静态版本下载:https://github.com/PikuZheng/smartdns/releases/ Full Changelog: https://github.com/pymumu/smartdns/compare/Release42...Release43
bind-tls
选项。-bootstrap-dns
选项,支持指定专门的bootstrapDNS服务器。log-console
选项。新增log-level off
,完全关闭LOG。-no-cache
, -response-mode
参数。address /domain.com/-
expand-ptr-from-address yes
选项。-subnet
选项,可指定单个DNS上游的ECS信息。联通或移动用户可模拟电信用户IP地址,让223.5.5.5返回电信就近的IP地址,部分网站网络访问时延会有较大改善。cache-checkpoint-time
参数,设置周期保存cache文件,避免cache丢失。-ipset
,-nftset
选项,支持对应端口查询时,强制设置ipset和nftset。nslookup smartdns
来查看。更新内容:
proxy-server
参数bind ip:port@interface
cname /a.com/b.com
dns64 64:ff9b::/96
参数\
换行,避免行字符串过长。注意事项:
更新内容:
proxy-server
参数bind ip:port@interface
cname /a.com/b.com
dns64 64:ff9b::/96
参数\
换行,避免行字符串过长。注意事项:
更新内容:
proxy-server
参数bind ip:port@interface
cname /a.com/b.com
dns64 64:ff9b::/96
参数\
换行,避免行字符串过长。注意事项:
更新内容:
proxy-server
参数bind ip:port@interface
cname /a.com/b.com
dns64 64:ff9b::/96
参数\
换行,避免行字符串过长。注意事项:
更新内容:
如有问题请在github提交issue或改进代码。
Full Changelog: https://github.com/pymumu/smartdns/compare/Release39...Release40
openwrt LUCI界面支持配置DNS分流和广告屏蔽,同时支持定时下载相关的配置文件。
目前支持管理的文件有两种:
配置文件
:格式为smartdns配置文件格式。
默认路径为:/etc/smartdns/conf.d/
可配置参数为:设置
->高级设置
->包含配置文件
配置文件参考:https://raw.githubusercontent.com/privacy-protection-tools/anti-AD/master/anti-ad-smartdns.conf域名列表
文件,格式为一行一个域名。
默认路径为:/etc/smartdns/domain-set/
可配置参数为:域名规则
->分流设置
->域名列表文件
; 域名规则
->域名屏蔽设置
->域名列表文件
配置文件参考:https://raw.githubusercontent.com/privacy-protection-tools/anti-AD/master/anti-ad-domains.txt下载文件设置
中的下载文件
中,增加定时下载文件。下载文件
页面中更新文件
按钮,等待更新。自动更新
复选框,每日凌晨5点定时更新列表文件。设置
->高级设置
->包含配置文件
,从列表中选择下载文件
中配置的配置文件
。如无列表显示,可刷新页面。可以将域名列表
文件中的域名的查询请求,发送到对应服务器组
包含的服务器中,具体配置流程
上游服务器
中添加上游服务器,并配置相关的服务器组
。如果只想让当前服务器接受本服务器组域名的查询,在可以在添加页面的高级设置
中勾选从默认组中排除
复选框。域名规则
->域名分流设置
中,选择或输入上述服务器组
,如无列表选择,可配置上游服务器后,刷新页面。域名规则
->域名分流设置
中,适当勾选跳过测速
,停用IPV6解析
,IPSET/NFTSet
选项。域名列表文件
中,选择或上传分流的域名列表文件。域名列表
文本框中输入,格式为一行一个域名。参考域名分流配置
,只是选择的域名列表不同。
保存并应用
时,页面提示无更改内容,则可以点击页面最下面的重启服务
按钮使配置生效。下载文件
列表,上游服务器组配置完成后,务必刷新页面,以便部分输入框可提示选择对应的文件列表,方便使用。如未刷新,也可直接输入路径,或名称,但要确保输入匹配。欢迎各位测试验证,并提出改进建议。
更新内容:
--host-name -
BUG解决:
如有问题请在github提交issue或改进代码。
Full Changelog: https://github.com/pymumu/smartdns/compare/Release38.1...Release39