Skip to content

Commit 532be2f

Browse files
committed
Stash 正式版支持 VLESS REALITY(xtls-rprx-vision)
1 parent 37fc7ac commit 532be2f

File tree

3 files changed

+40
-42
lines changed

3 files changed

+40
-42
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.54",
3+
"version": "2.19.55",
44
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and Shadowrocket.",
55
"main": "src/main.js",
66
"scripts": {

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,9 @@ export default function Stash_Producer() {
4444
'2022-blake3-aes-256-gcm',
4545
].includes(proxy.cipher)) ||
4646
(proxy.type === 'snell' && String(proxy.version) === '4') ||
47-
(opts['include-unsupported-proxy']
48-
? proxy.type === 'vless' &&
49-
proxy['reality-opts'] &&
50-
!['xtls-rprx-vision'].includes(proxy.flow)
51-
: proxy.type === 'vless' && proxy['reality-opts'])
47+
(proxy.type === 'vless' &&
48+
proxy['reality-opts'] &&
49+
!['xtls-rprx-vision'].includes(proxy.flow))
5250
) {
5351
return false;
5452
} else if (proxy['underlying-proxy'] || proxy['dialer-proxy']) {

backend/src/utils/user-agent.js

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -61,41 +61,41 @@ export function getPlatformFromHeaders(headers) {
6161
return getPlatformFromUserAgent({ ua, UA, accept });
6262
}
6363
export function shouldIncludeUnsupportedProxy(platform, ua) {
64-
try {
65-
const target = getPlatformFromUserAgent({
66-
UA: ua,
67-
ua: ua.toLowerCase(),
68-
});
69-
if (!['Stash', 'Egern', 'Loon'].includes(target)) {
70-
return false;
71-
}
72-
const coerceVersion = coerce(ua);
73-
$.log(JSON.stringify(coerceVersion, null, 2));
74-
const { version } = coerceVersion;
75-
if (
76-
platform === 'Stash' &&
77-
target === 'Stash' &&
78-
gte(version, '3.1.0')
79-
) {
80-
return true;
81-
}
82-
if (
83-
platform === 'Egern' &&
84-
target === 'Egern' &&
85-
gte(version, '1.29.0')
86-
) {
87-
return true;
88-
}
89-
// Loon 的 UA 不规范, version 取出来是 build
90-
if (
91-
platform === 'Loon' &&
92-
target === 'Loon' &&
93-
gte(version, '842.0.0')
94-
) {
95-
return true;
96-
}
97-
} catch (e) {
98-
$.error(`获取版本号失败: ${e}`);
99-
}
64+
// try {
65+
// const target = getPlatformFromUserAgent({
66+
// UA: ua,
67+
// ua: ua.toLowerCase(),
68+
// });
69+
// if (!['Stash', 'Egern', 'Loon'].includes(target)) {
70+
// return false;
71+
// }
72+
// const coerceVersion = coerce(ua);
73+
// $.log(JSON.stringify(coerceVersion, null, 2));
74+
// const { version } = coerceVersion;
75+
// if (
76+
// platform === 'Stash' &&
77+
// target === 'Stash' &&
78+
// gte(version, '3.1.0')
79+
// ) {
80+
// return true;
81+
// }
82+
// if (
83+
// platform === 'Egern' &&
84+
// target === 'Egern' &&
85+
// gte(version, '1.29.0')
86+
// ) {
87+
// return true;
88+
// }
89+
// // Loon 的 UA 不规范, version 取出来是 build
90+
// if (
91+
// platform === 'Loon' &&
92+
// target === 'Loon' &&
93+
// gte(version, '842.0.0')
94+
// ) {
95+
// return true;
96+
// }
97+
// } catch (e) {
98+
// $.error(`获取版本号失败: ${e}`);
99+
// }
100100
return false;
101101
}

0 commit comments

Comments
 (0)