From 3eb0816c887c1d229bc613645f804c2989b95a2a Mon Sep 17 00:00:00 2001 From: xream Date: Sat, 15 Feb 2025 20:47:34 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20TUIC=20URI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/package.json | 2 +- backend/src/core/proxy-utils/parsers/index.js | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/backend/package.json b/backend/package.json index a239f3c..120e211 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "sub-store", - "version": "2.16.44", + "version": "2.16.45", "description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and Shadowrocket.", "main": "src/main.js", "scripts": { diff --git a/backend/src/core/proxy-utils/parsers/index.js b/backend/src/core/proxy-utils/parsers/index.js index 9bd87d4..8d1a1f2 100644 --- a/backend/src/core/proxy-utils/parsers/index.js +++ b/backend/src/core/proxy-utils/parsers/index.js @@ -865,18 +865,18 @@ function URI_TUIC() { for (const addon of addons.split('&')) { let [key, value] = addon.split('='); - key = key.replace(/_/, '-'); + key = key.replace(/_/g, '-'); 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 (['fast_open'].includes(key)) { + } 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 if (['disable-sni', 'reduce-rtt'].includes(key)) { + proxy[key] = /(TRUE)|1/i.test(value); } else { - proxy[key.replace(/_/g, '-')] = value; + proxy[key] = value; } }