From 89338a5ee9990cce61c4c465734a92837839cc61 Mon Sep 17 00:00:00 2001 From: YGXB_net Date: Mon, 13 Oct 2025 14:47:26 +0000 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=96=87=E4=BB=B6=E8=87=B3?= =?UTF-8?q?=20.gitea/workflows/test.yaml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/test.yaml/config.yaml | 76 ++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 .gitea/workflows/test.yaml/config.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