mirror of
https://github.com/daeuniverse/dae.git
synced 2025-01-24 10:03:07 +07:00
docs: more annotations for dns section
This commit is contained in:
parent
97a4e956fe
commit
cc50bea0fc
16
docs/dns.md
16
docs/dns.md
@ -20,6 +20,8 @@ dns {
|
|||||||
# The routing format of 'request' and 'response' is similar with section 'routing'.
|
# The routing format of 'request' and 'response' is similar with section 'routing'.
|
||||||
# See https://github.com/daeuniverse/dae/blob/main/docs/routing.md
|
# See https://github.com/daeuniverse/dae/blob/main/docs/routing.md
|
||||||
routing {
|
routing {
|
||||||
|
# According to the request of dns query, decide to use which DNS upstream.
|
||||||
|
# Match rules from top to bottom.
|
||||||
request {
|
request {
|
||||||
# Built-in upstream in 'request': asis.
|
# Built-in upstream in 'request': asis.
|
||||||
# You can also use user-defined upstreams.
|
# You can also use user-defined upstreams.
|
||||||
@ -36,6 +38,8 @@ dns {
|
|||||||
# If no match, fallback to this upstream.
|
# If no match, fallback to this upstream.
|
||||||
fallback: asis
|
fallback: asis
|
||||||
}
|
}
|
||||||
|
# According to the response of dns query, decide to accept or re-lookup using another DNS upstream.
|
||||||
|
# Match rules from top to bottom.
|
||||||
response {
|
response {
|
||||||
# No built-in upstream in 'response'.
|
# No built-in upstream in 'response'.
|
||||||
# You can use user-defined upstreams.
|
# You can use user-defined upstreams.
|
||||||
@ -63,8 +67,12 @@ dns {
|
|||||||
alidns: 'udp://dns.alidns.com:53'
|
alidns: 'udp://dns.alidns.com:53'
|
||||||
}
|
}
|
||||||
routing {
|
routing {
|
||||||
|
# According to the request of dns query, decide to use which DNS upstream.
|
||||||
|
# Match rules from top to bottom.
|
||||||
request {
|
request {
|
||||||
|
# Lookup China mainland domains using alidns, otherwise googledns.
|
||||||
qname(geosite:cn) -> alidns
|
qname(geosite:cn) -> alidns
|
||||||
|
# fallback is also called default.
|
||||||
fallback: googledns
|
fallback: googledns
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -79,12 +87,20 @@ dns {
|
|||||||
alidns: 'udp://dns.alidns.com:53'
|
alidns: 'udp://dns.alidns.com:53'
|
||||||
}
|
}
|
||||||
routing {
|
routing {
|
||||||
|
# According to the request of dns query, decide to use which DNS upstream.
|
||||||
|
# Match rules from top to bottom.
|
||||||
request {
|
request {
|
||||||
|
# fallback is also called default.
|
||||||
fallback: alidns
|
fallback: alidns
|
||||||
}
|
}
|
||||||
|
# According to the response of dns query, decide to accept or re-lookup using another DNS upstream.
|
||||||
|
# Match rules from top to bottom.
|
||||||
response {
|
response {
|
||||||
|
# Trusted upstream. Always accept its result.
|
||||||
upstream(googledns) -> accept
|
upstream(googledns) -> accept
|
||||||
|
# Possibly polluted, re-lookup using googledns.
|
||||||
!qname(geosite:cn) && ip(geoip:private) -> googledns
|
!qname(geosite:cn) && ip(geoip:private) -> googledns
|
||||||
|
# fallback is also called default.
|
||||||
fallback: accept
|
fallback: accept
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -89,12 +89,20 @@ dns {
|
|||||||
googledns: 'tcp+udp://dns.google:53'
|
googledns: 'tcp+udp://dns.google:53'
|
||||||
}
|
}
|
||||||
routing {
|
routing {
|
||||||
|
# According to the request of dns query, decide to use which DNS upstream.
|
||||||
|
# Match rules from top to bottom.
|
||||||
request {
|
request {
|
||||||
|
# fallback is also called default.
|
||||||
fallback: alidns
|
fallback: alidns
|
||||||
}
|
}
|
||||||
|
# According to the response of dns query, decide to accept or re-lookup using another DNS upstream.
|
||||||
|
# Match rules from top to bottom.
|
||||||
response {
|
response {
|
||||||
|
# Trusted upstream. Always accept its result.
|
||||||
upstream(googledns) -> accept
|
upstream(googledns) -> accept
|
||||||
|
# Possibly polluted, re-lookup using googledns.
|
||||||
!qname(geosite:cn) && ip(geoip:private) -> googledns
|
!qname(geosite:cn) && ip(geoip:private) -> googledns
|
||||||
|
# fallback is also called default.
|
||||||
fallback: accept
|
fallback: accept
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user