|
log: |
|
level: info |
|
file: "/var/log/mosdns.log" |
|
|
|
api: |
|
http: "0.0.0.0:8338" |
|
|
|
include: [] |
|
|
|
plugins: |
|
- tag: geosite_cn |
|
type: domain_set |
|
args: |
|
files: |
|
- "/var/mosdns/geosite_cn.txt" |
|
|
|
- tag: geoip_cn |
|
type: ip_set |
|
args: |
|
files: |
|
- "/var/mosdns/geoip_cn.txt" |
|
|
|
- tag: geosite_no_cn |
|
type: domain_set |
|
args: |
|
files: |
|
- "/var/mosdns/geosite_geolocation-!cn.txt" |
|
|
|
- tag: whitelist |
|
type: domain_set |
|
args: |
|
files: |
|
- "/etc/mosdns/rule/whitelist.txt" |
|
|
|
- tag: blocklist |
|
type: domain_set |
|
args: |
|
files: |
|
- "/etc/mosdns/rule/blocklist.txt" |
|
|
|
- tag: greylist |
|
type: domain_set |
|
args: |
|
files: |
|
- "/etc/mosdns/rule/greylist.txt" |
|
|
|
- tag: ddnslist |
|
type: domain_set |
|
args: |
|
files: |
|
- "/etc/mosdns/rule/ddnslist.txt" |
|
|
|
- tag: hosts |
|
type: hosts |
|
args: |
|
files: |
|
- "/etc/mosdns/rule/hosts.txt" |
|
|
|
- tag: redirect |
|
type: redirect |
|
args: |
|
files: |
|
- "/etc/mosdns/rule/redirect.txt" |
|
|
|
- tag: adlist |
|
type: domain_set |
|
args: |
|
files: |
|
- "/etc/mosdns/rule/adlist.txt" |
|
|
|
- tag: local_ptr |
|
type: domain_set |
|
args: |
|
files: |
|
- "/etc/mosdns/rule/local-ptr.txt" |
|
|
|
- tag: lazy_cache |
|
type: cache |
|
args: |
|
size: 20000 |
|
lazy_cache_ttl: 86400 |
|
|
|
- tag: reject_3 |
|
type: sequence |
|
args: |
|
- exec: reject 3 |
|
|
|
- tag: reject_blocklist |
|
type: sequence |
|
args: |
|
- exec: query_summary reject_blocklist |
|
- exec: $reject_3 |
|
|
|
- tag: reject_adlist |
|
type: sequence |
|
args: |
|
- exec: query_summary reject_adlist |
|
- exec: $reject_3 |
|
|
|
- tag: reject_ptrlist |
|
type: sequence |
|
args: |
|
- exec: query_summary reject_ptrlist |
|
- exec: $reject_3 |
|
|
|
- tag: reject_qtype65 |
|
type: sequence |
|
args: |
|
- exec: query_summary reject_qtype65 |
|
- exec: $reject_3 |
|
|
|
- tag: forward_local |
|
type: forward |
|
args: |
|
concurrent: 1 |
|
upstreams: |
|
- addr: 119.29.29.29 |
|
bootstrap: 119.29.29.29 |
|
enable_pipeline: false |
|
max_conns: 2 |
|
insecure_skip_verify: false |
|
idle_timeout: 30 |
|
- addr: 223.5.5.5 |
|
bootstrap: 119.29.29.29 |
|
enable_pipeline: false |
|
max_conns: 2 |
|
insecure_skip_verify: false |
|
idle_timeout: 30 |
|
|
|
- tag: forward_remote |
|
type: forward |
|
args: |
|
concurrent: 1 |
|
upstreams: |
|
- addr: tls://8.8.8.8 |
|
bootstrap: 119.29.29.29 |
|
enable_pipeline: false |
|
max_conns: 2 |
|
insecure_skip_verify: false |
|
idle_timeout: 30 |
|
enable_http3: false |
|
- addr: tls://8.8.4.4 |
|
bootstrap: 119.29.29.29 |
|
enable_pipeline: false |
|
max_conns: 2 |
|
insecure_skip_verify: false |
|
idle_timeout: 30 |
|
enable_http3: false |
|
- addr: tls://1.1.1.1 |
|
bootstrap: 119.29.29.29 |
|
enable_pipeline: false |
|
max_conns: 2 |
|
insecure_skip_verify: false |
|
idle_timeout: 30 |
|
enable_http3: false |
|
- addr: tls://208.67.222.222 |
|
bootstrap: 119.29.29.29 |
|
enable_pipeline: false |
|
max_conns: 2 |
|
insecure_skip_verify: false |
|
idle_timeout: 30 |
|
enable_http3: false |
|
|
|
- tag: modify_ttl |
|
type: sequence |
|
args: |
|
- exec: ttl 0-0 |
|
|
|
- tag: modify_ddns_ttl |
|
type: sequence |
|
args: |
|
- exec: ttl 5-5 |
|
|
|
- tag: local_sequence |
|
type: sequence |
|
args: |
|
- exec: query_summary forward_local |
|
- exec: $forward_local |
|
|
|
- tag: remote_sequence |
|
type: sequence |
|
args: |
|
- exec: query_summary forward_remote |
|
- exec: prefer_ipv4 |
|
- exec: $forward_remote |
|
|
|
- tag: has_resp_sequence |
|
type: sequence |
|
args: |
|
- matches: qname $ddnslist |
|
exec: $modify_ddns_ttl |
|
- matches: "!qname $ddnslist" |
|
exec: $modify_ttl |
|
- matches: has_resp |
|
exec: accept |
|
|
|
- tag: query_is_local_ip |
|
type: sequence |
|
args: |
|
- exec: $local_sequence |
|
- 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 |
|
threshold: 500 |
|
always_standby: true |
|
|
|
- tag: query_is_ddns_domain |
|
type: sequence |
|
args: |
|
- matches: qname $ddnslist |
|
exec: $local_sequence |
|
|
|
- tag: query_is_local_domain |
|
type: sequence |
|
args: |
|
- matches: qname $geosite_cn |
|
exec: $local_sequence |
|
|
|
- tag: query_is_no_local_domain |
|
type: sequence |
|
args: |
|
- matches: qname $geosite_no_cn |
|
exec: $remote_sequence |
|
|
|
- tag: query_is_whitelist_domain |
|
type: sequence |
|
args: |
|
- matches: qname $whitelist |
|
exec: $local_sequence |
|
|
|
- tag: query_is_greylist_domain |
|
type: sequence |
|
args: |
|
- matches: qname $greylist |
|
exec: $remote_sequence |
|
|
|
- tag: query_is_reject_domain |
|
type: sequence |
|
args: |
|
- matches: qname $blocklist |
|
exec: $reject_blocklist |
|
- matches: qname $adlist |
|
exec: $reject_adlist |
|
- matches: |
|
- qtype 12 |
|
- qname $local_ptr |
|
exec: $reject_ptrlist |
|
- matches: qtype 65 |
|
exec: $reject_qtype65 |
|
|
|
- tag: fallback_sequence |
|
type: sequence |
|
args: |
|
- exec: query_summary fallback |
|
- exec: $fallback |
|
|
|
- tag: main_sequence |
|
type: sequence |
|
args: |
|
- exec: metrics_collector metrics |
|
- exec: $hosts |
|
- exec: jump has_resp_sequence |
|
- matches: |
|
- "!qname $ddnslist" |
|
- "!qname $blocklist" |
|
- "!qname $adlist" |
|
- "!qname $local_ptr" |
|
exec: $lazy_cache |
|
- exec: $redirect |
|
- exec: jump has_resp_sequence |
|
- exec: $query_is_ddns_domain |
|
- exec: jump has_resp_sequence |
|
- exec: $query_is_whitelist_domain |
|
- exec: jump has_resp_sequence |
|
- exec: $query_is_reject_domain |
|
- exec: jump has_resp_sequence |
|
- exec: $query_is_greylist_domain |
|
- exec: jump has_resp_sequence |
|
- exec: $query_is_local_domain |
|
- exec: jump has_resp_sequence |
|
- exec: $query_is_no_local_domain |
|
- exec: jump has_resp_sequence |
|
- exec: $fallback_sequence |
|
|
|
- tag: udp_server |
|
type: udp_server |
|
args: |
|
entry: main_sequence |
|
listen: ":5335" |
|
|
|
- tag: tcp_server |
|
type: tcp_server |
|
args: |
|
entry: main_sequence |
|
listen: ":5335" |
2024-10-19T03:29:00.668193Z INFO vector::topology::builder: Healthcheck passed.
2024-10-19T03:37:32.995231Z ERROR transform{component_kind="transform" component_id=mosdns-data component_type=remap}: vector::internal_events::remap: Mapping failed with event. error="function call error for "parse_timestamp" at (128:184): Invalid timestamp "2024-10-19 11:37:29": input contains invalid characters" error_type="conversion_failed" stage="processing" internal_log_rate_limit=true
2024-10-19T03:37:32.995332Z ERROR transform{component_kind="transform" component_id=mosdns-data component_type=remap}: vector_common::internal_event::component_events_dropped: Events dropped intentional=false count=1 reason="Mapping failed with event." internal_log_rate_limit=true
是不是5.3.3 的日期格式改了