Skip to content

Commit

Permalink
docs: refine DNS example (#329)
Browse files Browse the repository at this point in the history
  • Loading branch information
EkkoG authored Oct 21, 2023
1 parent 9e7460f commit 49be5c7
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/en/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down
4 changes: 2 additions & 2 deletions docs/en/configuration/dns.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion docs/en/tutorials/run-on-macos.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down
2 changes: 1 addition & 1 deletion docs/zh/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down
4 changes: 2 additions & 2 deletions docs/zh/configuration/dns.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion example.dae
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 49be5c7

Please sign in to comment.