From 221c5e3448db2f1920e7e7708190717291467772 Mon Sep 17 00:00:00 2001 From: cmliu Date: Wed, 19 Nov 2025 13:18:17 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E9=9A=8F=E6=9C=BA=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E5=8F=8D=E4=BB=A3IP=E4=BB=A5=E5=A2=9E=E5=BC=BA=E4=BB=A3?= =?UTF-8?q?=E7=90=86=E8=AF=B7=E6=B1=82=E7=9A=84=E5=AE=89=E5=85=A8=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _worker.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/_worker.js b/_worker.js index 5f2e801..f7e3765 100644 --- a/_worker.js +++ b/_worker.js @@ -1074,10 +1074,12 @@ async function 反代参数获取(request) { // 统一处理反代IP参数 (优先级最高,使用正则一次匹配) const proxyMatch = pathLower.match(/\/(proxyip[.=]|pyip=|ip=)(.+)/); if (searchParams.has('proxyip')) { - 反代IP = searchParams.get('proxyip'); + const 路参IP = searchParams.get('proxyip'); + 反代IP = 路参IP.includes(',') ? 路参IP.split(',')[Math.floor(Math.random() * 路参IP.split(',').length)] : 路参IP; return; } else if (proxyMatch) { - 反代IP = proxyMatch[1] === 'proxyip.' ? `proxyip.${proxyMatch[2]}` : proxyMatch[2]; + const 路参IP = proxyMatch[1] === 'proxyip.' ? `proxyip.${proxyMatch[2]}` : proxyMatch[2]; + 反代IP = 路参IP.includes(',') ? 路参IP.split(',')[Math.floor(Math.random() * 路参IP.split(',').length)] : 路参IP; return; } From e10c07d7444637c3602c29388e53ecde391545d6 Mon Sep 17 00:00:00 2001 From: cmliu Date: Wed, 19 Nov 2025 13:29:18 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96=E9=87=8D=E5=AE=9A?= =?UTF-8?q?=E5=90=91=E9=80=BB=E8=BE=91=EF=BC=8C=E4=BD=BF=E7=94=A8URLSearch?= =?UTF-8?q?Params=E6=9E=84=E5=BB=BA=E6=9F=A5=E8=AF=A2=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _worker.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/_worker.js b/_worker.js index f7e3765..48c2576 100644 --- a/_worker.js +++ b/_worker.js @@ -27,7 +27,9 @@ export default { const 访问路径 = url.pathname.slice(1).toLowerCase(); const 区分大小写访问路径 = url.pathname.slice(1); if (访问路径 === 加密秘钥 && 加密秘钥 !== '勿动此默认密钥,有需求请自行通过添加变量KEY进行修改') {//快速订阅 - return new Response('重定向中...', { status: 302, headers: { 'Location': `/sub?token=${await MD5MD5(url.host + userID)}` } }); + const params = new URLSearchParams(url.search); + params.set('token', await MD5MD5(url.host + userID)); + return new Response('重定向中...', { status: 302, headers: { 'Location': `/sub?${params.toString()}` } }); } else if (访问路径 === 'login') {//处理登录页面和登录请求 const cookies = request.headers.get('Cookie') || ''; const authCookie = cookies.split(';').find(c => c.trim().startsWith('auth='))?.split('=')[1];