[GH-ISSUE #5526] [Feature]: Add xhttpSettings to Hosts #3856

Open
opened 2026-10-31 20:35:27 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @FDeghy on GitHub (Jun 24, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5526

No, it's not a problem.

Describe the solution you'd like

Thanks for the great updates and features.

If possible, it would be great to add XHTTP settings to the recently introduced Hosts section. The Advanced subsection is already very useful, and having access to XHTTP parameters such as downloadSettings and xmux would make it even more powerful by allowing users to customize and fine-tune these settings directly from the UI.

Alternatives you've considered

No response

Concrete use case

No response

Mockups, screenshots, or examples

No response

Which parts of the panel would this affect?

No response

Are you willing to help?

  • I'd like to implement this feature myself and open a PR.
  • I can help test once a PR is open.

Before submitting

  • I searched existing issues and this feature has not been requested.
  • This feature request is written in English.
Originally created by @FDeghy on GitHub (Jun 24, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5526 ### Is your feature request related to a problem? No, it's not a problem. ### Describe the solution you'd like Thanks for the great updates and features. If possible, it would be great to add XHTTP settings to the recently introduced Hosts section. The Advanced subsection is already very useful, and having access to XHTTP parameters such as `downloadSettings` and `xmux` would make it even more powerful by allowing users to customize and fine-tune these settings directly from the UI. ### Alternatives you've considered _No response_ ### Concrete use case _No response_ ### Mockups, screenshots, or examples _No response_ ### Which parts of the panel would this affect? _No response_ ### Are you willing to help? - [ ] I'd like to implement this feature myself and open a PR. - [ ] I can help test once a PR is open. ### Before submitting - [x] I searched [existing issues](../issues?q=is%3Aissue) and this feature has not been requested. - [x] This feature request is written in English.
Author
Owner

@github-actions[bot] commented on GitHub (Jun 24, 2026):

This is a valid gap. The Host model (internal/database/model/model.go, lines 727–775) currently carries MuxParams, SockoptParams, and FinalMask as free-JSON override fields applied at subscription-generation time, but there is no equivalent field for XHTTP transport settings.

When a subscription link is built for an XHTTP inbound, the service (internal/sub/service.go, lines 1097–1103) reads xhttpSettings exclusively from the inbound's stream config. The host's own fields cannot currently override downloadSettings, xmux, or any other xhttpSettings key per-host endpoint.

For context, downloadSettings and xmux are already recognised as outbound/client-side fields in the codebase — buildXhttpExtra() (line 1779) serialises them into share links, and StripInboundXhttpClientFields() (lines 232–269) strips them from the inbound config before passing it to Xray-core, since those keys belong on the client side, not the listener side. Adding them to Hosts would let users set per-endpoint client-side XHTTP overrides without duplicating inbounds.

What an implementation would require:

  • Backend — add a new text field (e.g., XhttpParams) to Host in internal/database/model/model.go, with a corresponding database migration (see internal/database/host_migration_test.go for the migration test pattern).
  • Subscription service (internal/sub/service.go) — after the per-host path/mode overrides are applied, merge in the host's XhttpParams JSON (particularly xmux and downloadSettings) into the share link output, following the pattern used for MuxParams and FinalMask.
  • Frontend schema (frontend/src/schemas/api/host.ts) — add xhttpParams alongside the existing muxParams, sockoptParams, finalMask fields.
  • Frontend UI (frontend/src/pages/hosts/HostFormModal.tsx) — add a new "XHTTP" tab inside the existing Advanced subsection, similar in structure to how HostMuxForm and HostSockoptForm are wired in. The existing outbound XHTTP form (frontend/src/pages/xray/outbounds/transport/xhttp.tsx) can serve as a reference for which fields to expose.

No duplicate was found among existing issues.

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

<!-- gh-comment-id:4784789158 --> @github-actions[bot] commented on GitHub (Jun 24, 2026): This is a valid gap. The `Host` model (`internal/database/model/model.go`, lines 727–775) currently carries `MuxParams`, `SockoptParams`, and `FinalMask` as free-JSON override fields applied at subscription-generation time, but there is no equivalent field for XHTTP transport settings. When a subscription link is built for an XHTTP inbound, the service (`internal/sub/service.go`, lines 1097–1103) reads `xhttpSettings` exclusively from the **inbound's** stream config. The host's own fields cannot currently override `downloadSettings`, `xmux`, or any other `xhttpSettings` key per-host endpoint. For context, `downloadSettings` and `xmux` are already recognised as outbound/client-side fields in the codebase — `buildXhttpExtra()` (line 1779) serialises them into share links, and `StripInboundXhttpClientFields()` (lines 232–269) strips them from the inbound config before passing it to Xray-core, since those keys belong on the client side, not the listener side. Adding them to Hosts would let users set per-endpoint client-side XHTTP overrides without duplicating inbounds. **What an implementation would require:** - **Backend** — add a new text field (e.g., `XhttpParams`) to `Host` in `internal/database/model/model.go`, with a corresponding database migration (see `internal/database/host_migration_test.go` for the migration test pattern). - **Subscription service** (`internal/sub/service.go`) — after the per-host path/mode overrides are applied, merge in the host's `XhttpParams` JSON (particularly `xmux` and `downloadSettings`) into the share link output, following the pattern used for `MuxParams` and `FinalMask`. - **Frontend schema** (`frontend/src/schemas/api/host.ts`) — add `xhttpParams` alongside the existing `muxParams`, `sockoptParams`, `finalMask` fields. - **Frontend UI** (`frontend/src/pages/hosts/HostFormModal.tsx`) — add a new "XHTTP" tab inside the existing Advanced subsection, similar in structure to how `HostMuxForm` and `HostSockoptForm` are wired in. The existing outbound XHTTP form (`frontend/src/pages/xray/outbounds/transport/xhttp.tsx`) can serve as a reference for which fields to expose. No duplicate was found among existing issues. *This reply was generated automatically; a maintainer may follow up.*
Author
Owner

@viberbread commented on GitHub (Nov 4, 2026):

How in the world is this not implemented yet?

<!-- gh-comment-id:6632218186 --> @viberbread commented on GitHub (Nov 4, 2026): How in the world is this not implemented yet?
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#3856
No description provided.