From be0de65748c2e2c8769e41c44b12e30e32d1b6f2 Mon Sep 17 00:00:00 2001 From: cmliu Date: Fri, 23 Jan 2026 20:46:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9B=B4=E6=96=B0Clash=E8=AE=A2?= =?UTF-8?q?=E9=98=85=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6=E7=83=AD=E8=A1=A5?= =?UTF-8?q?=E4=B8=81=EF=BC=8C=E4=BC=98=E5=8C=96fallback=E5=92=8Cnameserver?= =?UTF-8?q?-policy=E6=9D=A1=E7=9B=AE=E7=9A=84=E7=94=9F=E6=88=90=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _worker.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/_worker.js b/_worker.js index f99adab..315eb94 100644 --- a/_worker.js +++ b/_worker.js @@ -799,9 +799,8 @@ function Clash订阅配置文件热补丁(Clash_原始订阅内容, uuid = null, nameserver: - https://sm2.doh.pub/dns-query - https://dns.alidns.com/dns-query - fallback: + fallback:${ECH_DNS ? `\n - ${ECH_DNS}` : ''} - 8.8.4.4 - - 101.101.101.101 - 208.67.220.220 fallback-filter: geoip: true @@ -826,7 +825,7 @@ function Clash订阅配置文件热补丁(Clash_原始订阅内容, uuid = null, // 如果 ECH 启用且 HOSTS 有效,添加 nameserver-policy if (ECH启用 && HOSTS.length > 0) { // 生成 HOSTS 的 nameserver-policy 条目 - const hostsEntries = HOSTS.map(host => ` "${host}":\n - https://doh.cm.edu.kg/CMLiussss${ECH_DNS ? `\n - ${ECH_DNS}` : ''}\n - tls://223.5.5.5\n - tls://8.8.8.8`).join('\n'); + const hostsEntries = HOSTS.map(host => ` "${host}":${ECH_DNS ? `\n - ${ECH_DNS}` : ''}\n - https://doh.cm.edu.kg/CMLiussss`).join('\n'); // 检查是否存在 nameserver-policy: const hasNameserverPolicy = /^\s{2}nameserver-policy:\s*(?:\n|$)/m.test(clash_yaml);