Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
pymumu committed Jun 3, 2023
1 parent 66ecf68 commit 3b359a1
Show file tree
Hide file tree
Showing 11 changed files with 55 additions and 53 deletions.
4 changes: 2 additions & 2 deletions docs/config/ad-block.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ hide:

# 广告屏蔽

smartdns可以通过指定对应域名返回SOA用于广告屏蔽
smartdns可以通过address选项来屏蔽广告

注意:openwrt有luci的方式,请参考openwrt屏蔽域名配置方法。

Expand Down Expand Up @@ -63,7 +63,7 @@ b.com
1. 下载配置文件到`/etc/smartdns`目录

```shell
wget https://github.com/privacy-protection-tools/anti-AD/blob/master/anti-ad-smartdns.conf -o /etc/smartdns/anti-ad-smartdns.conf
wget https://anti-ad.net/anti-ad-for-smartdns.conf -O /etc/smartdns/anti-ad-smartdns.conf
```

1. 修改/etc/smartdns/smartdns.conf文件,包含上述配置文件
Expand Down
2 changes: 1 addition & 1 deletion docs/config/basic-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ hide:

# 基础配置

smartdns配置选项,功能比较丰富,但作为最基本的DNS服务,只需要配置服务端口号,和上游服务器即可,其他参数默认情况下,对于家庭本地网络已经是最佳配置。
smartdns配置的选项,功能比较丰富,但作为最基本的DNS服务,只需要配置服务端口号和上游服务器即可,其他参数默认情况下,对于家庭本地网络已经是最佳配置,无需做过多的修改

## 配置样例

Expand Down
2 changes: 1 addition & 1 deletion docs/config/block-ipv6.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ hide:

# 禁用IPV6

目前IPV6已经进入千家万户,但部分情况下,需要禁用IPV6地址,smartdns支持如下方式禁用IPV6地址。
目前IPV6已经进入千家万户,但有时需要禁用IPV6地址,smartdns支持如下方式禁用IPV6地址。

1. 方法一:完全禁用IPV6

Expand Down
4 changes: 2 additions & 2 deletions docs/config/bootstrap-dns.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ hide:

# Bootstrap DNS

对于域名类的上游服务器,SmartDNS会使用其他IP地址类的服务器进行解析,所以一般情况下无需配置BootStrap DNS,但如果有特殊需求,需要指定BootStrap DNS,则可以通过如下方式配置:
BootStrap DNS一般用于自启动的域名解析,如对于域名类的上游服务器,此时用于自启动解析域名的DNS称之为BootStrap DNS。
默认情况下,SmartDNS会使用其他IP地址类的服务器进行解析,所以只要确保有至少一个IP地址类型的DNS上游即可自动解析后续的域名类上游服务器;但某些时候,需要指定一组DNS专门用于bootstrap域名解析,此时可通过如下方式配置:

1. 方法一:对所有服务器指定bootstrap DNS

Expand All @@ -27,4 +28,3 @@ hide:
# 此服务器将使用1.2.3.4解析
server dns.server
```

4 changes: 2 additions & 2 deletions docs/config/check-speed-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ SmartDNS提供了两种测速模式,分别是ping和tcp。smartdns默认使用

## 响应模式配置

Smartdns支持通过`response-mode`设置首次请求响应模式,这三中模式影响查询结果和响应时间,smartdns默认使用了优化方案,但用户也可根据需要进行修改;这三种模式对应的功能和性能如下:
Smartdns支持通过`response-mode`设置首次请求响应模式,这三种模式影响查询结果和响应时间,smartdns默认使用了优化方案,但用户也可根据需要进行修改;这三种模式对应的功能和性能如下:

|模式|配置项|时延|结果|说明
|---|---|---|---|---
|最快ping响应地址模式|first-ping|适中|可能次佳|DNS上游最快查询时延+ping时延最短,查询等待与链接体验最佳。(当前默认)
|最快IP地址模式|fastest-ip|长|最佳|查询到的所有IP地址中ping最短的IP。DNS查询时间最长,IP链接最短。(之前模式)
|最快响应的DNS模式|fastest-response|短|可能最差|DNS查询等待时间最短。

对于开启了缓存功能后,缓存后的数据,无论使用哪种方式,其结果时最佳的,所以不建议关闭缓存。
对于开启了缓存功能后,缓存后的数据,无论使用哪种方式,smartdns都会将最佳结果保存到缓存中,所以不建议关闭缓存。

## 对指定域名设置返回模式

Expand Down
2 changes: 1 addition & 1 deletion docs/config/domain-forwarding.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ smartdns可以支持将特定域名使用特定的 DNS 服务器来查询来做

## 更多能力

通过上述配置即可实现 DNS 解析分流后,如果需要实现按请求端端口分流,可以配置第二 DNS 服务器,`bind` 配置增加 `--group` 参数指定分流名称
通过上述配置即可实现 DNS 解析分流后,如果需要实现按请求端端口分流,可以配置第二 DNS 服务器,`bind` 配置增加 `--group` 参数指定分流服务器组名称

```shell
bind :7053 -group office
Expand Down
6 changes: 4 additions & 2 deletions docs/config/edns-client-subnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ SmartDNS提供了设置`edns-client-subnet`的能力,edns-client-subnet原本

