feat: VLESS 支持 encryption 和 pqv

This commit is contained in:
xream committed 2025-09-14 13:15:09 +08:00
1 parent 85e8320c0c
commit 1a479a82b4
3 files changed
+16 -2

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "sub-store",
"version": "2.20.22",
"version": "2.20.23",
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and Shadowrocket.",
"main": "src/main.js",
"scripts": {
@@ -743,6 +743,12 @@ function URI_VLESS() {
if (params.extra) {
proxy._extra = params.extra;
}
if (params.encryption) {
proxy._encryption = params.encryption;
}
if (params.pqv) {
proxy._pqv = params.pqv;
}
}
return proxy;
@@ -56,6 +56,14 @@ function vless(proxy) {
if (proxy._mode) {
mode = `&mode=${encodeURIComponent(proxy._mode)}`;
}
let pqv = '';
if (proxy._pqv) {
pqv = `&pqv=${encodeURIComponent(proxy._pqv)}`;
}
let encryption = '';
if (proxy._encryption) {
encryption = `&encryption=${encodeURIComponent(proxy._encryption)}`;
}
let vlessType = proxy.network;
if (proxy.network === 'ws' && proxy['ws-opts']?.['v2ray-http-upgrade']) {
vlessType = 'httpupgrade';
@@ -111,7 +119,7 @@ function vless(proxy) {
proxy.port
}?security=${encodeURIComponent(
security,
)}${vlessTransport}${alpn}${allowInsecure}${sni}${fp}${flow}${sid}${spx}${pbk}${mode}${extra}#${encodeURIComponent(
)}${vlessTransport}${alpn}${allowInsecure}${sni}${fp}${flow}${sid}${spx}${pbk}${mode}${extra}${pqv}${encryption}#${encodeURIComponent(
proxy.name,
)}`;
}