Skip to content

Commit 0dc202e

Browse files
committed
feat: Stash 支持 MASQUE
1 parent 536bb1c commit 0dc202e

3 files changed

Lines changed: 9 additions & 5 deletions

File tree

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.36.34",
3+
"version": "2.36.35",
44
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and Shadowrocket.",
55
"main": "src/main.js",
66
"packageManager": "pnpm@11.0.9",

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1110,7 +1110,10 @@ function lastParse(proxy) {
11101110
}
11111111
}
11121112
}
1113-
if (['ws', 'http', 'h2'].includes(proxy.network)) {
1113+
if (
1114+
['ws', 'http', 'h2'].includes(proxy.network) &&
1115+
!['masque'].includes(proxy.type)
1116+
) {
11141117
if (
11151118
['ws', 'h2'].includes(proxy.network) &&
11161119
!proxy[`${proxy.network}-opts`]?.path

backend/src/core/proxy-utils/producers/stash.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export default function Stash_Producer() {
3636
'anytls',
3737
'tailscale',
3838
'trusttunnel',
39+
'masque',
3940
].includes(proxy.type) ||
4041
(proxy.type === 'ss' &&
4142
![
@@ -262,9 +263,9 @@ export default function Stash_Producer() {
262263
proxy['h2-opts']?.headers?.host ??
263264
proxy['h2-opts']?.headers?.Host;
264265
if (
265-
(isPresent(proxy, 'h2-opts.host') ||
266-
isPresent(proxy, 'h2-opts.headers.host') ||
267-
isPresent(proxy, 'h2-opts.headers.Host'))
266+
isPresent(proxy, 'h2-opts.host') ||
267+
isPresent(proxy, 'h2-opts.headers.host') ||
268+
isPresent(proxy, 'h2-opts.headers.Host')
268269
) {
269270
proxy['h2-opts'].host = Array.isArray(host)
270271
? host

0 commit comments

Comments
 (0)