mirror of
https://gitee.com/callmer/pve_toss_notes.git
synced 2026-08-31 14:02:53 +08:00
更新 SmartDNS 配置
This commit is contained in:
+4
-4
@@ -229,7 +229,7 @@ $ sudo systemctl enable smartdns.service
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
## 下载广告过滤配置文件
|
## 下载广告过滤配置文件
|
||||||
$ sudo wget https://anti-ad.net/anti-ad-for-smartdns.conf -O /etc/smartdns/anti-ad-smartdns.conf
|
$ sudo wget https://neodev.team/smartdns.conf -O /etc/smartdns/neodevhost-smartdns.conf
|
||||||
```
|
```
|
||||||
|
|
||||||
`SmartDNS` 的主配置文件一般位于 `/etc/smartdns` 目录下,修改配置文件之前,使用以下命令将其备份。
|
`SmartDNS` 的主配置文件一般位于 `/etc/smartdns` 目录下,修改配置文件之前,使用以下命令将其备份。
|
||||||
@@ -250,7 +250,7 @@ $ sudo nvim /etc/smartdns/smartdns.conf
|
|||||||
|
|
||||||
**额外说明:**
|
**额外说明:**
|
||||||
|
|
||||||
- 当不使用 `anti-ad-smartdns.conf` 进行广告过滤时,需移除主配置文件中对应配置项。
|
- 当不使用 `neodevhost-smartdns.conf` 进行广告过滤时,需移除主配置文件中对应配置项。
|
||||||
|
|
||||||
- 检查配置文件中关于本地域名及其上游 DNS 服务器相关配置,请根据实际情况进行调整。
|
- 检查配置文件中关于本地域名及其上游 DNS 服务器相关配置,请根据实际情况进行调整。
|
||||||
|
|
||||||
@@ -269,7 +269,7 @@ $ sudo nvim /etc/smartdns/smartdns.conf
|
|||||||
# server 2402:4e00::
|
# server 2402:4e00::
|
||||||
# server 2400:3200::1
|
# server 2400:3200::1
|
||||||
|
|
||||||
conf-file /etc/smartdns/anti-ad-smartdns.conf
|
conf-file /etc/smartdns/neodevhost-smartdns.conf
|
||||||
cache-file /tmp/smartdns.cache
|
cache-file /tmp/smartdns.cache
|
||||||
|
|
||||||
bind [::]:53
|
bind [::]:53
|
||||||
@@ -323,7 +323,7 @@ $ sudo crontab -e
|
|||||||
```bash
|
```bash
|
||||||
## 定时任务配置项
|
## 定时任务配置项
|
||||||
|
|
||||||
0 5 * * * /usr/bin/wget -q --tries=10 --retry-connrefused --random-wait https://anti-ad.net/anti-ad-for-smartdns.conf -O /etc/smartdns/anti-ad-smartdns.conf
|
0 5 * * * /usr/bin/wget -q --tries=10 --retry-connrefused --random-wait https://neodev.team/smartdns.conf -O /etc/smartdns/neodevhost-smartdns.conf
|
||||||
|
|
||||||
30 5 * * * /usr/bin/systemctl restart smartdns.service
|
30 5 * * * /usr/bin/systemctl restart smartdns.service
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
# server 2402:4e00::
|
# server 2402:4e00::
|
||||||
# server 2400:3200::1
|
# server 2400:3200::1
|
||||||
|
|
||||||
conf-file /etc/smartdns/anti-ad-smartdns.conf
|
conf-file /etc/smartdns/neodevhost-smartdns.conf
|
||||||
cache-file /tmp/smartdns.cache
|
cache-file /tmp/smartdns.cache
|
||||||
|
|
||||||
bind [::]:8053@lo
|
bind [::]:8053@lo
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
# server 2402:4e00::
|
# server 2402:4e00::
|
||||||
# server 2400:3200::1
|
# server 2400:3200::1
|
||||||
|
|
||||||
conf-file /etc/smartdns/anti-ad-smartdns.conf
|
conf-file /etc/smartdns/neodevhost-smartdns.conf
|
||||||
cache-file /tmp/smartdns.cache
|
cache-file /tmp/smartdns.cache
|
||||||
|
|
||||||
bind [::]:53
|
bind [::]:53
|
||||||
|
|||||||
Reference in New Issue
Block a user