mosdns/dns.yaml
dengxiongjian 59a5ef4aae
Some checks failed
Test mosdns / build (push) Has been cancelled
主要优化点:
1. 连接管理优化 mikrotik_addresslist_impl.go:132
    - 添加连接状态管理和重连锁机制
    - 改进重连逻辑,防止并发重连
  2. 缓存机制增强 mikrotik_addresslist_impl.go:162-202
    - 优化缓存锁使用,避免死锁
    - 添加缓存大小限制和LRU驱逐策略
    - 定期清理过期缓存项
  3. 智能重试机制 mikrotik_addresslist_impl.go:420
    - 指数退避算法
    - 更智能的连接错误识别
    - 改进的错误处理
  4. 动态并发控制 mikrotik_addresslist_impl.go:589
    - 根据地址数量动态调整工作池大小
    - 批量处理优化
  5. 性能监控改进
    - 更详细的日志记录
    - 缓存统计信息
    - 处理过程可观察性
2025-08-04 09:02:30 +08:00

58 lines
1.5 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 # 同步向 3 条上游并发查询
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 插件 - 处理 Amazon 相关域名
# 示例:将地址列表改为 gfw
- tag: mikrotik_amazon
type: mikrotik_addresslist
args:
host: "10.248.0.1"
port: 9728
username: "admin"
password: "szn0s!nw@pwd()"
use_tls: false
timeout: 10
address_list4: "gfw" # 改为 gfw插件会自动创建这个地址列表
mask4: 24
comment: "amazon_domain"
timeout_addr: 86400
cache_ttl: 86400