mosdns/config.d/rules/example-game-cn.yaml
dengxiongjian 0413ee5d44
Some checks failed
Test mosdns / build (push) Has been cancelled
二次开发
2025-10-16 21:07:48 +08:00

36 lines
853 B
YAML
Raw Permalink 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不需要 MikroTik 同步
# ============================================
plugins:
# 1. 域名集合定义
- tag: domains_game_cn
type: domain_set
args:
files:
- "/usr/local/yltx-dns/domains/game-cn.txt"
# 2. 解析策略序列
- tag: rule_game_cn
type: sequence
args:
# 匹配游戏域名
- matches: qname $domains_game_cn
exec: prefer_ipv4
# 直接使用国内 DNS
- matches: qname $domains_game_cn
exec: $china-dns
# 返回结果
- matches:
- qname $domains_game_cn
- has_resp
exec: accept
# 记录日志
- matches: qname $domains_game_cn
exec: query_summary game_cn_resolved