From 439fcb7deced0db8f2883d3040e2caedc26047b8 Mon Sep 17 00:00:00 2001 From: xream Date: Wed, 31 Dec 2025 08:04:52 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=BF=87=E6=BB=A4=E4=B8=8D=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E7=9A=84=20VLESS=20encryption?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/package.json | 2 +- backend/src/core/proxy-utils/producers/egern.js | 2 ++ backend/src/core/proxy-utils/producers/loon.js | 1 + backend/src/core/proxy-utils/producers/qx.js | 2 +- backend/src/core/proxy-utils/producers/shadowrocket.js | 2 ++ backend/src/core/proxy-utils/producers/sing-box.js | 5 +++++ backend/src/core/proxy-utils/producers/stash.js | 2 ++ 7 files changed, 14 insertions(+), 2 deletions(-) diff --git a/backend/package.json b/backend/package.json index a7dbbb88..cbc491f9 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "sub-store", - "version": "2.20.62", + "version": "2.20.63", "description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and Shadowrocket.", "main": "src/main.js", "scripts": { diff --git a/backend/src/core/proxy-utils/producers/egern.js b/backend/src/core/proxy-utils/producers/egern.js index 06145a74..a911820c 100644 --- a/backend/src/core/proxy-utils/producers/egern.js +++ b/backend/src/core/proxy-utils/producers/egern.js @@ -292,6 +292,8 @@ export default function Egern_Producer() { // skip_tls_verify: proxy['skip-cert-verify'], }; } else if (proxy.type === 'vless') { + if (proxy.encryption) + throw new Error(`VLESS encryption is not supported`); if (proxy.network === 'ws') { proxy.transport = { [proxy.tls ? 'wss' : 'ws']: { diff --git a/backend/src/core/proxy-utils/producers/loon.js b/backend/src/core/proxy-utils/producers/loon.js index 7e8344ec..950378b5 100644 --- a/backend/src/core/proxy-utils/producers/loon.js +++ b/backend/src/core/proxy-utils/producers/loon.js @@ -398,6 +398,7 @@ function vmess(proxy) { } function vless(proxy) { + if (proxy.encryption) throw new Error(`VLESS encryption is not supported`); let isXtls = false; const isReality = !!proxy['reality-opts']; diff --git a/backend/src/core/proxy-utils/producers/qx.js b/backend/src/core/proxy-utils/producers/qx.js index 5ecce635..a758e175 100644 --- a/backend/src/core/proxy-utils/producers/qx.js +++ b/backend/src/core/proxy-utils/producers/qx.js @@ -27,7 +27,6 @@ export default function QX_Producer() { }; return { produce: (proxy, type, opts = {}) => { - console.log(opts); let result = produce(proxy, type, opts); if (opts['include-unsupported-proxy']) { if (proxy.flow && proxy.flow !== 'xtls-rprx-vision') { @@ -402,6 +401,7 @@ function vmess(proxy) { return result.toString(); } function vless(proxy) { + if (proxy.encryption) throw new Error(`VLESS encryption is not supported`); const result = new Result(proxy); const append = result.append.bind(result); const appendIfPresent = result.appendIfPresent.bind(result); diff --git a/backend/src/core/proxy-utils/producers/shadowrocket.js b/backend/src/core/proxy-utils/producers/shadowrocket.js index 4563e1bb..924700ac 100644 --- a/backend/src/core/proxy-utils/producers/shadowrocket.js +++ b/backend/src/core/proxy-utils/producers/shadowrocket.js @@ -11,6 +11,8 @@ export default function Shadowrocket_Producer() { return false; } else if (['mieru', 'sudoku', 'naive'].includes(proxy.type)) { return false; + } else if (proxy.encryption && ['vless'].includes(proxy.type)) { + return false; } return true; }) diff --git a/backend/src/core/proxy-utils/producers/sing-box.js b/backend/src/core/proxy-utils/producers/sing-box.js index f71f09e9..966a0c72 100644 --- a/backend/src/core/proxy-utils/producers/sing-box.js +++ b/backend/src/core/proxy-utils/producers/sing-box.js @@ -978,6 +978,11 @@ export default function singbox_Producer() { } break; case 'vless': + if (proxy.encryption) { + throw new Error( + `VLESS encryption is not supported`, + ); + } if ( !proxy.flow || ['xtls-rprx-vision'].includes(proxy.flow) diff --git a/backend/src/core/proxy-utils/producers/stash.js b/backend/src/core/proxy-utils/producers/stash.js index 940aca88..eff57977 100644 --- a/backend/src/core/proxy-utils/producers/stash.js +++ b/backend/src/core/proxy-utils/producers/stash.js @@ -70,6 +70,8 @@ export default function Stash_Producer() { return false; } else if (['xhttp'].includes(proxy.network)) { return false; + } else if (proxy.encryption && ['vless'].includes(proxy.type)) { + return false; } return true; })