diff --git a/docs/configuration.md b/docs/configuration.md index 6bc0f6695b..9dbbca33af 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -23,8 +23,8 @@ hide: | cache-size | 域名结果缓存个数 | 自动,根据系统内存自动调整大小 | 大于等于 0 的数字 | cache-size 512 | | cache-persist | 是否持久化缓存 | 自动。
当 cache-file 所在的位置有超过 128 MB 的可用空间时启用,否则禁用。 | [yes\|no] | cache-persist yes | | cache-file | 缓存持久化文件路径 | /var/cache/
smartdns.cache | 合法路径字符串 | cache-file /tmp/smartdns.cache | -| cache-checkpoint-time | 缓存持久化时间 | 24小时 | 0 或 大于120的数字, 0表示禁用周期持久化, 其他值表示定期持久化的时间。 | cache-checkpoint-time 0 -| tcp-idle-time | TCP 链接空闲超时时间 | 120 | 大于等于 0 的数字 | tcp-idle-time 120 | +| cache-checkpoint-time | 缓存持久化时间 | 24小时 |秒, 0 或 大于120的数字, 0表示禁用周期持久化, 其他值表示定期持久化的时间。 | cache-checkpoint-time 0 +| tcp-idle-time | TCP 链接空闲超时时间 | 120 |秒, 大于等于 0 的数字 | tcp-idle-time 120 | | rr-ttl | 域名结果 TTL | 远程查询结果 | 大于 0 的数字 | rr-ttl 600 | | rr-ttl-min | 允许的最小 TTL 值 | 远程查询结果 | 大于 0 的数字 | rr-ttl-min 60 | | rr-ttl-max | 允许的最大 TTL 值 | 远程查询结果 | 大于 0 的数字 | rr-ttl-max 600 | @@ -51,10 +51,10 @@ hide: | group-end | 规则组结束 | 无 | 和group-begin搭配使用 | group-end | | group-match | 匹配组规则 | 无 | 当满足条件时使用对应的规则组
[-g\|group group-name]: 指定规则组,可选,不指定时,使用当前group-begin的组。
[-client-ip ip-set\|ip/cidr\|mac address]: 指定客户端IP地址,匹配时,使用指定的组。
[-domain domain]: 指定域名,匹配时使用指定的组。 | group-match -client-ip 1.1.1.1 -domain a.com
group-match -client-ip ip-set:clients -domain domain-set:domainlist | conf-file | 附加配置文件 | 无 | path [-g\|group group-name]
path: 合法路径字符串,通配符号
[-g\|group]: 对应配置文件配置所属规则组 | conf-file /etc/smartdns/smartdns.more.conf
conf-file \*.conf
conf-file \*.conf -group oversea | -| server | 上游 UDP DNS | 无 | 可重复。
[ip][:port]\|URL:服务器 IP:端口(可选)或 URL
[-blacklist-ip]:配置 IP 过滤结果。
[-whitelist-ip]:指定仅接受参数中配置的 IP 范围
[-g\|-group [group] ...]:DNS 服务器所属组,比如 office 和 foreign,和 nameserver 配套使用
[-e\|-exclude-default-group]:将 DNS 服务器从默认组中排除。
[-set-mark mark]:设置数据包标记so-mark。
[-p\|-proxy name]:设置代理服务器。
[-b\|-bootstrap-dns]:标记此服务器为bootstrap服务器。
[-subnet]:指定服务器使用的edns-client-subnet。
[-interface]:绑定到对应的网口。| server 8.8.8.8:53 -blacklist-ip -group g1 -proxy proxy
server tls://8.8.8.8| -| server-tcp | 上游 TCP DNS | 无 | 可重复。
[ip][:port]:服务器 IP:端口(可选)
[-blacklist-ip]:配置 IP 过滤结果
[-whitelist-ip]:指定仅接受参数中配置的 IP 范围。
[-g\|-group [group] ...]:DNS 服务器所属组,比如 office 和 foreign,和 nameserver 配套使用
[-e\|-exclude-default-group]:将 DNS 服务器从默认组中排除。
[-set-mark mark]:设置数据包标记so-mark。
[-p\|-proxy name]:设置代理服务器。
[-b\|-bootstrap-dns]:标记此服务器为bootstrap服务器。
[-subnet]:指定服务器使用的edns-client-subnet。
[-interface]:绑定到对应的网口。| server-tcp 8.8.8.8:53 | -| server-tls | 上游 TLS DNS | 无 | 可重复。
[ip][:port]:服务器 IP:端口(可选)
[-spki-pin [sha256-pin]]:TLS 合法性校验 SPKI 值,base64 编码的 sha256 SPKI pin 值
[-host-name]:TLS SNI 名称, 名称设置为-,表示停用SNI名称。
[-host-ip]: 主机IP地址。
[-tls-host-verify]:TLS 证书主机名校验
[-k\|-no-check-certificate]:跳过证书校验
[-blacklist-ip]:配置 IP 过滤结果
[-whitelist-ip]:仅接受参数中配置的 IP 范围
[-g\|-group [group] ...]:DNS 服务器所属组,比如 office 和 foreign,和 nameserver 配套使用
[-e\|-exclude-default-group]:将 DNS 服务器从默认组中排除。
[-set-mark mark]:设置数据包标记so-mark。
[-p\|-proxy name]:设置代理服务器。
[-b\|-bootstrap-dns]:标记此服务器为bootstrap服务器。
[-subnet]:指定服务器使用的edns-client-subnet。
[-interface]:绑定到对应的网口。| server-tls 8.8.8.8:853 | -| server-https | 上游 HTTPS DNS | 无 | 可重复。
https://[host>][:port]/path:服务器 IP:端口(可选)
[-spki-pin [sha256-pin]]:TLS 合法性校验 SPKI 值,base64 编码的 sha256 SPKI pin 值
[-host-name]:TLS SNI 名称, 名称设置为-,表示停用SNI名称。
[-host-ip]: 主机IP地址。
[-http-host]:http 协议头主机名
[-tls-host-verify]:TLS 证书主机名校验
[-k\|-no-check-certificate]:跳过证书校验
[-blacklist-ip]:配置 IP 过滤结果
[-whitelist-ip]:仅接受参数中配置的 IP 范围。
[-g\|-group [group] ...]:DNS 服务器所属组,比如 office 和 foreign,和 nameserver 配套使用
[-e\|-exclude-default-group]:将 DNS 服务器从默认组中排除。
[-set-mark]:设置数据包标记so-mark。
[-p\|-proxy name]:设置代理服务器。
[-b\|-bootstrap-dns]:标记此服务器为bootstrap服务器。
[-subnet]:指定服务器使用的edns-client-subnet。
[-interface]:绑定到对应的网口。| server-https https://cloudflare-dns.com/dns-query | +| server | 上游 UDP DNS | 无 | 可重复。
[ip][:port]\|URL:服务器 IP:端口(可选)或 URL
[-blacklist-ip]:配置 IP 过滤结果。
[-whitelist-ip]:指定仅接受参数中配置的 IP 范围
[-g\|-group [group] ...]:DNS 服务器所属组,比如 office 和 foreign,和 nameserver 配套使用
[-e\|-exclude-default-group]:将 DNS 服务器从默认组中排除。
[-set-mark mark]:设置数据包标记so-mark。
[-p\|-proxy name]:设置代理服务器。
[-b\|-bootstrap-dns]:标记此服务器为bootstrap服务器。
[-subnet]:指定服务器使用的edns-client-subnet。
[-tcp-keepalive]: 设置TCP的连接超时时间(毫秒)。
[-subnet-all-query-types]: 当设置ECS时,所有请求都发送ECS。
[-interface]:绑定到对应的网口。| server 8.8.8.8:53 -blacklist-ip -group g1 -proxy proxy
server tls://8.8.8.8| +| server-tcp | 上游 TCP DNS | 无 | 可重复。
[ip][:port]:服务器 IP:端口(可选)
[-blacklist-ip]:配置 IP 过滤结果
[-whitelist-ip]:指定仅接受参数中配置的 IP 范围。
[-g\|-group [group] ...]:DNS 服务器所属组,比如 office 和 foreign,和 nameserver 配套使用
[-e\|-exclude-default-group]:将 DNS 服务器从默认组中排除。
[-set-mark mark]:设置数据包标记so-mark。
[-p\|-proxy name]:设置代理服务器。
[-b\|-bootstrap-dns]:标记此服务器为bootstrap服务器。
[-subnet]:指定服务器使用的edns-client-subnet。
[-tcp-keepalive]: 设置TCP的连接超时时间(毫秒)。
[-subnet-all-query-types]: 当设置ECS时,所有请求都发送ECS。
[-interface]:绑定到对应的网口。| server-tcp 8.8.8.8:53 | +| server-tls | 上游 TLS DNS | 无 | 可重复。
[ip][:port]:服务器 IP:端口(可选)
[-spki-pin [sha256-pin]]:TLS 合法性校验 SPKI 值,base64 编码的 sha256 SPKI pin 值
[-host-name]:TLS SNI 名称, 名称设置为-,表示停用SNI名称。
[-host-ip]: 主机IP地址。
[-tls-host-verify]:TLS 证书主机名校验
[-k\|-no-check-certificate]:跳过证书校验
[-blacklist-ip]:配置 IP 过滤结果
[-whitelist-ip]:仅接受参数中配置的 IP 范围
[-g\|-group [group] ...]:DNS 服务器所属组,比如 office 和 foreign,和 nameserver 配套使用
[-e\|-exclude-default-group]:将 DNS 服务器从默认组中排除。
[-set-mark mark]:设置数据包标记so-mark。
[-p\|-proxy name]:设置代理服务器。
[-b\|-bootstrap-dns]:标记此服务器为bootstrap服务器。
[-subnet]:指定服务器使用的edns-client-subnet。
[-tcp-keepalive]: 设置TCP的连接超时时间(毫秒)。
[-subnet-all-query-types]: 当设置ECS时,所有请求都发送ECS。
[-interface]:绑定到对应的网口。| server-tls 8.8.8.8:853 | +| server-https | 上游 HTTPS DNS | 无 | 可重复。
https://[host>][:port]/path:服务器 IP:端口(可选)
[-spki-pin [sha256-pin]]:TLS 合法性校验 SPKI 值,base64 编码的 sha256 SPKI pin 值
[-host-name]:TLS SNI 名称, 名称设置为-,表示停用SNI名称。
[-host-ip]: 主机IP地址。
[-http-host]:http 协议头主机名
[-tls-host-verify]:TLS 证书主机名校验
[-k\|-no-check-certificate]:跳过证书校验
[-blacklist-ip]:配置 IP 过滤结果
[-whitelist-ip]:仅接受参数中配置的 IP 范围。
[-g\|-group [group] ...]:DNS 服务器所属组,比如 office 和 foreign,和 nameserver 配套使用
[-e\|-exclude-default-group]:将 DNS 服务器从默认组中排除。
[-set-mark]:设置数据包标记so-mark。
[-p\|-proxy name]:设置代理服务器。
[-b\|-bootstrap-dns]:标记此服务器为bootstrap服务器。
[-subnet]:指定服务器使用的edns-client-subnet。
[-tcp-keepalive]: 设置TCP的连接超时时间(毫秒)。
[-subnet-all-query-types]: 当设置ECS时,所有请求都发送ECS。
[-interface]:绑定到对应的网口。| server-https https://cloudflare-dns.com/dns-query | | proxy-server | 代理服务器 | 无 | 可重复。
proxy-server URL
[URL]: [socks5\|http]://[username:password@]host:port
[-name]: 代理服务器名称。 |proxy-server socks5://user:pass@1.2.3.4:1080 -name proxy| | speed-check-mode | 测速模式选择 | ping,tcp:80,tcp:443 | [ping\|tcp:[80]\|none] | speed-check-mode ping,tcp:80,tcp:443 | | response-mode | 首次查询响应模式 | first-ping |模式:[first-ping\|fastest-ip\|fastest-response]
[first-ping]: 最快ping响应地址模式,DNS上游最快查询时延+ping时延最短,查询等待与链接体验最佳;
[fastest-ip]: 最快IP地址模式,查询到的所有IP地址中ping最短的IP。需等待IP测速;
[fastest-response]: 最快响应的DNS结果,DNS查询等待时间最短,返回的IP地址可能不是最快。| response-mode first-ping | diff --git a/docs/install/wsl.md b/docs/install/wsl.md index 7f630443b6..7254d37bae 100644 --- a/docs/install/wsl.md +++ b/docs/install/wsl.md @@ -32,7 +32,7 @@ D:\SMARTDNS 一般情况下,只需要增加 `server [IP]:port` 和 `server-tcp [IP]:port` 配置项, 尽可能配置多个上游DNS服务器,包括国内外的服务器。 -具体配置请参考[配置文件说明](#配置文件说明)。 +具体配置请参考[配置文件说明](../configuration.md)。 `smartdns.conf` 配置包含如下基本内容: diff --git a/en/docs/configuration.md b/en/docs/configuration.md index 2e9d92bdd5..0da3824a39 100644 --- a/en/docs/configuration.md +++ b/en/docs/configuration.md @@ -19,8 +19,8 @@ hide: |cache-size|Domain name result cache number|Auto: Set cache size by memory size. |integer|cache-size 512 |cache-persist|enable persist cache|Auto: Enabled if the location of `cache-file` has more than 128MB of free space.|[yes\|no]|cache-persist yes |cache-file|cache persist file|/var/cache/
smartdns.cache|path|cache-file /tmp/smartdns.cache -|cache-checkpoint-time| cache persist time | 24 hours | 0 or greater than 120, 0: disable, other: persis time in seconds | cache-checkpoint-time 0 -|tcp-idle-time|TCP connection idle timeout|120|integer|tcp-idle-time 120 +|cache-checkpoint-time| cache persist time | 24 hours |second, 0 or greater than 120, 0: disable, other: persis time in seconds | cache-checkpoint-time 0 +|tcp-idle-time|TCP connection idle timeout|120|second, integer|tcp-idle-time 120 |rr-ttl|Domain name TTL|Remote query result|number greater than 0|rr-ttl 600 |rr-ttl-min|Domain name Minimum TTL|Remote query result|number greater than 0|rr-ttl-min 60 |local-ttl|ttl for address and host|rr-ttl-min|number greater than 0|local-ttl 600 @@ -47,10 +47,10 @@ hide: |group-end|rule group end| None | Used with group-begin.| group-end | |group-match| Match group rules | None | Use the corresponding rule group when conditions are met.
`[-g\|group group-name]`: Specify the rule group, optional. If not specified, use the group from the current group-begin.
`[-client-ip ip-set\|ip/cidr\|mac address]`: Specify the client IP address, use the specified group when matched.
`[-domain domain]`: Specify the domain name, use the specified group when matched. | group-match -client-ip 1.1.1.1 -domain a.com
group-match -client-ip ip-set:clients -domain domain-set:domainlist |conf-file|additional conf file|None|file [-g\|-group group-name]
file: File path, wildcard.
[-g\|-group group-name]: The rule group to which the corresponding configuration file configuration belongs. |conf-file /etc/smartdns/smartdns.more.conf
conf-file \*.conf
conf-file \*.conf -g group-tv | -|server|Upstream UDP DNS server|None|Repeatable
`[ip][:port]|URL`: Server IP, port optional OR URL.
`[-blacklist-ip]`: The "-blacklist-ip" parameter is to filtering IPs which is configured by "blacklist-ip".
`[-whitelist-ip]`: whitelist-ip parameter specifies that only the IP range configured in whitelist-ip is accepted.
`[-g|-group [group] ...]`: The group to which the DNS server belongs, such as office, foreign, use with nameserver.
`[-e|-exclude-default-group]`: Exclude DNS servers from the default group.
`[-set-mark mark]`: set mark on packets
`[-p|-proxy name]`: set proxy server
`[-b|-bootstrap-dns]`: set as bootstrap dns server
[-subnet]:set per server edns-client-subnet.
[-interface]: bind to interface. | server 8.8.8.8:53 -blacklist-ip
server tls://8.8.8.8 -|server-tcp|Upstream TCP DNS server|None|Repeatable
`[ip][:port]`: Server IP, port optional.
`[-blacklist-ip]`: The "-blacklist-ip" parameter is to filtering IPs which is configured by "blacklist-ip".
`[-whitelist-ip]`: whitelist-ip parameter specifies that only the IP range configured in whitelist-ip is accepted.
`[-g|-group [group] ...]`: The group to which the DNS server belongs, such as office, foreign, use with nameserver.
`[-e|-exclude-default-group]`: Exclude DNS servers from the default group
`[-set-mark mark]`: set mark on packets
`[-p|-proxy name]`: set proxy server
`[-b|-bootstrap-dns]`: set as bootstrap dns server
[-subnet]:set per server edns-client-subnet.
[-interface]: bind to interface. | server-tcp 8.8.8.8:53 -|server-tls|Upstream TLS DNS server|None|Repeatable
`[ip][:port]`: Server IP, port optional.
`[-spki-pin [sha256-pin]]`: TLS verify SPKI value, a base64 encoded SHA256 hash
`[-host-name]`:TLS Server name. `-` to disable SNI name.
[-host-ip]: host ip address.
`[-tls-host-verify]`: TLS cert hostname to verify.
`[-k|-no-check-certificate]`: No check certificate.
`[-blacklist-ip]`: The "-blacklist-ip" parameter is to filtering IPs which is configured by "blacklist-ip".
`[-whitelist-ip]`: whitelist-ip parameter specifies that only the IP range configured in whitelist-ip is accepted.
`[-g|-group [group] ...]`: The group to which the DNS server belongs, such as office, foreign, use with nameserver.
`[-e|-exclude-default-group]`: Exclude DNS servers from the default group
`[-set-mark mark]`: set mark on packets
`[-p|-proxy name]`: set proxy server
`[-b|-bootstrap-dns]`: set as bootstrap dns server
[-subnet]:set per server edns-client-subnet.
[-interface]: bind to interface. | server-tls 8.8.8.8:853 -|server-https|Upstream HTTPS DNS server|None|Repeatable
`https://[host][:port]/path`: Server IP, port optional.
`[-spki-pin [sha256-pin]]`: TLS verify SPKI value, a base64 encoded SHA256 hash
`[-host-name]`:TLS Server name
`[-http-host]`: http header host.
[-host-ip]: host ip address.
`[-tls-host-verify]`: TLS cert hostname to verify.
`[-k|-no-check-certificate]`: No check certificate.
`[-blacklist-ip]`: The "-blacklist-ip" parameter is to filtering IPs which is configured by "blacklist-ip".
`[-whitelist-ip]`: whitelist-ip parameter specifies that only the IP range configured in whitelist-ip is accepted.
`[-g|-group [group] ...]`: The group to which the DNS server belongs, such as office, foreign, use with nameserver.
`[-e|-exclude-default-group]`: Exclude DNS servers from the default group
`[-set-mark mark]`: set mark on packets
`[-p|-proxy name]`: set proxy server
`[-b|-bootstrap-dns]`: set as bootstrap dns server
[-subnet]:set per server edns-client-subnet.
[-interface]: bind to interface. | server-https +|server|Upstream UDP DNS server|None|Repeatable
`[ip][:port]|URL`: Server IP, port optional OR URL.
`[-blacklist-ip]`: The "-blacklist-ip" parameter is to filtering IPs which is configured by "blacklist-ip".
`[-whitelist-ip]`: whitelist-ip parameter specifies that only the IP range configured in whitelist-ip is accepted.
`[-g|-group [group] ...]`: The group to which the DNS server belongs, such as office, foreign, use with nameserver.
`[-e|-exclude-default-group]`: Exclude DNS servers from the default group.
`[-set-mark mark]`: set mark on packets
`[-p|-proxy name]`: set proxy server
`[-b|-bootstrap-dns]`: set as bootstrap dns server
[-subnet]:set per server edns-client-subnet.
[-tcp-keepalive]: set tcp connection keep alive time.
[-subnet-all-query-types]: when ECS is enabled, send all types of query with ECS.[-interface]: bind to interface. | server 8.8.8.8:53 -blacklist-ip
server tls://8.8.8.8 +|server-tcp|Upstream TCP DNS server|None|Repeatable
`[ip][:port]`: Server IP, port optional.
`[-blacklist-ip]`: The "-blacklist-ip" parameter is to filtering IPs which is configured by "blacklist-ip".
`[-whitelist-ip]`: whitelist-ip parameter specifies that only the IP range configured in whitelist-ip is accepted.
`[-g|-group [group] ...]`: The group to which the DNS server belongs, such as office, foreign, use with nameserver.
`[-e|-exclude-default-group]`: Exclude DNS servers from the default group
`[-set-mark mark]`: set mark on packets
`[-p|-proxy name]`: set proxy server
`[-b|-bootstrap-dns]`: set as bootstrap dns server
[-subnet]:set per server edns-client-subnet.
[-tcp-keepalive]: set tcp connection keep alive time.
[-subnet-all-query-types]: when ECS is enabled, send all types of query with ECS.[-interface]: bind to interface. | server-tcp 8.8.8.8:53 +|server-tls|Upstream TLS DNS server|None|Repeatable
`[ip][:port]`: Server IP, port optional.
`[-spki-pin [sha256-pin]]`: TLS verify SPKI value, a base64 encoded SHA256 hash
`[-host-name]`:TLS Server name. `-` to disable SNI name.
[-host-ip]: host ip address.
`[-tls-host-verify]`: TLS cert hostname to verify.
`[-k|-no-check-certificate]`: No check certificate.
`[-blacklist-ip]`: The "-blacklist-ip" parameter is to filtering IPs which is configured by "blacklist-ip".
`[-whitelist-ip]`: whitelist-ip parameter specifies that only the IP range configured in whitelist-ip is accepted.
`[-g|-group [group] ...]`: The group to which the DNS server belongs, such as office, foreign, use with nameserver.
`[-e|-exclude-default-group]`: Exclude DNS servers from the default group
`[-set-mark mark]`: set mark on packets
`[-p|-proxy name]`: set proxy server
`[-b|-bootstrap-dns]`: set as bootstrap dns server
[-subnet]:set per server edns-client-subnet.
[-tcp-keepalive]: set tcp connection keep alive time.
[-subnet-all-query-types]: when ECS is enabled, send all types of query with ECS.[-interface]: bind to interface. | server-tls 8.8.8.8:853 +|server-https|Upstream HTTPS DNS server|None|Repeatable
`https://[host][:port]/path`: Server IP, port optional.
`[-spki-pin [sha256-pin]]`: TLS verify SPKI value, a base64 encoded SHA256 hash
`[-host-name]`:TLS Server name
`[-http-host]`: http header host.
[-host-ip]: host ip address.
`[-tls-host-verify]`: TLS cert hostname to verify.
`[-k|-no-check-certificate]`: No check certificate.
`[-blacklist-ip]`: The "-blacklist-ip" parameter is to filtering IPs which is configured by "blacklist-ip".
`[-whitelist-ip]`: whitelist-ip parameter specifies that only the IP range configured in whitelist-ip is accepted.
`[-g|-group [group] ...]`: The group to which the DNS server belongs, such as office, foreign, use with nameserver.
`[-e|-exclude-default-group]`: Exclude DNS servers from the default group
`[-set-mark mark]`: set mark on packets
`[-p|-proxy name]`: set proxy server
`[-b|-bootstrap-dns]`: set as bootstrap dns server
[-subnet]:set per server edns-client-subnet.
[-tcp-keepalive]: set tcp connection keep alive time.
[-subnet-all-query-types]: when ECS is enabled, send all types of query with ECS.[-interface]: bind to interface. | server-https |proxy-server| proxy server | None | Repeatable.
`proxy-server URL`
[URL]: `[socks5\|http]://[username:password@]host:port`
[-name]: proxy server name. |proxy-server socks5://user:pass@1.2.3.4:1080 -name proxy| |speed-check-mode|Speed ​​mode|ping,tcp:80,tcp:443|[ping\|tcp:[80]\|none]|speed-check-mode ping,tcp:80,tcp:443 |response-mode|First query response mode|first-ping|Mode: [first-ping\|fastest-ip\|fastest-response]
[first-ping]: The fastest dns + ping response mode, DNS query delay + ping delay is the shortest;
[fastest-ip]: The fastest IP address mode, return the fastest ip address, may take some time to test speed.
[fastest-response]: The fastest response DNS result mode, the DNS query waiting time is the shortest. | response-mode first-ping |