config: update config for domain-rules

This commit is contained in:
Nick Peng
2023-03-24 22:33:29 +08:00
parent 2de76a5c8e
commit 5ded52d4c0
2 changed files with 19 additions and 1 deletions

View File

@@ -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
```

View File

@@ -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
```