mosdns/dns-optimized.yaml

67 lines
2.3 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

################ DNS Plugins - 性能优化版 #################
plugins:
- tag: mikrotik-one
type: forward
args:
concurrent: 1
upstreams:
- addr: "udp://10.248.0.1"
- tag: cn-dns
type: forward
args:
concurrent: 6
upstreams:
- addr: "udp://202.96.128.86"
- addr: "udp://202.96.128.166"
- addr: "udp://119.29.29.29"
- addr: "udp://223.5.5.5"
- addr: "udp://114.114.114.114"
- addr: "udp://180.76.76.76"
- tag: jp-dns
type: forward
args:
concurrent: 4
upstreams:
- addr: "tls://1dot1dot1dot1.cloudflare-dns.com"
dial_addr: "1.1.1.1"
enable_pipeline: true
- addr: "tls://1dot1dot1dot1.cloudflare-dns.com"
dial_addr: "1.0.0.1"
enable_pipeline: true
- addr: "tls://dns.google"
dial_addr: "8.8.8.8"
enable_pipeline: true
- addr: "tls://dns.google"
dial_addr: "8.8.4.4"
enable_pipeline: true
# MikroTik Address List 插件 - 性能优化配置
- tag: mikrotik_amazon
type: mikrotik_addresslist
args:
host: "10.248.0.1"
port: 9728
username: "admin"
password: "szn0s!nw@pwd()"
use_tls: false
timeout: 3 # 🚀 减少连接超时到3秒
address_list4: "gfw"
mask4: 32 # 🚀 使用/32精确匹配避免网段冲突
comment: "auto-amazon"
timeout_addr: 43200 # 🚀 减少地址超时到12小时提高缓存命中率
cache_ttl: 7200 # 🚀 减少缓存TTL到2小时平衡性能和准确性
verify_add: false # 🚀 关闭验证,显著提升性能
add_all_ips: true # 🚀 启用多IP支持
max_ips: 10 # 🚀 限制每个域名最多10个IP避免过载
# 🚀 新增性能优化参数(如果支持的话)
batch_size: 20 # 批处理大小
worker_pool_size: 15 # 工作线程池大小
connection_pool_size: 5 # 连接池大小
retry_max: 2 # 最大重试次数
retry_backoff: 100 # 重试退避时间(ms)
enable_pipelining: true # 启用管道化处理