feat: VLESS 支持 pcs 参数

This commit is contained in:
xream committed 2026-01-19 10:11:58 +08:00
1 parent d05288536c
commit f47bda5989
3 files changed
+7 -2

No files matched your search

+1 -1
View File
@@ -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": {
@@ -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 = {};
@@ -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,
)}`;
}