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)\/(.+)/, );