[GH-ISSUE #6757] [Bug]: BBR uppercase TUIC #4502

Closed
opened 2026-10-31 20:40:06 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @44656e6973 on GitHub (Oct 6, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6757

Describe the bug

By default, the TUIC panel outputs a string like: congestion_control=BBR&udp_relay_mode=. However, Throne, necoray, and Hiddify report the error: unknown congestion control algorithm: BBR.

Image

How to reproduce the problem

Solution: write 'BBR' in lowercase as 'bbr'.

Expected behavior

No response

Actual behavior

No response

Relevant logs


Screenshots

No response

3x-ui version

3.9.0

Xray-core version

No response

How did you install 3x-ui?

install.sh script

Operating system

Debian GNU/Linux 13 (trixie)

Which parts of the panel are affected?

No response

Browser (only if it is a UI bug)

No response

Is the panel behind a reverse proxy or CDN?

None

Before submitting

  • I searched existing issues and this bug has not been reported.
  • I am running the latest released version of 3x-ui (or have verified the bug still exists on it).
  • This bug report is written in English.
  • I have redacted any sensitive data (tokens, real domains, client UUIDs).
Originally created by @44656e6973 on GitHub (Oct 6, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6757 ### Describe the bug By default, the TUIC panel outputs a string like: `congestion_control=BBR&udp_relay_mode=`. However, Throne, necoray, and Hiddify report the error: `unknown congestion control algorithm: BBR`. <img width="505" height="132" alt="Image" src="https://github.com/user-attachments/assets/5aaa5ee2-a3fe-4777-9be2-2bdb87341fde" /> ### How to reproduce the problem Solution: write 'BBR' in lowercase as 'bbr'. ### Expected behavior _No response_ ### Actual behavior _No response_ ### Relevant logs ```shell ``` ### Screenshots _No response_ ### 3x-ui version 3.9.0 ### Xray-core version _No response_ ### How did you install 3x-ui? install.sh script ### Operating system Debian GNU/Linux 13 (trixie) ### Which parts of the panel are affected? _No response_ ### Browser (only if it is a UI bug) _No response_ ### Is the panel behind a reverse proxy or CDN? None ### Before submitting - [x] I searched [existing issues](../issues?q=is%3Aissue) and this bug has not been reported. - [x] I am running the latest released version of 3x-ui (or have verified the bug still exists on it). - [x] This bug report is written in English. - [x] I have redacted any sensitive data (tokens, real domains, client UUIDs).
bsakaguchi 2026-10-31 20:40:06 +07:00
Author
Owner

@github-actions[bot] commented on GitHub (Oct 6, 2026):

I can't reproduce this from the v3.9.0 source. Every TUIC link and config generator in 3x-ui v3.9.0 lowercases the congestion controller before writing it out, and none of them can emit an empty udp_relay_mode=. So the link you imported most likely did not come from a v3.9.0 generator. To track down where it came from, I need the details below.

What the code does in v3.9.0

  • Panel share link / QR (frontend/src/lib/xray/inbound-link.ts:926-929):
    const cc = normalizeTuicCongestionController(
      server.congestion_control ?? rawSettings.congestion_control,
    );
    url.searchParams.set('congestion_control', cc);
    
    normalizeTuicCongestionController (frontend/src/lib/tuic.ts:6) does switch (value.trim().toLowerCase()) and only returns 'bbr', 'cubic' or 'new_reno'. The test canonicalizes legacy flat controller values to the Go runtime default (frontend/src/test/inbound-link.test.ts:1236-1268) covers exactly this case: { value: 'BBR', expected: 'bbr' }.
  • The same function sets udp_relay_mode to ... || 'native' (inbound-link.ts:947-949), so it can't produce an empty value.
  • Subscription link (internal/sub/service.go:870-874) uses inst.CongestionControl. That value has already been passed through NormalizeCongestionControl (internal/tuic/types.go:196, which does strings.ToLower(strings.TrimSpace(value)) at types.go:263). An empty udp_relay_mode is defaulted to "native" (types.go:204-206).
  • Clash/Mihomo config (frontend/src/pages/clients/tuicConfig.ts:43) uses the same normaliser.
  • In the inbound form, BBR is only the display label. The stored value is lowercase: { label: 'BBR', value: 'bbr' } (frontend/src/pages/inbounds/form/protocols/tuic.tsx:200).

This normalisation arrived in 0054e671 feat(tuic): implement native in-process Go TUIC v5 server (#6577), which is first shipped in v3.9.0. The TUIC link code in these files hasn't changed between v3.9.0 and main. In v3.8.5 the panel link copied the stored value through unchanged ((server.congestion_control as string) || ... || 'bbr'), so a link generated before you upgraded could still contain whatever value was stored.

What would settle it (please reply as text; I can't read the image in the report):

  1. Where exactly did the link come from? The share/QR button on the Inbounds page, the Clients page, the subscription URL (/sub/...), or a link you copied before upgrading to 3.9.0 or built by hand?
  2. The full link with the UUID, password and host redacted, so the rest of the query string is visible.
  3. The version shown on the panel dashboard, to confirm the running binary really is 3.9.0. If the panel page was open during the upgrade, hard-refresh it (Ctrl+F5) and copy the link again.
  4. The inbound's raw settings JSON for this TUIC inbound, with secrets redacted, from the inbound's JSON/edit view.

Verdict: Insufficient information
Severity: N/A
Confidence: Medium
Root cause: Not found. In v3.9.0, every TUIC link path lowercases congestion_control and defaults udp_relay_mode to native, so the reported string does not match any current generator.
Already fixed: Possibly. Normalisation landed in 0054e671 (#6577), first released in v3.9.0. It would apply if the link was generated by v3.8.x or earlier.
Duplicate of: None
Evidence: frontend/src/lib/tuic.ts:6; frontend/src/lib/xray/inbound-link.ts:926-929,947-949; internal/tuic/types.go:196,204-206,263; internal/sub/service.go:870-874; test frontend/src/test/inbound-link.test.ts:1240; git tag --contains 0054e671 → v3.9.0, dev-latest.
Not determined: Which generator (or older version) produced congestion_control=BBR&udp_relay_mode=. Item 1 + 2 above would settle it.

This reply was generated automatically; a maintainer may follow up.

<!-- gh-comment-id:6023562822 --> @github-actions[bot] commented on GitHub (Oct 6, 2026): I can't reproduce this from the v3.9.0 source. Every TUIC link and config generator in 3x-ui v3.9.0 lowercases the congestion controller before writing it out, and none of them can emit an empty `udp_relay_mode=`. So the link you imported most likely did not come from a v3.9.0 generator. To track down where it came from, I need the details below. **What the code does in v3.9.0** - Panel share link / QR (`frontend/src/lib/xray/inbound-link.ts:926-929`): ```ts const cc = normalizeTuicCongestionController( server.congestion_control ?? rawSettings.congestion_control, ); url.searchParams.set('congestion_control', cc); ``` `normalizeTuicCongestionController` (`frontend/src/lib/tuic.ts:6`) does `switch (value.trim().toLowerCase())` and only returns `'bbr'`, `'cubic'` or `'new_reno'`. The test `canonicalizes legacy flat controller values to the Go runtime default` (`frontend/src/test/inbound-link.test.ts:1236-1268`) covers exactly this case: `{ value: 'BBR', expected: 'bbr' }`. - The same function sets `udp_relay_mode` to `... || 'native'` (`inbound-link.ts:947-949`), so it can't produce an empty value. - Subscription link (`internal/sub/service.go:870-874`) uses `inst.CongestionControl`. That value has already been passed through `NormalizeCongestionControl` (`internal/tuic/types.go:196`, which does `strings.ToLower(strings.TrimSpace(value))` at `types.go:263`). An empty `udp_relay_mode` is defaulted to `"native"` (`types.go:204-206`). - Clash/Mihomo config (`frontend/src/pages/clients/tuicConfig.ts:43`) uses the same normaliser. - In the inbound form, `BBR` is only the display **label**. The stored value is lowercase: `{ label: 'BBR', value: 'bbr' }` (`frontend/src/pages/inbounds/form/protocols/tuic.tsx:200`). This normalisation arrived in `0054e671 feat(tuic): implement native in-process Go TUIC v5 server (#6577)`, which is first shipped in **v3.9.0**. The TUIC link code in these files hasn't changed between v3.9.0 and `main`. In v3.8.5 the panel link copied the stored value through unchanged (`(server.congestion_control as string) || ... || 'bbr'`), so a link generated before you upgraded could still contain whatever value was stored. **What would settle it** (please reply as text; I can't read the image in the report): 1. Where exactly did the link come from? The share/QR button on the Inbounds page, the Clients page, the subscription URL (`/sub/...`), or a link you copied before upgrading to 3.9.0 or built by hand? 2. The full link with the UUID, password and host redacted, so the rest of the query string is visible. 3. The version shown on the panel dashboard, to confirm the running binary really is 3.9.0. If the panel page was open during the upgrade, hard-refresh it (Ctrl+F5) and copy the link again. 4. The inbound's raw `settings` JSON for this TUIC inbound, with secrets redacted, from the inbound's JSON/edit view. Verdict: Insufficient information Severity: N/A Confidence: Medium Root cause: Not found. In v3.9.0, every TUIC link path lowercases `congestion_control` and defaults `udp_relay_mode` to `native`, so the reported string does not match any current generator. Already fixed: Possibly. Normalisation landed in 0054e671 (#6577), first released in v3.9.0. It would apply if the link was generated by v3.8.x or earlier. Duplicate of: None Evidence: `frontend/src/lib/tuic.ts:6`; `frontend/src/lib/xray/inbound-link.ts:926-929,947-949`; `internal/tuic/types.go:196,204-206,263`; `internal/sub/service.go:870-874`; test `frontend/src/test/inbound-link.test.ts:1240`; `git tag --contains 0054e671` → `v3.9.0`, `dev-latest`. Not determined: Which generator (or older version) produced `congestion_control=BBR&udp_relay_mode=`. Item 1 + 2 above would settle it. *This reply was generated automatically; a maintainer may follow up.* <!-- claude-issue:analyst -->
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#4502
No description provided.