From f47bda59891e9c45230217c8f478fca00896d8ec Mon Sep 17 00:00:00 2001 From: xream Date: Mon, 19 Jan 2026 10:11:58 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20VLESS=20=E6=94=AF=E6=8C=81=20pcs=20?= =?UTF-8?q?=E5=8F=82=E6=95=B0?= 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 | 1 + backend/src/core/proxy-utils/producers/uri.js | 6 +++++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/backend/package.json b/backend/package.json index fe51bd5b..ff28052e 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "sub-store", - "version": "2.21.7", + "version": "2.21.8", "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 b2376d5b..85ccf458 100644 --- a/backend/src/core/proxy-utils/parsers/index.js +++ b/backend/src/core/proxy-utils/parsers/index.js @@ -741,6 +741,7 @@ function URI_VLESS() { proxy['client-fingerprint'] = params.fp; proxy.alpn = params.alpn ? params.alpn.split(',') : undefined; proxy['skip-cert-verify'] = /(TRUE)|1/i.test(params.allowInsecure); + proxy._pcs = getIfPresent(params.pcs); if (['reality'].includes(params.security)) { const opts = {}; diff --git a/backend/src/core/proxy-utils/producers/uri.js b/backend/src/core/proxy-utils/producers/uri.js index 84f4be1b..f1984664 100644 --- a/backend/src/core/proxy-utils/producers/uri.js +++ b/backend/src/core/proxy-utils/producers/uri.js @@ -36,6 +36,10 @@ function vless(proxy) { if (proxy['skip-cert-verify']) { allowInsecure = `&allowInsecure=1`; } + let pcs = ''; + if (proxy._pcs) { + pcs = `&pcs=${encodeURIComponent(proxy._pcs)}`; + } let sni = ''; if (proxy.sni) { sni = `&sni=${encodeURIComponent(proxy.sni)}`; @@ -119,7 +123,7 @@ function vless(proxy) { proxy.port }?security=${encodeURIComponent( security, - )}${vlessTransport}${alpn}${allowInsecure}${sni}${fp}${flow}${sid}${spx}${pbk}${mode}${extra}${pqv}${encryption}#${encodeURIComponent( + )}${vlessTransport}${alpn}${allowInsecure}${pcs}${sni}${fp}${flow}${sid}${spx}${pbk}${mode}${extra}${pqv}${encryption}#${encodeURIComponent( proxy.name, )}`; }