Skip to content

Commit da7cccb

Browse files
committed
fix: 更新encryption可能为none的判断逻辑
1 parent 439fcb7 commit da7cccb

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-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.20.63",
3+
"version": "2.20.64",
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/egern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ export default function Egern_Producer() {
292292
// skip_tls_verify: proxy['skip-cert-verify'],
293293
};
294294
} else if (proxy.type === 'vless') {
295-
if (proxy.encryption)
295+
if (proxy.encryption && proxy.encryption !== 'none')
296296
throw new Error(`VLESS encryption is not supported`);
297297
if (proxy.network === 'ws') {
298298
proxy.transport = {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ function vmess(proxy) {
398398
}
399399

400400
function vless(proxy) {
401-
if (proxy.encryption) throw new Error(`VLESS encryption is not supported`);
401+
if (proxy.encryption && proxy.encryption !== 'none') throw new Error(`VLESS encryption is not supported`);
402402
let isXtls = false;
403403
const isReality = !!proxy['reality-opts'];
404404

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ function vmess(proxy) {
401401
return result.toString();
402402
}
403403
function vless(proxy) {
404-
if (proxy.encryption) throw new Error(`VLESS encryption is not supported`);
404+
if (proxy.encryption && proxy.encryption !== 'none') throw new Error(`VLESS encryption is not supported`);
405405
const result = new Result(proxy);
406406
const append = result.append.bind(result);
407407
const appendIfPresent = result.appendIfPresent.bind(result);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export default function Shadowrocket_Producer() {
1111
return false;
1212
} else if (['mieru', 'sudoku', 'naive'].includes(proxy.type)) {
1313
return false;
14-
} else if (proxy.encryption && ['vless'].includes(proxy.type)) {
14+
} else if (proxy.encryption && proxy.encryption !== 'none' && ['vless'].includes(proxy.type)) {
1515
return false;
1616
}
1717
return true;

backend/src/core/proxy-utils/producers/sing-box.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -978,7 +978,7 @@ export default function singbox_Producer() {
978978
}
979979
break;
980980
case 'vless':
981-
if (proxy.encryption) {
981+
if (proxy.encryption && proxy.encryption !== 'none') {
982982
throw new Error(
983983
`VLESS encryption is not supported`,
984984
);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export default function Stash_Producer() {
7070
return false;
7171
} else if (['xhttp'].includes(proxy.network)) {
7272
return false;
73-
} else if (proxy.encryption && ['vless'].includes(proxy.type)) {
73+
} else if (proxy.encryption && proxy.encryption !== 'none' && ['vless'].includes(proxy.type)) {
7474
return false;
7575
}
7676
return true;

0 commit comments

Comments
 (0)