mirror of
https://github.com/sub-store-org/Sub-Store.git
synced 2026-11-28 15:33:47 +00:00
feat: VLESS 支持 ech, h2 参数
This commit is contained in:
3 files changed
+12
-2
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "sub-store",
|
||||
"version": "2.21.8",
|
||||
"version": "2.21.9",
|
||||
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and Shadowrocket.",
|
||||
"main": "src/main.js",
|
||||
"scripts": {
|
||||
|
||||
@@ -741,7 +741,9 @@ 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._ech = getIfPresent(params.ech);
|
||||
proxy._pcs = getIfPresent(params.pcs);
|
||||
proxy._h2 = /(TRUE)|1/i.test(params.h2);
|
||||
|
||||
if (['reality'].includes(params.security)) {
|
||||
const opts = {};
|
||||
|
||||
@@ -36,10 +36,18 @@ function vless(proxy) {
|
||||
if (proxy['skip-cert-verify']) {
|
||||
allowInsecure = `&allowInsecure=1`;
|
||||
}
|
||||
let h2 = '';
|
||||
if (proxy._h2) {
|
||||
h2 = `&h2=1`;
|
||||
}
|
||||
let pcs = '';
|
||||
if (proxy._pcs) {
|
||||
pcs = `&pcs=${encodeURIComponent(proxy._pcs)}`;
|
||||
}
|
||||
let ech = '';
|
||||
if (proxy._ech) {
|
||||
ech = `&ech=${encodeURIComponent(proxy._ech)}`;
|
||||
}
|
||||
let sni = '';
|
||||
if (proxy.sni) {
|
||||
sni = `&sni=${encodeURIComponent(proxy.sni)}`;
|
||||
@@ -123,7 +131,7 @@ function vless(proxy) {
|
||||
proxy.port
|
||||
}?security=${encodeURIComponent(
|
||||
security,
|
||||
)}${vlessTransport}${alpn}${allowInsecure}${pcs}${sni}${fp}${flow}${sid}${spx}${pbk}${mode}${extra}${pqv}${encryption}#${encodeURIComponent(
|
||||
)}${vlessTransport}${alpn}${allowInsecure}${pcs}${ech}${h2}${sni}${fp}${flow}${sid}${spx}${pbk}${mode}${extra}${pqv}${encryption}#${encodeURIComponent(
|
||||
proxy.name,
|
||||
)}`;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user