From c585785c505f168f7eafce26074c82fb00858b4e Mon Sep 17 00:00:00 2001 From: xream Date: Sat, 17 Feb 2024 11:39:04 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=85=BC=E5=AE=B9=E4=B8=8D=E8=A7=84?= =?UTF-8?q?=E8=8C=83=E7=9A=84=20VLESS=20URI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/package.json | 2 +- backend/src/core/proxy-utils/parsers/index.js | 18 ++++++++++++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/backend/package.json b/backend/package.json index 5f1bf9ded..c53d4882f 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "sub-store", - "version": "2.14.221", + "version": "2.14.222", "description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.", "main": "src/main.js", "scripts": { diff --git a/backend/src/core/proxy-utils/parsers/index.js b/backend/src/core/proxy-utils/parsers/index.js index 2798e57e6..8aad8da40 100644 --- a/backend/src/core/proxy-utils/parsers/index.js +++ b/backend/src/core/proxy-utils/parsers/index.js @@ -273,11 +273,17 @@ function URI_VMess() { params.port = port; params.add = server; } + const server = params.add; + const port = parseInt(getIfPresent(params.port), 10); const proxy = { - name: params.ps ?? params.remarks, + name: + params.ps ?? + params.remarks ?? + params.remark ?? + `VMess ${server}:${port}`, type: 'vmess', - server: params.add, - port: parseInt(getIfPresent(params.port), 10), + server, + port, cipher: getIfPresent(params.scy, 'auto'), uuid: params.id, alterId: parseInt( @@ -399,7 +405,11 @@ function URI_VLESS() { params[key] = value; } - proxy.name = name ?? params.remarks ?? `VLESS ${server}:${port}`; + proxy.name = + name ?? + params.remarks ?? + params.remark ?? + `VLESS ${server}:${port}`; proxy.tls = params.security && params.security !== 'none'; if (isShadowrocket && /TRUE|1/i.test(params.tls)) {