mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-07-30 08:02:00 +08:00
feat: 兼容更多 TUIC URI 字段
This commit is contained in:
parent
5058662651
commit
4ef4431c2c
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "sub-store",
|
||||
"version": "2.16.41",
|
||||
"version": "2.16.42",
|
||||
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and Shadowrocket.",
|
||||
"main": "src/main.js",
|
||||
"scripts": {
|
||||
|
@ -869,12 +869,14 @@ function URI_TUIC() {
|
||||
value = decodeURIComponent(value);
|
||||
if (['alpn'].includes(key)) {
|
||||
proxy[key] = value ? value.split(',') : undefined;
|
||||
} else if (['allow-insecure'].includes(key)) {
|
||||
} else if (['allow_insecure'].includes(key)) {
|
||||
proxy['skip-cert-verify'] = /(TRUE)|1/i.test(value);
|
||||
} else if (['disable-sni', 'reduce-rtt'].includes(key)) {
|
||||
proxy[key] = /(TRUE)|1/i.test(value);
|
||||
} else if (['fast_open'].includes(key)) {
|
||||
proxy.tfo = true;
|
||||
} else if (['disable_sni', 'reduce_rtt'].includes(key)) {
|
||||
proxy[key.replace(/_/g, '-')] = /(TRUE)|1/i.test(value);
|
||||
} else {
|
||||
proxy[key] = value;
|
||||
proxy[key.replace(/_/g, '-')] = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -521,10 +521,13 @@ export default function URI_Producer() {
|
||||
['disable-sni', 'reduce-rtt'].includes(key) &&
|
||||
proxy[key]
|
||||
) {
|
||||
tuicParams.push(`${i}=1`);
|
||||
tuicParams.push(`${i.replace(/-/g, '_')}=1`);
|
||||
} else if (proxy[key]) {
|
||||
tuicParams.push(
|
||||
`${i}=${encodeURIComponent(proxy[key])}`,
|
||||
`${i.replace(
|
||||
/-/g,
|
||||
'_',
|
||||
)}=${encodeURIComponent(proxy[key])}`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user