mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-13 20:36:01 +08:00
Adjust the logic for determining the tuic version
This commit is contained in:
parent
b770578cba
commit
537a00e8a9
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "sub-store",
|
"name": "sub-store",
|
||||||
"version": "2.14.5",
|
"version": "2.14.6",
|
||||||
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
|
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
|
||||||
"main": "src/main.js",
|
"main": "src/main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -36,6 +36,13 @@ export default function Stash_Producer() {
|
|||||||
} else {
|
} else {
|
||||||
proxy.alpn = ['h3'];
|
proxy.alpn = ['h3'];
|
||||||
}
|
}
|
||||||
|
// https://github.com/MetaCubeX/Clash.Meta/blob/Alpha/adapter/outbound/tuic.go#L197
|
||||||
|
if (
|
||||||
|
(!proxy.token || proxy.token.length === 0) &&
|
||||||
|
!isPresent(proxy, 'version')
|
||||||
|
) {
|
||||||
|
proxy.version = 5;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
delete proxy['tls-fingerprint'];
|
delete proxy['tls-fingerprint'];
|
||||||
|
@ -251,8 +251,9 @@ function snell(proxy) {
|
|||||||
|
|
||||||
function tuic(proxy) {
|
function tuic(proxy) {
|
||||||
const result = new Result(proxy);
|
const result = new Result(proxy);
|
||||||
|
// https://github.com/MetaCubeX/Clash.Meta/blob/Alpha/adapter/outbound/tuic.go#L197
|
||||||
let type = proxy.type;
|
let type = proxy.type;
|
||||||
if (proxy.password && proxy.uuid) {
|
if (!proxy.token || proxy.token.length === 0) {
|
||||||
type = 'tuic-v5';
|
type = 'tuic-v5';
|
||||||
}
|
}
|
||||||
result.append(`${proxy.name}=${type},${proxy.server},${proxy.port}`);
|
result.append(`${proxy.name}=${type},${proxy.server},${proxy.port}`);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user