From 96e6f63c88f9432bf4dd5637cc21e6d2e72954ea Mon Sep 17 00:00:00 2001 From: xream Date: Thu, 27 Mar 2025 12:52:19 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=84=9A=E6=9C=AC=E9=93=BE=E6=8E=A5?= =?UTF-8?q?=E5=8F=A0=E5=8A=A0=E5=8F=82=E6=95=B0=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/package.json | 2 +- backend/src/core/proxy-utils/index.js | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/backend/package.json b/backend/package.json index a5ac06f..af7d797 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "sub-store", - "version": "2.19.9", + "version": "2.19.10", "description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and Shadowrocket.", "main": "src/main.js", "scripts": { diff --git a/backend/src/core/proxy-utils/index.js b/backend/src/core/proxy-utils/index.js index fc042a3..cdaf5f5 100644 --- a/backend/src/core/proxy-utils/index.js +++ b/backend/src/core/proxy-utils/index.js @@ -114,12 +114,7 @@ async function processFn( if (item.type.indexOf('Script') !== -1) { const { mode, content } = item.args; if (mode === 'link') { - let noCache; let url = content || ''; - if (url.endsWith('#noCache')) { - url = url.replace(/#noCache$/, ''); - noCache = true; - } // extract link arguments const rawArgs = url.split('#'); if (rawArgs.length > 1) { @@ -138,7 +133,14 @@ async function processFn( } } } - url = `${url.split('#')[0]}${noCache ? '#noCache' : ''}`; + url = `${url.split('#')[0]}${ + rawArgs[2] + ? `#${rawArgs[2]}` + : $arguments?.noCache != null || + $arguments?.insecure != null + ? `#${rawArgs[1]}` + : '' + }`; const downloadUrlMatch = url.match( /^\/api\/(file|module)\/(.+)/, );