mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-05 19:36:06 +08:00
Merge pull request #229 from xream/feature/tuic
Adjust the logic for determining the tuic version
This commit is contained in:
commit
cb21a8e6ec
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "sub-store",
|
||||
"version": "2.14.5",
|
||||
"version": "2.14.6",
|
||||
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
|
||||
"main": "src/main.js",
|
||||
"scripts": {
|
||||
|
@ -36,6 +36,13 @@ export default function Stash_Producer() {
|
||||
} else {
|
||||
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'];
|
||||
|
@ -251,8 +251,9 @@ function snell(proxy) {
|
||||
|
||||
function tuic(proxy) {
|
||||
const result = new Result(proxy);
|
||||
// https://github.com/MetaCubeX/Clash.Meta/blob/Alpha/adapter/outbound/tuic.go#L197
|
||||
let type = proxy.type;
|
||||
if (proxy.password && proxy.uuid) {
|
||||
if (!proxy.token || proxy.token.length === 0) {
|
||||
type = 'tuic-v5';
|
||||
}
|
||||
result.append(`${proxy.name}=${type},${proxy.server},${proxy.port}`);
|
||||
|
Loading…
x
Reference in New Issue
Block a user