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:
|
upstreams:
|
||||||
- addr: remote_dns
|
- addr: remote_dns
|
||||||
|
|
||||||
|
- tag: forward_remote_upstream
|
||||||
|
type: sequence
|
||||||
|
args:
|
||||||
|
- exec: prefer_ipv4
|
||||||
|
- exec: ecs_remote
|
||||||
|
- exec: $forward_remote
|
||||||
|
|
||||||
- tag: modify_ttl
|
- tag: modify_ttl
|
||||||
type: sequence
|
type: sequence
|
||||||
args:
|
args:
|
||||||
@ -124,18 +131,6 @@ plugins:
|
|||||||
args:
|
args:
|
||||||
- exec: ttl 5-5
|
- 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
|
- tag: has_resp_sequence
|
||||||
type: sequence
|
type: sequence
|
||||||
args:
|
args:
|
||||||
@ -148,66 +143,65 @@ plugins:
|
|||||||
- matches: has_resp
|
- matches: has_resp
|
||||||
exec: accept
|
exec: accept
|
||||||
|
|
||||||
- tag: query_is_local_ip
|
- tag: query_is_non_local_ip
|
||||||
type: sequence
|
type: sequence
|
||||||
args:
|
args:
|
||||||
- exec: $local_sequence
|
- exec: $forward_local
|
||||||
- matches: "!resp_ip $geoip_cn"
|
- matches: "!resp_ip $geoip_cn"
|
||||||
exec: drop_resp
|
exec: drop_resp
|
||||||
|
|
||||||
- tag: query_is_remote
|
|
||||||
type: sequence
|
|
||||||
args:
|
|
||||||
- exec: $remote_sequence
|
|
||||||
|
|
||||||
- tag: fallback
|
- tag: fallback
|
||||||
type: fallback
|
type: fallback
|
||||||
args:
|
args:
|
||||||
primary: query_is_local_ip
|
primary: query_is_non_local_ip
|
||||||
secondary: query_is_remote
|
secondary: forward_remote_upstream
|
||||||
threshold: 500
|
threshold: 500
|
||||||
always_standby: true
|
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
|
- tag: query_is_apple_domain
|
||||||
type: sequence
|
type: sequence
|
||||||
args:
|
args:
|
||||||
- matches: "!qname $geosite_apple"
|
- matches: "!qname $geosite_apple"
|
||||||
exec: return
|
exec: return
|
||||||
- exec: $forward_local
|
- exec: $apple_domain_fallback
|
||||||
- matches: "!resp_ip $geoip_cn"
|
|
||||||
exec: drop_resp
|
|
||||||
- matches: "!has_resp"
|
|
||||||
exec: $forward_xinfeng_udp
|
|
||||||
|
|
||||||
- tag: query_is_ddns_domain
|
- tag: query_is_ddns_domain
|
||||||
type: sequence
|
type: sequence
|
||||||
args:
|
args:
|
||||||
- matches: qname $ddnslist
|
- matches: qname $ddnslist
|
||||||
exec: $local_sequence
|
exec: $forward_local
|
||||||
|
|
||||||
- tag: query_is_local_domain
|
- tag: query_is_local_domain
|
||||||
type: sequence
|
type: sequence
|
||||||
args:
|
args:
|
||||||
- matches: qname $geosite_cn
|
- matches: qname $geosite_cn
|
||||||
exec: $local_sequence
|
exec: $forward_local
|
||||||
|
|
||||||
- tag: query_is_no_local_domain
|
- tag: query_is_no_local_domain
|
||||||
type: sequence
|
type: sequence
|
||||||
args:
|
args:
|
||||||
- matches: qname $geosite_no_cn
|
- matches: qname $geosite_no_cn
|
||||||
exec: $remote_sequence
|
exec: $forward_remote_upstream
|
||||||
|
|
||||||
- tag: query_is_whitelist_domain
|
- tag: query_is_whitelist_domain
|
||||||
type: sequence
|
type: sequence
|
||||||
args:
|
args:
|
||||||
- matches: qname $whitelist
|
- matches: qname $whitelist
|
||||||
exec: $local_sequence
|
exec: $forward_local
|
||||||
|
|
||||||
- tag: query_is_greylist_domain
|
- tag: query_is_greylist_domain
|
||||||
type: sequence
|
type: sequence
|
||||||
args:
|
args:
|
||||||
- matches: qname $greylist
|
- matches: qname $greylist
|
||||||
exec: $remote_sequence
|
exec: $forward_remote_upstream
|
||||||
|
|
||||||
- tag: query_is_reject_domain
|
- tag: query_is_reject_domain
|
||||||
type: sequence
|
type: sequence
|
||||||
|
Loading…
Reference in New Issue
Block a user