mosdns/config-working.yaml

59 lines
906 B
YAML

# 简化配置 - 验证基础功能
log:
level: info
api:
http: "0.0.0.0:8081"
web:
http: "0.0.0.0:5556"
plugins:
# DNS 上游
- tag: forward_local
type: forward
args:
concurrent: 2
upstreams:
- addr: "223.5.5.5"
- addr: "119.29.29.29"
- tag: forward_remote
type: forward
args:
concurrent: 2
upstreams:
- addr: "1.1.1.1"
- addr: "8.8.8.8"
# 缓存
- tag: main_cache
type: cache
args:
size: 10000
lazy_cache_ttl: 3600
# 主序列
- tag: main
type: sequence
args:
- exec: $main_cache
- exec: $forward_local
- matches:
- has_resp
exec: $main_cache
# 服务器
- tag: udp_server
type: udp_server
args:
entry: main
listen: ":5310"
- tag: tcp_server
type: tcp_server
args:
entry: main
listen: ":5310"