From 302c92ed87f703c308c7f2099dc18134a983cb7d Mon Sep 17 00:00:00 2001 From: xream Date: Sun, 13 Apr 2025 03:28:11 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20TUIC=20congestion-c?= =?UTF-8?q?ontroller?= 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 | 3 +++ backend/src/core/proxy-utils/producers/uri.js | 6 ++++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/backend/package.json b/backend/package.json index 081b23d..2f44037 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "sub-store", - "version": "2.19.19", + "version": "2.19.20", "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 be8b30b..aba65bb 100644 --- a/backend/src/core/proxy-utils/parsers/index.js +++ b/backend/src/core/proxy-utils/parsers/index.js @@ -962,6 +962,9 @@ function URI_TUIC() { proxy.tfo = true; } else if (['disable-sni', 'reduce-rtt'].includes(key)) { proxy[key] = /(TRUE)|1/i.test(value); + } else if (key === 'congestion-control') { + proxy['congestion-controller'] = value; + delete proxy[key]; } else { proxy[key] = value; } diff --git a/backend/src/core/proxy-utils/producers/uri.js b/backend/src/core/proxy-utils/producers/uri.js index 7f80f5a..ebe34ba 100644 --- a/backend/src/core/proxy-utils/producers/uri.js +++ b/backend/src/core/proxy-utils/producers/uri.js @@ -535,6 +535,12 @@ export default function URI_Producer() { proxy[key] ) { tuicParams.push(`${i.replace(/-/g, '_')}=1`); + } else if ( + ['congestion-controller'].includes(key) + ) { + tuicParams.push( + `congestion_control=${proxy[key]}`, + ); } else if (proxy[key]) { tuicParams.push( `${i.replace(