8

使用blocky作为你的dns服务器

 2 years ago
source link: https://www.bboy.app/2021/09/02/%E4%BD%BF%E7%94%A8blocky%E4%BD%9C%E4%B8%BA%E4%BD%A0%E7%9A%84dns%E6%9C%8D%E5%8A%A1%E5%99%A8/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

使用blocky作为你的dns服务器

发表于

2021-09-02 分类于 linux

202109021532017.png

我使用过很多的dns服务器,从coredns到smartdns到adguard等等,今天推荐一个dns服务器blocky

最让我感觉ok的是,他使用的是yaml作为配置文件,配置也很简单

首先下载二进制文件

wget https://github.com/0xERR0R/blocky/releases/download/v0.15/blocky_0.15_Linux_armv7.tar.gz

tar -zxvf blocky_0.15_Linux_armv7.tar.gz

upstream:
default:
- 114.114.114.114
- 223.5.5.5
- 119.29.29.29
- 8.8.4.4
- 208.67.222.222
- 119.29.29.29
- 1.2.4.8
blocking:
blackLists:
ads:
- ./hosts/hosts
refreshPeriod: 240
clientGroupsBlock:
default:
- ads
port: 53
httpPort: 4000
logLevel: info
logFormat: json
logTimestamp: true
customDNS:
mapping:
a.exa.com: 1.1.1.1
caching:
minTime: 5
maxTime: 30
prefetching: true
maxItemsCount: 0
prometheus:
enable: true
path: /metrics
queryLog:
dir: ./logs
perClient: true
logRetentionDays: 0

参数都可以在

https://0xerr0r.github.io/blocky/configuration/

让我觉得优秀的是还支持prometheus

下面是我的监控面板

https://grafana.bboysoul.cn/d/LTUPm_ink/jian-kong-da-ping?orgId=1&refresh=5s

欢迎关注我的博客www.bboy.app

Have Fun

欢迎关注我的其它发布渠道


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK