docs: refine DNS example (#329)

This commit is contained in:
Ekko 2023-10-21 03:04:13 -05:00 committed by GitHub
parent 9e7460f588
commit 49be5c7eb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 8 additions and 8 deletions

View File

@ -180,7 +180,7 @@ dns {
}
response {
upstream(googledns) -> accept
!qname(geosite:cn) && ip(geoip:private) -> googledns
ip(geoip:private) && !qname(geosite:cn) -> googledns
fallback: accept
}
}

View File

@ -62,7 +62,7 @@ dns {
upstream(googledns) -> accept
# If DNS request name is not in CN and response answers include private IP, which is most likely polluted
# in China mainland. Therefore, resend DNS request to 'googledns' to get correct result.
!qname(geosite:cn) && ip(geoip:private) -> googledns
ip(geoip:private) && !qname(geosite:cn) -> googledns
fallback: accept
}
}
@ -112,7 +112,7 @@ dns {
# Trusted upstream. Always accept its result.
upstream(googledns) -> accept
# Possibly polluted, re-lookup using googledns.
!qname(geosite:cn) && ip(geoip:private) -> googledns
ip(geoip:private) && !qname(geosite:cn) -> googledns
# fallback is also called default.
fallback: accept
}

View File

@ -127,7 +127,7 @@ dns {
}
response {
upstream(googledns) -> accept
!qname(geosite:cn) && ip(geoip:private) -> googledns
ip(geoip:private) && !qname(geosite:cn) -> googledns
fallback: accept
}
}

View File

@ -174,7 +174,7 @@ dns {
}
response {
upstream(googledns) -> accept
!qname(geosite:cn) && ip(geoip:private) -> googledns
ip(geoip:private) && !qname(geosite:cn) -> googledns
fallback: accept
}
}

View File

@ -61,7 +61,7 @@ dns {
# 接受upstream 'googledns' 回复的 DNS 响应。 有助于避免回环。
upstream(googledns) -> accept
# 若 DNS 请求的域名不属于 CN 且回复包含私有 IP 大抵是被污染了,向 'googledns' 重查。
!qname(geosite:cn) && ip(geoip:private) -> googledns
ip(geoip:private) && !qname(geosite:cn) -> googledns
fallback: accept
}
}
@ -111,7 +111,7 @@ dns {
# 可信的 upstream。总是接受它的回复。
upstream(googledns) -> accept
# 疑似被污染结果,向 'googledns' 重查。
!qname(geosite:cn) && ip(geoip:private) -> googledns
ip(geoip:private) && !qname(geosite:cn) -> googledns
# fallback 意为 default。
fallback: accept
}

View File

@ -152,7 +152,7 @@ dns {
# Trusted upstream. Always accept its result.
upstream(googledns) -> accept
# Possibly polluted, re-lookup using googledns.
!qname(geosite:cn) && ip(geoip:private) -> googledns
ip(geoip:private) && !qname(geosite:cn) -> googledns
# fallback is also called default.
fallback: accept
}