config: update config for domain-rules
This commit is contained in:
@@ -21,6 +21,7 @@ cache-file /path/to/cache/file
|
||||
|
||||
1. smartdns默认自动根据磁盘空间是否启用缓存。
|
||||
1. 缓存文件只有在进程正常退出的时候才会保存供下次使用。
|
||||
1. 缓存大小cache-size一般情况无需设置,smartdns会根据系统内存情况自动设置。
|
||||
|
||||
## 缓存预获取
|
||||
|
||||
@@ -32,7 +33,7 @@ prefetch-domain yes
|
||||
|
||||
注意:
|
||||
|
||||
1. 此功能将会导致smaratdns消耗更多的CPU。
|
||||
1. 此功能将会导致smartdns消耗更多的CPU。
|
||||
|
||||
## 过期缓存
|
||||
|
||||
@@ -99,3 +100,11 @@ sequenceDiagram
|
||||
prefetch-domain yes
|
||||
serve-expired-prefetch-time 21600
|
||||
```
|
||||
|
||||
## 关闭特定域名的缓存
|
||||
|
||||
1. 某些情况下,可能需要关闭特定域名的缓存,比如DDNS。可以使用下面的配置关闭。
|
||||
|
||||
```shell
|
||||
domain-rules /example.com/ -no-cache
|
||||
```
|
||||
|
||||
@@ -61,3 +61,12 @@ Smartdns支持通过`response-mode`设置首次请求响应模式,这三中模
|
||||
|最快响应的DNS模式|fastest-response|短|可能最差|DNS查询等待时间最短。
|
||||
|
||||
对于开启了缓存功能后,缓存后的数据,无论使用哪种方式,其结果时最佳的,所以不建议关闭缓存。
|
||||
|
||||
## 对指定域名设置返回模式
|
||||
|
||||
1. 某些情况下,可能需要设置特定域名的响应模式,以提高上网体验,可以配置下面参数
|
||||
|
||||
```shell
|
||||
domain-rules /example.com/ -r first-ping
|
||||
domain-rules /example.com/ -response-mode fastest-response
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user