From 971fd5cc70b4e84d913338b17bcabb75789ecb97 Mon Sep 17 00:00:00 2001 From: cmliu Date: Thu, 22 Jan 2026 14:08:01 +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=E6=B7=BB=E5=8A=A0query-server-name=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E5=88=B0ech-opts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _worker.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/_worker.js b/_worker.js index 2f06cda..87e1b14 100644 --- a/_worker.js +++ b/_worker.js @@ -908,7 +908,7 @@ function Clash订阅配置文件热补丁(Clash_原始订阅内容, uuid = null, if (credentialMatch && credentialMatch[1].trim() === uuid.trim()) { // 在最后一个}前添加ech-opts - fullNode = fullNode.replace(/\}(\s*)$/, `, ech-opts: {enable: true}}$1`); + fullNode = fullNode.replace(/\}(\s*)$/, `, ech-opts: {enable: true, query-server-name: cloudflare-ech.com}}$1`); } processedLines.push(fullNode); @@ -983,7 +983,8 @@ function Clash订阅配置文件热补丁(Clash_原始订阅内容, uuid = null, // 在节点末尾(最后一个属性块之后)插入 ech-opts 属性 nodeLines.splice(insertIndex + 1, 0, `${indent}ech-opts:`, - `${indent} enable: true` + `${indent} enable: true`, + `${indent} query-server-name: cloudflare-ech.com` ); } }