[PR #5211] [MERGED] feat: implement inbound XMUX form fields #5820

Closed
opened 2026-11-02 04:04:18 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/5211
Author: @rqzbeh
Created: 6/11/2026
Status: ✅ Merged
Merged: 6/12/2026
Merged by: @MHSanaei

Base: main ← Head: feat/inbound-xhttp-xmux


📝 Commits (8)

  • e2c1c4e feat: implement inbound XMUX form fields
  • 9808db9 fix: replace any cast to satisfy eslint
  • 2bacc79 test: update xhttp form snapshot for XMUX
  • 54c1e0b Merge branch 'main' into feat/inbound-xhttp-xmux
  • e9d5be9 Merge branch 'main' into feat/inbound-xhttp-xmux
  • 40bc5de Merge branch 'main' into feat/inbound-xhttp-xmux
  • 93e4684 fix(inbound): persist xmux on save so the XMUX form actually round-trips
  • 80af8d4 fix(xmux): enforce xray-core's maxConnections/maxConcurrency exclusivity

📊 Changes

6 files changed (+190 additions, -4 deletions)

View changed files

📝 frontend/src/lib/xray/inbound-form-adapter.ts (+13 -0)
📝 frontend/src/lib/xray/stream-wire-normalize.ts (+36 -2)
📝 frontend/src/pages/inbounds/form/transport/xhttp.tsx (+71 -0)
📝 frontend/src/test/__snapshots__/inbound-form-blocks.test.tsx.snap (+1 -0)
📝 frontend/src/test/outbound-form-adapter.test.ts (+6 -2)
📝 frontend/src/test/stream-wire-normalize.test.ts (+63 -0)

📄 Description

Summary

Implements the XMUX configuration UI for xHTTP inbound transport, mirroring the existing outbound form.

Why

Fixes https://github.com/MHSanaei/3x-ui/issues/5194.
The xmux fields were previously available in the shared xhttpSettings schema and handled correctly by the server and subscription logic, but the UI for inbound configurations lacked the form inputs to configure them. This PR adds the XMUX toggle and its nested properties to the inbound form, allowing users to embed XMUX defaults directly in client subscription links without manual JSON editing.

Type of change

  • Bug fix
  • New feature
  • Refactoring (no behavior change)
  • Documentation
  • Tests only
  • Build / CI / tooling
  • Other

Areas affected

  • Frontend (UI / panel pages)
  • Backend (API endpoints, login, settings)
  • Xray config generation
  • Subscription (share links / Clash / JSON)
  • Statistics / traffic counters
  • Database / migrations
  • Install / upgrade script
  • Docker image
  • Multi-node (sub-nodes)
  • Telegram bot

How was this tested?

I've tested the implementation via Docker (docker-compose up -d --build) to verify that:

  1. Navigating to the inbound settings for an xHTTP transport reveals the new XMUX toggle.
  2. Toggling XMUX successfully shows/hides the six nested fields (maxConcurrency, maxConnections, etc.).
  3. Saving and re-opening the inbound form accurately hydrates the UI, showing the toggle enabled and retaining the configured parameter values.
  4. Exporting the client URL confirms the xmux parameters are correctly bundled in the subscription extra parameters.

Screenshots / recordings

(N/A - the UI matches the outbound xHTTP form verbatim.)

Breaking changes

None.

Checklist

  • I tested the change locally and confirmed the described behavior.
  • I added or updated tests for the new behavior (when applicable).
  • go build ./... and the test suite pass locally.
  • For frontend changes: npm run lint, npm run typecheck, and npm run build pass.
  • I updated the Wiki / README / API docs if user-facing behavior changed.
  • My commits follow the project's existing message style.
  • I have no unrelated changes mixed into this PR.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/MHSanaei/3x-ui/pull/5211 **Author:** [@rqzbeh](https://github.com/rqzbeh) **Created:** 6/11/2026 **Status:** ✅ Merged **Merged:** 6/12/2026 **Merged by:** [@MHSanaei](https://github.com/MHSanaei) **Base:** `main` ← **Head:** `feat/inbound-xhttp-xmux` --- ### 📝 Commits (8) - [`e2c1c4e`](https://github.com/MHSanaei/3x-ui/commit/e2c1c4e4d8adc0f3a85cc6b9ae76acb766c0f526) feat: implement inbound XMUX form fields - [`9808db9`](https://github.com/MHSanaei/3x-ui/commit/9808db94e876ad19d08d4e1be9e670ddc87f28e7) fix: replace any cast to satisfy eslint - [`2bacc79`](https://github.com/MHSanaei/3x-ui/commit/2bacc798fe0f8263be389044a602f876281fcc07) test: update xhttp form snapshot for XMUX - [`54c1e0b`](https://github.com/MHSanaei/3x-ui/commit/54c1e0b58da7c9aa1fcef2646c1eb57213668579) Merge branch 'main' into feat/inbound-xhttp-xmux - [`e9d5be9`](https://github.com/MHSanaei/3x-ui/commit/e9d5be973bf756576c44ab2e1d8f861539b12c46) Merge branch 'main' into feat/inbound-xhttp-xmux - [`40bc5de`](https://github.com/MHSanaei/3x-ui/commit/40bc5de1f50ef822e7245e5ce258445a2e384785) Merge branch 'main' into feat/inbound-xhttp-xmux - [`93e4684`](https://github.com/MHSanaei/3x-ui/commit/93e468400261063e7a390fe481429b61b3a64411) fix(inbound): persist xmux on save so the XMUX form actually round-trips - [`80af8d4`](https://github.com/MHSanaei/3x-ui/commit/80af8d49dd54a0198191945c7d0118337cee7808) fix(xmux): enforce xray-core's maxConnections/maxConcurrency exclusivity ### 📊 Changes **6 files changed** (+190 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `frontend/src/lib/xray/inbound-form-adapter.ts` (+13 -0) 📝 `frontend/src/lib/xray/stream-wire-normalize.ts` (+36 -2) 📝 `frontend/src/pages/inbounds/form/transport/xhttp.tsx` (+71 -0) 📝 `frontend/src/test/__snapshots__/inbound-form-blocks.test.tsx.snap` (+1 -0) 📝 `frontend/src/test/outbound-form-adapter.test.ts` (+6 -2) 📝 `frontend/src/test/stream-wire-normalize.test.ts` (+63 -0) </details> ### 📄 Description ## Summary Implements the XMUX configuration UI for xHTTP inbound transport, mirroring the existing outbound form. ## Why Fixes https://github.com/MHSanaei/3x-ui/issues/5194. The `xmux` fields were previously available in the shared `xhttpSettings` schema and handled correctly by the server and subscription logic, but the UI for inbound configurations lacked the form inputs to configure them. This PR adds the XMUX toggle and its nested properties to the inbound form, allowing users to embed XMUX defaults directly in client subscription links without manual JSON editing. ## Type of change - [ ] Bug fix - [x] New feature - [ ] Refactoring (no behavior change) - [ ] Documentation - [ ] Tests only - [ ] Build / CI / tooling - [ ] Other ## Areas affected - [x] Frontend (UI / panel pages) - [ ] Backend (API endpoints, login, settings) - [ ] Xray config generation - [ ] Subscription (share links / Clash / JSON) - [ ] Statistics / traffic counters - [ ] Database / migrations - [ ] Install / upgrade script - [ ] Docker image - [ ] Multi-node (sub-nodes) - [ ] Telegram bot ## How was this tested? I've tested the implementation via Docker (`docker-compose up -d --build`) to verify that: 1. Navigating to the inbound settings for an xHTTP transport reveals the new XMUX toggle. 2. Toggling XMUX successfully shows/hides the six nested fields (`maxConcurrency`, `maxConnections`, etc.). 3. Saving and re-opening the inbound form accurately hydrates the UI, showing the toggle enabled and retaining the configured parameter values. 4. Exporting the client URL confirms the `xmux` parameters are correctly bundled in the subscription extra parameters. ## Screenshots / recordings (N/A - the UI matches the outbound xHTTP form verbatim.) ## Breaking changes None. ## Checklist - [x] I tested the change locally and confirmed the described behavior. - [x] I added or updated tests for the new behavior (when applicable). - [x] `go build ./...` and the test suite pass locally. - [x] For frontend changes: `npm run lint`, `npm run typecheck`, and `npm run build` pass. - [ ] I updated the Wiki / README / API docs if user-facing behavior changed. - [x] My commits follow the project's existing message style. - [x] I have no unrelated changes mixed into this PR. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 04:04:18 +07:00
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#5820
No description provided.