feat: 优化 VLESS URI 逻辑

This commit is contained in:
xream committed 2026-04-13 03:07:51 +08:00
1 parent 9799a579da
commit dd011177ea
4 files changed
+80 -13

No files matched your search

@@ -707,9 +707,7 @@ function URI_VLESS() {
hMaxReusableSecs: 'h-max-reusable-secs',
};
for (const [sourceKey, targetKey] of Object.entries(
xmuxFieldMap,
)) {
for (const [sourceKey, targetKey] of Object.entries(xmuxFieldMap)) {
const value = xmux[sourceKey];
if (typeof value === 'string' && value !== '') {
reuseSettings[targetKey] = value;
@@ -849,6 +847,9 @@ function URI_VLESS() {
`VLESS ${server}:${port}`;
proxy.tls = params.security && params.security !== 'none';
if (params.pbk) {
params.security = 'reality';
}
if (isShadowrocket && /TRUE|1/i.test(params.tls)) {
proxy.tls = true;
params.security = params.security ?? 'reality';