Skip to content

Commit f47bda5

Browse files
committed
feat: VLESS 支持 pcs 参数
1 parent d052885 commit f47bda5

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

backend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sub-store",
3-
"version": "2.21.7",
3+
"version": "2.21.8",
44
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and Shadowrocket.",
55
"main": "src/main.js",
66
"scripts": {

backend/src/core/proxy-utils/parsers/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -741,6 +741,7 @@ function URI_VLESS() {
741741
proxy['client-fingerprint'] = params.fp;
742742
proxy.alpn = params.alpn ? params.alpn.split(',') : undefined;
743743
proxy['skip-cert-verify'] = /(TRUE)|1/i.test(params.allowInsecure);
744+
proxy._pcs = getIfPresent(params.pcs);
744745

745746
if (['reality'].includes(params.security)) {
746747
const opts = {};

backend/src/core/proxy-utils/producers/uri.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ function vless(proxy) {
3636
if (proxy['skip-cert-verify']) {
3737
allowInsecure = `&allowInsecure=1`;
3838
}
39+
let pcs = '';
40+
if (proxy._pcs) {
41+
pcs = `&pcs=${encodeURIComponent(proxy._pcs)}`;
42+
}
3943
let sni = '';
4044
if (proxy.sni) {
4145
sni = `&sni=${encodeURIComponent(proxy.sni)}`;
@@ -119,7 +123,7 @@ function vless(proxy) {
119123
proxy.port
120124
}?security=${encodeURIComponent(
121125
security,
122-
)}${vlessTransport}${alpn}${allowInsecure}${sni}${fp}${flow}${sid}${spx}${pbk}${mode}${extra}${pqv}${encryption}#${encodeURIComponent(
126+
)}${vlessTransport}${alpn}${allowInsecure}${pcs}${sni}${fp}${flow}${sid}${spx}${pbk}${mode}${extra}${pqv}${encryption}#${encodeURIComponent(
123127
proxy.name,
124128
)}`;
125129
}

0 commit comments

Comments
 (0)