feat: Stash 使用 includeUnsupportedProxy 参数开启 Shadowsocks 2022

This commit is contained in:
xream 2024-11-27 15:20:20 +08:00
parent 99396773f6
commit 6aece471aa
No known key found for this signature in database
GPG Key ID: 1D2C5225471789F9
2 changed files with 7 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "sub-store", "name": "sub-store",
"version": "2.14.427", "version": "2.14.428",
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.", "description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
"main": "src/main.js", "main": "src/main.js",
"scripts": { "scripts": {

View File

@ -6,7 +6,6 @@ export default function Stash_Producer() {
// https://stash.wiki/proxy-protocols/proxy-types#shadowsocks // https://stash.wiki/proxy-protocols/proxy-types#shadowsocks
const list = proxies const list = proxies
.filter((proxy) => { .filter((proxy) => {
if (opts['include-unsupported-proxy']) return true;
if ( if (
![ ![
'ss', 'ss',
@ -40,6 +39,12 @@ export default function Stash_Producer() {
'xchacha20', 'xchacha20',
'chacha20-ietf-poly1305', 'chacha20-ietf-poly1305',
'xchacha20-ietf-poly1305', 'xchacha20-ietf-poly1305',
...(opts['include-unsupported-proxy']
? [
'2022-blake3-aes-128-gcm',
'2022-blake3-aes-256-gcm',
]
: []),
].includes(proxy.cipher)) || ].includes(proxy.cipher)) ||
(proxy.type === 'snell' && String(proxy.version) === '4') || (proxy.type === 'snell' && String(proxy.version) === '4') ||
(proxy.type === 'vless' && proxy['reality-opts']) (proxy.type === 'vless' && proxy['reality-opts'])