luci-app-mosdns: use the fallback
plugin to process apple domain names
* Using `always_standby` can improve query efficiency
This commit is contained in:
parent
4e6801dc45
commit
476d0bf24f
@ -114,6 +114,13 @@ plugins:
|
||||
upstreams:
|
||||
- addr: remote_dns
|
||||
|
||||
- tag: forward_remote_upstream
|
||||
type: sequence
|
||||
args:
|
||||
- exec: prefer_ipv4
|
||||
- exec: ecs_remote
|
||||
- exec: $forward_remote
|
||||
|
||||
- tag: modify_ttl
|
||||
type: sequence
|
||||
args:
|
||||
@ -124,18 +131,6 @@ plugins:
|
||||
args:
|
||||
- exec: ttl 5-5
|
||||
|
||||
- tag: local_sequence
|
||||
type: sequence
|
||||
args:
|
||||
- exec: $forward_local
|
||||
|
||||
- tag: remote_sequence
|
||||
type: sequence
|
||||
args:
|
||||
- exec: prefer_ipv4
|
||||
- exec: ecs_remote
|
||||
- exec: $forward_remote
|
||||
|
||||
- tag: has_resp_sequence
|
||||
type: sequence
|
||||
args:
|
||||
@ -148,66 +143,65 @@ plugins:
|
||||
- matches: has_resp
|
||||
exec: accept
|
||||
|
||||
- tag: query_is_local_ip
|
||||
- tag: query_is_non_local_ip
|
||||
type: sequence
|
||||
args:
|
||||
- exec: $local_sequence
|
||||
- exec: $forward_local
|
||||
- matches: "!resp_ip $geoip_cn"
|
||||
exec: drop_resp
|
||||
|
||||
- tag: query_is_remote
|
||||
type: sequence
|
||||
args:
|
||||
- exec: $remote_sequence
|
||||
|
||||
- tag: fallback
|
||||
type: fallback
|
||||
args:
|
||||
primary: query_is_local_ip
|
||||
secondary: query_is_remote
|
||||
primary: query_is_non_local_ip
|
||||
secondary: forward_remote_upstream
|
||||
threshold: 500
|
||||
always_standby: true
|
||||
|
||||
- tag: apple_domain_fallback
|
||||
type: fallback
|
||||
args:
|
||||
primary: query_is_non_local_ip
|
||||
secondary: forward_xinfeng_udp
|
||||
threshold: 100
|
||||
always_standby: true
|
||||
|
||||
- tag: query_is_apple_domain
|
||||
type: sequence
|
||||
args:
|
||||
- matches: "!qname $geosite_apple"
|
||||
exec: return
|
||||
- exec: $forward_local
|
||||
- matches: "!resp_ip $geoip_cn"
|
||||
exec: drop_resp
|
||||
- matches: "!has_resp"
|
||||
exec: $forward_xinfeng_udp
|
||||
- exec: $apple_domain_fallback
|
||||
|
||||
- tag: query_is_ddns_domain
|
||||
type: sequence
|
||||
args:
|
||||
- matches: qname $ddnslist
|
||||
exec: $local_sequence
|
||||
exec: $forward_local
|
||||
|
||||
- tag: query_is_local_domain
|
||||
type: sequence
|
||||
args:
|
||||
- matches: qname $geosite_cn
|
||||
exec: $local_sequence
|
||||
exec: $forward_local
|
||||
|
||||
- tag: query_is_no_local_domain
|
||||
type: sequence
|
||||
args:
|
||||
- matches: qname $geosite_no_cn
|
||||
exec: $remote_sequence
|
||||
exec: $forward_remote_upstream
|
||||
|
||||
- tag: query_is_whitelist_domain
|
||||
type: sequence
|
||||
args:
|
||||
- matches: qname $whitelist
|
||||
exec: $local_sequence
|
||||
exec: $forward_local
|
||||
|
||||
- tag: query_is_greylist_domain
|
||||
type: sequence
|
||||
args:
|
||||
- matches: qname $greylist
|
||||
exec: $remote_sequence
|
||||
exec: $forward_remote_upstream
|
||||
|
||||
- tag: query_is_reject_domain
|
||||
type: sequence
|
||||
|
Loading…
Reference in New Issue
Block a user