mirror of
https://github.com/sub-store-org/Sub-Store.git
synced 2026-11-27 23:13:43 +00:00
feat: 常用配置改版, 新增连接复用/阻止 QUIC/ECN/IP 版本
This commit is contained in:
2 files changed
+38
-1
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user