feat: 常用配置改版, 新增连接复用/阻止 QUIC/ECN/IP 版本

This commit is contained in:
xream committed 2026-06-23 21:05:48 +08:00
1 parent 9405ac6f88
commit 1c7ab29cb2
2 files changed
+38 -1

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "sub-store",
"version": "2.31.3",
"version": "2.31.4",
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and Shadowrocket.",
"main": "src/main.js",
"packageManager": "pnpm@11.0.9",
@@ -155,6 +155,20 @@ function QuickSettingOperator(args) {
if (proxy.type === 'vmess') {
proxy.aead = get(args['vmess aead'], proxy.aead);
}
if (['snell', 'anytls', 'trusttunnel'].includes(proxy.type)) {
proxy.reuse = get(args.reuse, proxy.reuse);
}
if (['tuic', 'hysteria2'].includes(proxy.type)) {
proxy.ecn = get(args.ecn, proxy.ecn);
}
proxy['block-quic'] = getBlockQuic(
args['block-quic'],
proxy['block-quic'],
);
proxy['ip-version'] = getValue(
args['ip-version'],
proxy['ip-version'],
);
return proxy;
});
},
@@ -170,6 +184,29 @@ function QuickSettingOperator(args) {
return defaultValue;
}
}
function getBlockQuic(value, defaultValue) {
switch (value) {
case 'auto':
case 'on':
case 'off':
return value;
default:
return defaultValue;
}
}
function getValue(value, defaultValue) {
switch (value) {
case undefined:
case null:
case '':
case 'DEFAULT':
return defaultValue;
default:
return value;
}
}
}
// add or remove flag for proxies