From 9bb06bf43866d0e9635dfb602fa17b76e044be3c Mon Sep 17 00:00:00 2001 From: xream Date: Thu, 18 Jan 2024 01:17:06 +0800 Subject: [PATCH] =?UTF-8?q?feat:=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 | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/backend/package.json b/backend/package.json index 7147581..732865f 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "sub-store", - "version": "2.14.177", + "version": "2.14.178", "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 26bb0f3..d5bb588 100644 --- a/backend/src/core/proxy-utils/parsers/index.js +++ b/backend/src/core/proxy-utils/parsers/index.js @@ -409,8 +409,10 @@ function URI_VLESS() { proxy[`${params.security}-opts`] = opts; } } - proxy.network = params.type; + if (proxy.network === 'tcp' && params.headerType === 'http') { + proxy.network = 'http'; + } if (!proxy.network && isShadowrocket && params.obfs) { proxy.network = params.obfs; } @@ -915,7 +917,8 @@ function Surge_External() { line, )?.[2]; } - + // args = "-m", args = "rc4-md5" + // args = -m, args = rc4-md5 const argsRegex = /(,|^)\s*?args\s*?=\s*("(.*?)"|(.*?))(?=\s*?(,|$))/g; let argsMatch; const args = []; @@ -926,6 +929,8 @@ function Surge_External() { args.push(argsMatch[4]); } } + // addresses = "[ipv6]",,addresses = "ipv6", addresses = "ipv4" + // addresses = [ipv6], addresses = ipv6, addresses = ipv4 const addressesRegex = /(,|^)\s*?addresses\s*?=\s*("(.*?)"|(.*?))(?=\s*?(,|$))/g; let addressesMatch;