mirror of
https://github.com/daeuniverse/dae.git
synced 2025-07-07 00:42:22 +07:00
docs: DNS
This commit is contained in:
38
docs/dns.md
38
docs/dns.md
@ -1,6 +1,8 @@
|
||||
# DNS
|
||||
|
||||
## Examples:
|
||||
dae will intercept all UDP traffic to port 53 and sniff DNS. Here gives some examples and templates for DNS configuration.
|
||||
|
||||
## Examples
|
||||
|
||||
```shell
|
||||
dns {
|
||||
@ -47,3 +49,37 @@ dns {
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Templates
|
||||
|
||||
```shell
|
||||
# Use alidns for all DNS queries and fallback to googledns if pollution result detected.
|
||||
dns {
|
||||
upstream {
|
||||
googledns: 'tcp+udp://dns.google:53'
|
||||
alidns: 'udp://dns.alidns.com:53'
|
||||
}
|
||||
request {
|
||||
fallback: alidns
|
||||
}
|
||||
response {
|
||||
upstream(googledns) -> accept
|
||||
!qname(geosite:cn) && ip(geoip:private) -> googledns
|
||||
fallback: accept
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
```shell
|
||||
# Use alidns for China mainland domains and googledns for others.
|
||||
dns {
|
||||
upstream {
|
||||
googledns: 'tcp+udp://dns.google:53'
|
||||
alidns: 'udp://dns.alidns.com:53'
|
||||
}
|
||||
request {
|
||||
qname(geosite:cn) -> alidns
|
||||
fallback: googledns
|
||||
}
|
||||
}
|
||||
```
|
||||
|
@ -136,9 +136,10 @@ subscription {
|
||||
dns {
|
||||
upstream {
|
||||
googledns: 'tcp+udp://dns.google:53'
|
||||
alidns: 'udp://dns.alidns.com:53'
|
||||
}
|
||||
request {
|
||||
fallback: asis
|
||||
fallback: alidns
|
||||
}
|
||||
response {
|
||||
upstream(googledns) -> accept
|
||||
|
Reference in New Issue
Block a user