From 85426396fddd19b750c64c68449fbb6e23cd1f6f Mon Sep 17 00:00:00 2001 From: cmliu Date: Sat, 17 Jan 2026 16:27:20 +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=96ECH=E5=90=AF=E7=94=A8?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E5=B9=B6=E8=B0=83=E6=95=B4fallback=20DNS?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _worker.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/_worker.js b/_worker.js index 4b3dc17..058efc0 100644 --- a/_worker.js +++ b/_worker.js @@ -786,6 +786,8 @@ async function httpConnect(targetHost, targetPort, initialData) { } //////////////////////////////////////////////////功能性函数/////////////////////////////////////////////// function Clash订阅配置文件热补丁(Clash_原始订阅内容, uuid = null, ECH启用 = false) { + if (!ECH启用) return Clash_原始订阅内容; + const clash_yaml = `dns: enable: true default-nameserver: @@ -797,10 +799,12 @@ function Clash订阅配置文件热补丁(Clash_原始订阅内容, uuid = null, - https://sm2.doh.pub/dns-query - https://dns.alidns.com/dns-query fallback: - - 'https://dns.google/dns-query' - - 'https://1.1.1.1/dns-query' + - 8.8.4.4 + - 101.101.101.101 + - 208.67.220.220 fallback-filter: geoip: true + domain: [+.google.com, +.facebook.com, +.youtube.com] ipcidr: - 240.0.0.0/4 - 0.0.0.0/32 @@ -810,7 +814,7 @@ function Clash订阅配置文件热补丁(Clash_原始订阅内容, uuid = null, - https://doh.cmliussss.net/CMLiussss ` + Clash_原始订阅内容; - if (!uuid || !ECH启用) return clash_yaml; + if (!uuid) return clash_yaml; const lines = clash_yaml.split('\n'); const processedLines = []; let i = 0;