Bboysoul's Blog

首页 公告 RSS

使用blocky作为你的dns服务器

September 2, 2021 本文有 240 个字 需要花费 1 分钟阅读

简介

我使用过很多的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


Tags:

本站总访问量 本站总访客数