优化文案描述

This commit is contained in:
CallMeR
2023-12-13 23:12:03 +08:00
parent d08a3acf74
commit 88ea495d5a
2 changed files with 49 additions and 35 deletions
+41 -34
View File
@@ -234,7 +234,39 @@ $ sudo systemctl status smartdns.service
$ sudo systemctl enable smartdns.service
```
### 6.1.配置 SmartDNS
### 6.1. SmartDNS 插件
本步骤为可选操作,通过安装特殊的 `SmartDNS` 配置文件,以屏蔽广告或加快中国境内域名的解析速度。
若需使用 `SmartDNS` 屏蔽广告,则需下载广告规则配置文件。
```bash
## 创建 SmartDNS 配置文件目录
$ sudo mkdir -p /etc/smartdns.d
## 下载广告规则配置文件
$ sudo curl -LR -o /etc/smartdns.d/anti-ad.smartdns.conf https://anti-ad.net/anti-ad-for-smartdns.conf
```
`SmartDNS` 的加速规则通过 `bash` 脚本安装,脚本生成的配置文件位于 `/etc/smartdns.d` 目录。
关于脚本的详细介绍,请参阅 [SmartDNS China List 安装脚本](https://gitee.com/callmer/smartdns_china_list_installer) 。
```bash
## 下载加速规则安装脚本
$ sudo curl -LR -o /opt/smartdns_plugin.sh https://gitee.com/callmer/smartdns_china_list_installer/raw/main/smartdns_plugin.sh
## 设置脚本可执行权限
$ sudo chmod +x /opt/smartdns_plugin.sh
## 设置脚本文件防篡改
$ sudo chattr +i /opt/smartdns_plugin.sh
## 执行脚本
$ sudo bash /opt/smartdns_plugin.sh
```
### 6.2. SmartDNS 主配置
`SmartDNS` 配置较为复杂,可按需制定各类 DNS 请求规则,建议先查阅官方提供的 [配置指导](https://pymumu.github.io/smartdns/config/basic-config/) 和 [配置选项](https://pymumu.github.io/smartdns/configuration/) 。
@@ -287,7 +319,14 @@ $ sudo nvim /etc/smartdns/smartdns.conf
# server 2402:4e00::
# server 2400:3200::1
conf-file /etc/smartdns.d/*.conf
conf-file /etc/smartdns.d/anti-ad.smartdns.conf
conf-file /etc/smartdns.d/dns-group.china.smartdns.conf
conf-file /etc/smartdns.d/apple.china.smartdns.conf
conf-file /etc/smartdns.d/google.china.smartdns.conf
conf-file /etc/smartdns.d/accelerated-domains.china.smartdns.conf
conf-file /etc/smartdns.d/bogus-nxdomain.china.smartdns.conf
cache-file /tmp/smartdns.cache
log-level notice
@@ -325,38 +364,6 @@ server-https https://dns.alidns.com/dns-query
```
### 6.2. SmartDNS 插件
本步骤为可选操作,通过安装特殊的 `SmartDNS` 配置文件,以屏蔽广告或加快中国境内域名的解析速度。
若需使用 `SmartDNS` 屏蔽广告,则需下载广告规则配置文件。
```bash
## 创建 SmartDNS 配置文件目录
$ sudo mkdir -p /etc/smartdns.d
## 下载广告规则配置文件
$ sudo curl -LR -o /etc/smartdns.d/anti-ad.smartdns.conf https://anti-ad.net/anti-ad-for-smartdns.conf
```
`SmartDNS` 的加速规则通过 `bash` 脚本安装,脚本生成的配置文件位于 `/etc/smartdns.d` 目录。
关于脚本的详细介绍,请参阅 [SmartDNS China List 安装脚本](https://gitee.com/callmer/smartdns_china_list_installer) 。
```bash
## 下载加速规则安装脚本
$ sudo curl -LR -o /opt/smartdns_plugin.sh https://gitee.com/callmer/smartdns_china_list_installer/raw/main/smartdns_plugin.sh
## 设置脚本可执行权限
$ sudo chmod +x /opt/smartdns_plugin.sh
## 设置脚本文件防篡改
$ sudo chattr +i /opt/smartdns_plugin.sh
## 执行脚本
$ sudo bash /opt/smartdns_plugin.sh
```
### 6.3.定时任务
本步骤为可选操作,主要用于设置 `SmartDNS` 定时更新广告过滤配置文件和定时重启。
+8 -1
View File
@@ -12,7 +12,14 @@
# server 2402:4e00::
# server 2400:3200::1
conf-file /etc/smartdns.d/*.conf
conf-file /etc/smartdns.d/anti-ad.smartdns.conf
conf-file /etc/smartdns.d/dns-group.china.smartdns.conf
conf-file /etc/smartdns.d/apple.china.smartdns.conf
conf-file /etc/smartdns.d/google.china.smartdns.conf
conf-file /etc/smartdns.d/accelerated-domains.china.smartdns.conf
conf-file /etc/smartdns.d/bogus-nxdomain.china.smartdns.conf
cache-file /tmp/smartdns.cache
log-level notice