多个 sequence 之间共享 Cache 的问题 #55
-
如题,使用了两个 Server,当 我这样用是因为 V2Ray 可以通过 IP 分流,所以我不要求 log:
file: /var/log/mosdns/error.log
level: error
plugin:
- type: blackhole
tag: block
args:
ipv4: 0.0.0.0
ipv6: '::'
rcode: 0
- tag: "main_sequence"
type: sequence
args:
exec:
- _default_cache
- add_ecs
- if:
- is_ads
exec:
- block
- _end
- if:
- is_cn
exec:
- forward_local
- _end
- forward_remote
- _end
- tag: "second_sequence"
type: sequence
args:
exec:
- add_ecs
- if:
- is_ads
exec:
- block
- _end
- forward_local
- _end
- type: ecs
tag: add_ecs
args:
auto: true
force_overwrite: false
- type: server
tag: main
args:
entry: main_sequence
max_concurrent_queries: 0
server:
- addr: '127.0.0.1:53'
protocol: udp
- addr: '127.0.0.1:53'
protocol: tcp
- addr: '0.0.0.0:853'
protocol: dot
cert: /root/.ssl/dnsenc.crt
key: /root/.ssl/dnsenc.key
- addr: '127.0.0.1:5053'
protocol: http
get_user_ip_from_header: 'X-Forwarded-For'
url_path: "/dns-query"
- type: server
tag: second
args:
entry: second_sequence
max_concurrent_queries: 0
server:
- addr: '127.0.0.1:6053'
protocol: http
get_user_ip_from_header: 'X-Forwarded-For'
url_path: "/dns-query"
- type: fast_forward
tag: forward_local
args:
upstream:
- addr: 223.5.5.5:53
protocol: udp
timeout: 2
trusted: true
- addr: 223.6.6.6:53
protocol: udp
timeout: 2
trusted: true
- type: fast_forward
tag: forward_remote
args:
upstream:
- addr: 8.8.8.8
insecure_skip_verify: false
protocol: tcp
timeout: 3
trusted: true
socks5: '127.0.0.1:1081'
- type: query_matcher
tag: is_ads
args:
domain:
- /usr/local/share/v2ray/geosite.dat:ads
- type: query_matcher
tag: is_cn
args:
domain:
- /usr/local/share/v2ray/geosite.dat:cn |
Beta Was this translation helpful? Give feedback.
Answered by
IrineSistiana
Jan 27, 2021
Replies: 1 comment 1 reply
-
插件是独立的 .default cache 是一个插件,当然是一个缓存。 配置俩缓存插件。 |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
CalmLong
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
插件是独立的 .default cache 是一个插件,当然是一个缓存。
配置俩缓存插件。