Skip to content

Commit 1a479a8

Browse files
committed
feat: VLESS 支持 encryption 和 pqv
1 parent 85e8320 commit 1a479a8

3 files changed

Lines changed: 16 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.20.22",
3+
"version": "2.20.23",
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: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -743,6 +743,12 @@ function URI_VLESS() {
743743
if (params.extra) {
744744
proxy._extra = params.extra;
745745
}
746+
if (params.encryption) {
747+
proxy._encryption = params.encryption;
748+
}
749+
if (params.pqv) {
750+
proxy._pqv = params.pqv;
751+
}
746752
}
747753

748754
return proxy;

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,14 @@ function vless(proxy) {
5656
if (proxy._mode) {
5757
mode = `&mode=${encodeURIComponent(proxy._mode)}`;
5858
}
59+
let pqv = '';
60+
if (proxy._pqv) {
61+
pqv = `&pqv=${encodeURIComponent(proxy._pqv)}`;
62+
}
63+
let encryption = '';
64+
if (proxy._encryption) {
65+
encryption = `&encryption=${encodeURIComponent(proxy._encryption)}`;
66+
}
5967
let vlessType = proxy.network;
6068
if (proxy.network === 'ws' && proxy['ws-opts']?.['v2ray-http-upgrade']) {
6169
vlessType = 'httpupgrade';
@@ -111,7 +119,7 @@ function vless(proxy) {
111119
proxy.port
112120
}?security=${encodeURIComponent(
113121
security,
114-
)}${vlessTransport}${alpn}${allowInsecure}${sni}${fp}${flow}${sid}${spx}${pbk}${mode}${extra}#${encodeURIComponent(
122+
)}${vlessTransport}${alpn}${allowInsecure}${sni}${fp}${flow}${sid}${spx}${pbk}${mode}${extra}${pqv}${encryption}#${encodeURIComponent(
115123
proxy.name,
116124
)}`;
117125
}

0 commit comments

Comments
 (0)