[GH-ISSUE #5505] [Feature]: Add new XHTTP options from latest xray #3844

Closed
opened 2026-10-31 20:35:21 +07:00 by bsakaguchi · 3 comments
Owner

Originally created by @ilya-practicum on GitHub (Jun 23, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5505

New options to support sessionID encoding:
https://github.com/XTLS/Xray-core/pull/6258

Describe the solution you'd like

Add options to XHTTP transport obfuscation dialogue

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 @ilya-practicum on GitHub (Jun 23, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5505 ### Is your feature request related to a problem? New options to support sessionID encoding: https://github.com/XTLS/Xray-core/pull/6258 ### Describe the solution you'd like Add options to XHTTP transport obfuscation dialogue ### 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.
bsakaguchi 2026-10-31 20:35:21 +07:00
Author
Owner

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

The changes from XTLS/Xray-core#6258 are already present in the xray-core version currently bundled by this panel (v26.6.22, commit b99c3e56574f, merged June 9 2026). The panel UI and subscription layer have not yet been updated to match — this is a confirmed gap across several files.

What changed in xray-core

PR#6258 modified transport/internet/splithttp/config.proto and infra/conf/transport_internet.go:

  • Renamed two existing fields:
    • sessionPlacement → sessionIDPlacement
    • sessionKey → sessionIDKey
  • Added two new fields:
    • sessionIDTable — encoding character set. Accepts a predefined name (ALPHABET, Alphabet, BASE36, Base62, HEX, alphabet, base36, hex, number) or a custom ASCII string. When set, xray-core validates that the resulting ID space exceeds 2.1 billion possibilities.
    • sessionIDLength — session ID length as a range (e.g. 16-32); start value must be greater than 0.

What the panel currently does (confirmed in source)

The old field names are still used in all of the following places as of main (HEAD):

File Usage
frontend/src/schemas/protocols/stream/xhttp.ts lines 38–39 Zod schema still declares sessionPlacement, sessionKey
frontend/src/pages/inbounds/form/transport/xhttp.tsx lines 147–170 Inbound XHTTP form renders old field names
frontend/src/pages/xray/outbounds/transport/xhttp.tsx lines 147–170 Outbound XHTTP form renders old field names
internal/sub/service.go line 1734 Subscription link builder passes sessionPlacement, sessionKey to the share-link extra blob
internal/sub/clash_service.go lines 407–408 Clash YAML generator maps sessionPlacement / sessionKey
All 13 translation files under internal/web/translation/ Translation keys sessionPlacement and sessionKey

Because xray-core no longer parses sessionPlacement or sessionKey, any inbound that was configured with a non-default sessionPlacement is silently broken on the currently bundled xray-core — the field is simply ignored by the engine.

Scope of a fix

A PR would need to touch all of the locations above:

  1. Rename sessionPlacement → sessionIDPlacement and sessionKey → sessionIDKey throughout the schema, both form files, the subscription service, the Clash service, and all translation files.
  2. Add sessionIDTable to the Zod schema and to the inbound (and, if appropriate, outbound) XHTTP form — a <Select> with the nine predefined values plus a free-text fallback is sufficient.
  3. Add sessionIDLength to the Zod schema and form — an <Input> accepting range notation (e.g. 16-32) matching the same pattern as scMaxEachPostBytes.
  4. Extend the subscription builder (internal/sub/service.go) and Clash service to propagate the two new fields alongside the renamed ones.
  5. Add translation keys for the two new field labels in all locale files.

The rename in step 1 is a breaking change for existing stored inbound configs: any xhttpSettings blob in the database that currently contains sessionPlacement / sessionKey with non-default values will need to be migrated or the user will need to re-save the inbound after the UI is updated.

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

<!-- gh-comment-id:4779549215 --> @github-actions[bot] commented on GitHub (Jun 23, 2026): The changes from XTLS/Xray-core#6258 are already present in the xray-core version currently bundled by this panel (v26.6.22, commit `b99c3e56574f`, merged June 9 2026). The panel UI and subscription layer have not yet been updated to match — this is a confirmed gap across several files. **What changed in xray-core** PR#6258 modified `transport/internet/splithttp/config.proto` and `infra/conf/transport_internet.go`: - **Renamed** two existing fields: - `sessionPlacement` → `sessionIDPlacement` - `sessionKey` → `sessionIDKey` - **Added** two new fields: - `sessionIDTable` — encoding character set. Accepts a predefined name (`ALPHABET`, `Alphabet`, `BASE36`, `Base62`, `HEX`, `alphabet`, `base36`, `hex`, `number`) or a custom ASCII string. When set, xray-core validates that the resulting ID space exceeds 2.1 billion possibilities. - `sessionIDLength` — session ID length as a range (e.g. `16-32`); start value must be greater than 0. **What the panel currently does (confirmed in source)** The old field names are still used in all of the following places as of `main` (HEAD): | File | Usage | |---|---| | `frontend/src/schemas/protocols/stream/xhttp.ts` lines 38–39 | Zod schema still declares `sessionPlacement`, `sessionKey` | | `frontend/src/pages/inbounds/form/transport/xhttp.tsx` lines 147–170 | Inbound XHTTP form renders old field names | | `frontend/src/pages/xray/outbounds/transport/xhttp.tsx` lines 147–170 | Outbound XHTTP form renders old field names | | `internal/sub/service.go` line 1734 | Subscription link builder passes `sessionPlacement`, `sessionKey` to the share-link `extra` blob | | `internal/sub/clash_service.go` lines 407–408 | Clash YAML generator maps `sessionPlacement` / `sessionKey` | | All 13 translation files under `internal/web/translation/` | Translation keys `sessionPlacement` and `sessionKey` | Because xray-core no longer parses `sessionPlacement` or `sessionKey`, any inbound that was configured with a non-default `sessionPlacement` is silently broken on the currently bundled xray-core — the field is simply ignored by the engine. **Scope of a fix** A PR would need to touch all of the locations above: 1. Rename `sessionPlacement` → `sessionIDPlacement` and `sessionKey` → `sessionIDKey` throughout the schema, both form files, the subscription service, the Clash service, and all translation files. 2. Add `sessionIDTable` to the Zod schema and to the inbound (and, if appropriate, outbound) XHTTP form — a `<Select>` with the nine predefined values plus a free-text fallback is sufficient. 3. Add `sessionIDLength` to the Zod schema and form — an `<Input>` accepting range notation (e.g. `16-32`) matching the same pattern as `scMaxEachPostBytes`. 4. Extend the subscription builder (`internal/sub/service.go`) and Clash service to propagate the two new fields alongside the renamed ones. 5. Add translation keys for the two new field labels in all locale files. The rename in step 1 is a breaking change for existing stored inbound configs: any `xhttpSettings` blob in the database that currently contains `sessionPlacement` / `sessionKey` with non-default values will need to be migrated or the user will need to re-save the inbound after the UI is updated. *This reply was generated automatically; a maintainer may follow up.*
Author
Owner

@rqzbeh commented on GitHub (Jun 23, 2026):

currently working on this, PR soon

<!-- gh-comment-id:4779607044 --> @rqzbeh commented on GitHub (Jun 23, 2026): currently working on this, PR soon
Author
Owner

@rqzbeh commented on GitHub (Jun 23, 2026):

https://github.com/MHSanaei/3x-ui/pull/5506

<!-- gh-comment-id:4779828752 --> @rqzbeh commented on GitHub (Jun 23, 2026): https://github.com/MHSanaei/3x-ui/pull/5506
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#3844
No description provided.