feat: 支持 VLESS XHTTP extra

This commit is contained in:
xream 2025-01-22 09:43:43 +08:00
parent 48aaaf5c99
commit b1874e510d
No known key found for this signature in database
GPG Key ID: 1D2C5225471789F9
3 changed files with 9 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{
"name": "sub-store",
"version": "2.16.18",
"version": "2.16.19",
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
"main": "src/main.js",
"scripts": {

View File

@ -596,6 +596,9 @@ function URI_VLESS() {
// mKCP 的伪装头部类型。当前可选值有 none / srtp / utp / wechat-video / dtls / wireguard。省略时默认值为 none即不使用伪装头部但不可以为空字符串。
proxy.headerType = params.headerType || 'none';
}
if (params.extra) {
proxy.extra = params.extra;
}
}
return proxy;

View File

@ -188,6 +188,10 @@ export default function URI_Producer() {
if (proxy.flow) {
flow = `&flow=${encodeURIComponent(proxy.flow)}`;
}
let extra = '';
if (proxy.extra) {
extra = `&extra=${encodeURIComponent(proxy.extra)}`;
}
let vlessType = proxy.network;
if (
proxy.network === 'ws' &&
@ -254,7 +258,7 @@ export default function URI_Producer() {
proxy.port
}?security=${encodeURIComponent(
security,
)}${vlessTransport}${alpn}${allowInsecure}${sni}${fp}${flow}${sid}${pbk}#${encodeURIComponent(
)}${vlessTransport}${alpn}${allowInsecure}${sni}${fp}${flow}${sid}${pbk}${extra}#${encodeURIComponent(
proxy.name,
)}`;
break;