- 支持按域名后缀匹配/GFWList匹配/半智能污染检测进行分组
- 支持多hosts文件 + 手动指定hosts
- DNS查询支持socks5代理
- DNS记录缓存
- 自动添加IPSet记录
- 在release页下载软件包;
- 解压后按需求编辑配置文件(可选)后运行进程:
./ts-dns
完整配置文件参见
ts-dns.full.toml
- 默认配置(
ts-dns.toml),开箱即用
listen = ":53"
gfwlist = "gfwlist.txt"
[groups]
[groups.clean]
dns = ["119.29.29.29", "223.5.5.5", "114.114.114.114"]
[groups.dirty]
dns = [""] # 省略
suffix = ["google.com", "twimg.com", "quoracdn.net"]- 使用自定义hosts文件
listen = ":53"
hosts_files = ["adaway.txt"]
# 其余同默认配置- 自定义域名解析
# 其余同默认配置
[hosts]
"www.example.com" = "1.1.1.1"- 使用socks5代理解决DNS污染问题
# 其余同默认配置
[groups.dirty]
dns = ["8.8.8.8", "1.1.1.1"]
socks5 = "127.0.0.1:1080"- 自定义域名分组
# 其余同默认配置
[groups.work]
dns = ["10.1.1.1"]
suffix = ["company.com"]- 动态添加IPSet记录(使用前请阅读
ts-dns.full.toml对应说明)
# 其余同默认配置
[groups.dirty]
dns = [""] # 省略
suffix = ["google.com", "twimg.com", "quoracdn.net"]
ipset = "blocked"
ipset_ttl = 86400- DNS响应择优
- DNS缓存预取
- DNS over HTTPS/TLS/TCP等支持

