commit 89338a5ee9990cce61c4c465734a92837839cc61 Author: YGXB_net Date: Mon Oct 13 14:47:26 2025 +0000 上传文件至 .gitea/workflows/test.yaml diff --git a/.gitea/workflows/test.yaml/config.yaml b/.gitea/workflows/test.yaml/config.yaml new file mode 100644 index 0000000..9f382c2 --- /dev/null +++ b/.gitea/workflows/test.yaml/config.yaml @@ -0,0 +1,76 @@ +log: + level: warn + production: true + +plugins: +# 缓存 + - tag: lazy_cache + type: cache + args: + size: 20000 + lazy_cache_ttl: 259200 + dump_file: "/etc/mosdns/cache.dump" + +# DNS服务器 + - tag: cn_forward + type: forward + args: + concurrent: 3 + upstreams: + - tag: dnspod + addr: "https://doh.pub/dns-query" + dial_addr: 1.12.12.21 + - tag: ali_dns + addr: "https://dns.alidns.com/dns-query" + dial_addr: 223.5.5.5 + - tag: 360_dns + addr: "https://doh.360.cn/dns-query" + bootstrap: "101.226.4.6" + + - tag: proxy_forward + type: forward + args: + concurrent: 3 + upstreams: + - tag: cf_doh + addr: "https://1.1.1.1/dns-query" + socks5: "192.168.3.10:5330" + - tag: google_doh + addr: "https://8.8.8.8/dns-query" + socks5: "192.168.3.10:5330" + - tag: quad9_doh + addr: "https://9.9.9.9/dns-query" + socks5: "192.168.3.10:5330" + + # 有响应终止返回 + - tag: has_resp_sequence + type: sequence + args: + - matches: has_resp + exec: accept + +# 规则 + - tag: cn_sequence + type: sequence + args: + - exec: $lazy_cache + - exec: jump has_resp_sequence + - exec: $cn_forward + + - tag: global_sequence + type: sequence + args: + - exec: $lazy_cache + - exec: jump has_resp_sequence + - exec: $proxy_forward + +# 启动 udp 服务器。 + - type: udp_server + args: + entry: cn_sequence + listen: :5301 + + - type: udp_server + args: + entry: global_sequence + listen: :5302