## 跨运营商的IP优化

运营商的DNS服务器都是将自己网络的网站或CDN服务器IP给客户端,比如qq.com,用联通的DNS,查询的就是联通网段的IP,你用电信的,查询的就是电信网段的IP。运营商一般不会给你跨网IP。除非某个网站就只有在某个运营商的网络。但某些网站,运营商自己网络的ip可能要跨好几个省,时延比较大,不如同省跨运营商去访问。这时可以通过edns-client-subnet能力,查询到一个异网的IP,然后再让smartdns测速后,返回时延较小的IP给客户端。
运营商的DNS服务器都是将自己网络的网站或CDN服务器IP给客户端,比如qq.com,用联通的DNS,查询的就是联通网段的IP,用电信的DNS,查询的就是电信网段的IP。
运营商一般不会给你跨网IP,除非某个网站就只有在某个运营商的网络。但某些网站,运营商自己网络的ip可能要跨好几个省,时延比较大,不如同省跨运营商去访问。
这时可以通过edns-client-subnet能力,查询到一个异网的IP,然后再让smartdns测速后,返回时延较小的IP给客户端。

### 配置

Expand All @@ -38,4 +40,4 @@ server 8.8.8.8 -subnet [广东电信IP]
server 8.8.8.8 -proxy beijing -subnet [广东电信IP]
```

这样即使通过北京代理到8.8.8.8查询结果,但因为指定了客户端子网为广东电信IP,那么8.8.8.8就会范围合适广东电信网络的IP地址
这样即使通过北京代理到8.8.8.8查询结果,但因为指定了客户端子网为广东电信IP,那么8.8.8.8就会返回合适广东电信网络的IP地址
40 changes: 20 additions & 20 deletions docs/config/ipset-nftset.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,60 +16,60 @@ hide:

1. 基本配置

通过如下参数可以配置指定域名的IPSet规则
通过如下参数可以配置指定域名的NFTSet规则

```shell
nftset /domain/[#4:ip#table#set,#6:ipv6#table#setv6]
ipset /domain/ipset
```

1. 超时

SmartDNS设置IPSet,支持设置是否启用超时功能,这样可以避免IPSet中过多IP地址,网关性能下降。启用方式为
SmartDNS设置IPSet,支持设置是否启用超时功能,这样可以避免NFTSet中过多IP地址,网关性能下降。启用方式为

```shell
nftset-timeout yes
ipset-timeout yes
```

1. 测速失败后,自动添加到IPSet

SmartDNS可以将测速失败的IP地址,加入IPSet,再由相关IP规则转发

```shell
nftset-no-speed ipsetname
```
1. DEBUG调试
如需要Debug调试,可以开启nftset的调试功能。
```shell
nftset-debug yes
ipset-no-speed ipsetname
```

## nftset配置

1. 基本配置

通过如下参数可以配置指定域名的NFTSet规则
通过如下参数可以配置指定域名的IPSet规则

```shell
ipset /domain/ipset
nftset /domain/[#4:ip#table#set,#6:ipv6#table#setv6]
```
1. 超时
SmartDNS设置IPSet,支持设置是否启用超时功能,这样可以避免NFTSet中过多IP地址,网关性能下降。启用方式为
SmartDNS设置IPSet,支持设置是否启用超时功能,这样可以避免IPSet中过多IP地址,网关性能下降。启用方式为
```shell
ipset-timeout yes
nftset-timeout yes
```
1. 测速失败后,自动添加到IPSet
SmartDNS可以将测速失败的IP地址,加入IPSet,再由相关IP规则转发
```shell
ipset-no-speed ipsetname
nftset-no-speed ipsetname
```
1. DEBUG调试
如需要Debug调试,可以开启nftset的调试功能。
```shell
nftset-debug yes
```
## 对特定的服务端口设置ipset和nftset
Expand All @@ -82,5 +82,5 @@ smartdns的bind参数,支持设置ipset和nftset,当设置了ipset和nftset
bind [::]:6053 -ipset [ipset] -nftset [nftset]
```
* -ipset:参数选项参考ipset选项。
* -nftset:选项参考nftset。
* -ipset:参数选项参考ipset选项。
* -nftset:选项参考nftset。
2 changes: 1 addition & 1 deletion en/docs/config/ad-block.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ The community provides regularly updated ad-blocking list files for SmartDNS. Yo
1. Download the configuration file to the `/etc/smartdns` directory:

```shell
wget https://github.com/privacy-protection-tools/anti-AD/blob/master/anti-ad-smartdns.conf -o /etc/smartdns/anti-ad-smartdns.conf
wget https://anti-ad.net/anti-ad-for-smartdns.conf -O /etc/smartdns/anti-ad-smartdns.conf
```

1. Modify the `/etc/smartdns/smartdns.conf` file to include the above configuration file:
Expand Down
2 changes: 1 addition & 1 deletion en/docs/config/check-speed-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ SmartDNS supports setting the first request response mode through `response-mode
| Fastest IP address mode | fastest-ip | Long | Best | The IP address with the shortest ping among all queried IP addresses. The longest DNS query time and the shortest IP link. (Previous mode)
| Fastest response DNS mode | fastest-response | Short | Possibly worst | Shortest DNS query waiting time.

For cached data after enabling cache function, the results are best regardless of which method is used, so it is not recommended to disable cache.
For cached data after the cache function is turned on, no matter which mode is used, smartdns will save the best result in the cache, so it is not recommended to close the cache.

## Set return mode for specified domain name

Expand Down
40 changes: 20 additions & 20 deletions en/docs/config/ipset-nftset.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,60 +16,60 @@ Like Dnsmasq, smartdns supports ipset and nftset, which can use TPROXY to transp

1. Basic configuration

The following parameters can be used to configure IPSet rules for specified domain names.
The following parameters can be used to configure NFTSet rules for specified domain names.

```shell
nftset /domain/[#4:ip#table#set,#6:ipv6#table#setv6]
ipset /domain/ipset
```

1. Timeout

SmartDNS sets IPSet to support enabling timeout function, which can avoid too many IP addresses in IPSet and reduce gateway performance.
SmartDNS sets IPSet to support enabling timeout function, which can avoid too many IP addresses in NFTSet and reduce gateway performance.

```shell
nftset-timeout yes
ipset-timeout yes
```

1. Automatically add to IPSet after speed measurement fails

SmartDNS can add IP addresses that fail the speed measurement to IPSet, and then forward them through related IP rules.

```shell
nftset-no-speed ipsetname
```
1. Debugging
If debugging is needed, nftset's debugging function can be enabled.
```shell
nftset-debug yes
ipset-no-speed ipsetname
```

## nftset configuration

1. Basic configuration

The following parameters can be used to configure NFTSet rules for specified domain names.
The following parameters can be used to configure IPSet rules for specified domain names.

```shell
ipset /domain/ipset
nftset /domain/[#4:ip#table#set,#6:ipv6#table#setv6]
```
1. Timeout
SmartDNS sets IPSet to support enabling timeout function, which can avoid too many IP addresses in NFTSet and reduce gateway performance.
SmartDNS sets IPSet to support enabling timeout function, which can avoid too many IP addresses in IPSet and reduce gateway performance.
```shell
ipset-timeout yes
nftset-timeout yes
```
1. Automatically add to IPSet after speed measurement fails
SmartDNS can add IP addresses that fail the speed measurement to IPSet, and then forward them through related IP rules.
```shell
ipset-no-speed ipsetname
nftset-no-speed ipsetname
```
1. Debugging
If debugging is needed, nftset's debugging function can be enabled.
```shell
nftset-debug yes
```
## Set ipset and nftset for specific service ports
Expand All @@ -82,5 +82,5 @@ Through the following configuration, all query requests for ports can be set int
bind [::]:6053 -ipset [ipset] -nftset [nftset]
```
* -ipset: Refer to ipset options for parameter options.
* -nftset: options refer to nftset.
* -ipset: Refer to ipset options for parameter options.
* -nftset: options refer to nftset.

0 comments on commit 3b359a1

Please sign in to comment.