Skip to content

Commit 4d27e5b

Browse files
committed
feat: 脚本链接叠加参数调整
1 parent e2011de commit 4d27e5b

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

backend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sub-store",
3-
"version": "2.19.9",
3+
"version": "2.19.10",
44
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and Shadowrocket.",
55
"main": "src/main.js",
66
"scripts": {

backend/src/core/proxy-utils/index.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,7 @@ async function processFn(
114114
if (item.type.indexOf('Script') !== -1) {
115115
const { mode, content } = item.args;
116116
if (mode === 'link') {
117-
let noCache;
118117
let url = content || '';
119-
if (url.endsWith('#noCache')) {
120-
url = url.replace(/#noCache$/, '');
121-
noCache = true;
122-
}
123118
// extract link arguments
124119
const rawArgs = url.split('#');
125120
if (rawArgs.length > 1) {
@@ -138,7 +133,14 @@ async function processFn(
138133
}
139134
}
140135
}
141-
url = `${url.split('#')[0]}${noCache ? '#noCache' : ''}`;
136+
url = `${url.split('#')[0]}${
137+
rawArgs[2]
138+
? `#${rawArgs[2]}`
139+
: $arguments?.noCache != null ||
140+
$arguments?.insecure != null
141+
? `#${rawArgs[1]}`
142+
: ''
143+
}`;
142144
const downloadUrlMatch = url.match(
143145
/^\/api\/(file|module)\/(.+)/,
144146
);

0 commit comments

Comments
 (0)