[GH-ISSUE #4578] [Bug]: Shared client applies xtls-rprx-vision flow to XHTTP inbound after multi-inbound migration #3141

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

Originally created by @yelloduxx on GitHub (May 25, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/4578

Describe the bug

After upgrading to 3.1.0 and using the new multi-inbound client model, a single shared VLESS client can be attached to multiple inbounds that require different flow behavior.

In my case the same client email/subscription is attached to:

  • a VLESS + REALITY + TCP inbound, where flow: xtls-rprx-vision is required
  • a VLESS + REALITY + XHTTP inbound, where flow must be empty / omitted

After migration, the client became a global record with flow = xtls-rprx-vision. That global flow was also applied to the XHTTP inbound through client_inbounds.flow_override / generated runtime config. The subscription generated an XHTTP link with flow=xtls-rprx-vision, and the XHTTP profile did not work in clients/ping showed n/a.

The runtime Xray config also initially missed this shared client on the XHTTP inbound until the panel was restarted after migration. After restart the client appeared in the XHTTP inbound, but it still had the wrong flow.

The issue was fixed manually by clearing the flow only for the XHTTP attachment while keeping xtls-rprx-vision for the TCP attachments.

How to reproduce the problem

  1. Start from an older 3x-ui database where the same email/client exists in multiple VLESS inbounds, or create an equivalent state before/after migration.
  2. Have at least two VLESS + REALITY inbounds:
    • Inbound A: TCP transport, client uses flow: xtls-rprx-vision
    • Inbound B: XHTTP transport, same client email/subId/UUID should use no flow
  3. Upgrade to 3.1.0 so clients are migrated into the new global clients table plus client_inbounds attachments.
  4. Open/download the subscription for that shared client.
  5. Check the generated XHTTP link and/or /usr/local/x-ui/bin/config.json.
  6. Try to ping/connect using the XHTTP profile.

Expected behavior

Flow should be treated as an inbound-specific/client-attachment property when a global client is attached to multiple inbounds.

For the same shared client:

  • TCP + REALITY inbound should keep flow: xtls-rprx-vision
  • XHTTP + REALITY inbound should omit flow

The generated subscription links and runtime Xray config should reflect the per-inbound flow value.

Actual behavior

The shared/global client flow was applied to the XHTTP inbound too.

The generated XHTTP subscription link included flow=xtls-rprx-vision, and the client profile did not work / ping showed n/a.

Manually changing the database to clear only the XHTTP attachment flow fixed the issue:

-- Pseudocode / redacted example
update clients
set flow = ''
where email = 'shared-client';

update client_inbounds
set flow_override = 'xtls-rprx-vision'
where client_id = (select id from clients where email = 'shared-client')
  and inbound_id in (<tcp-reality-inbound-ids>);

update client_inbounds
set flow_override = ''
where client_id = (select id from clients where email = 'shared-client')
  and inbound_id = <xhttp-reality-inbound-id>;

After restarting x-ui, the generated Xray config became correct:

// TCP + REALITY inbound user
{
  "email": "shared-client",
  "id": "REDACTED_UUID",
  "flow": "xtls-rprx-vision"
}

// XHTTP + REALITY inbound user
{
  "email": "shared-client",
  "id": "REDACTED_UUID"
}

The XHTTP subscription link also stopped including flow=xtls-rprx-vision, and the profile started working.

Relevant logs

No Xray startup error occurs for the wrong-flow case. Xray starts successfully, but the generated XHTTP client profile fails in clients/ping.

I verified the mismatch by comparing:

/usr/local/x-ui/bin/config.json
/etc/x-ui/x-ui.db: clients, client_inbounds, inbounds.settings

Before the manual fix, the XHTTP generated link contained flow=xtls-rprx-vision. After clearing the XHTTP attachment flow override and restarting the panel, it no longer contained flow and started working.

Screenshots

No response

3x-ui version

3.1.0

Xray-core version

26.4.25

How did you install 3x-ui?

Manual build from source

Operating system

Ubuntu 22.04.5 LTS

Which parts of the panel are affected?

  • Xray config generation
  • Subscription (share links / Clash / JSON)
  • Database / migrations

Browser (only if it is a UI bug)

No response

Is the panel behind a reverse proxy or CDN?

No — direct access

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 @yelloduxx on GitHub (May 25, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/4578 ### Describe the bug After upgrading to `3.1.0` and using the new multi-inbound client model, a single shared VLESS client can be attached to multiple inbounds that require different `flow` behavior. In my case the same client email/subscription is attached to: - a VLESS + REALITY + TCP inbound, where `flow: xtls-rprx-vision` is required - a VLESS + REALITY + XHTTP inbound, where `flow` must be empty / omitted After migration, the client became a global record with `flow = xtls-rprx-vision`. That global flow was also applied to the XHTTP inbound through `client_inbounds.flow_override` / generated runtime config. The subscription generated an XHTTP link with `flow=xtls-rprx-vision`, and the XHTTP profile did not work in clients/ping showed `n/a`. The runtime Xray config also initially missed this shared client on the XHTTP inbound until the panel was restarted after migration. After restart the client appeared in the XHTTP inbound, but it still had the wrong `flow`. The issue was fixed manually by clearing the flow only for the XHTTP attachment while keeping `xtls-rprx-vision` for the TCP attachments. ### How to reproduce the problem 1. Start from an older 3x-ui database where the same email/client exists in multiple VLESS inbounds, or create an equivalent state before/after migration. 2. Have at least two VLESS + REALITY inbounds: - Inbound A: TCP transport, client uses `flow: xtls-rprx-vision` - Inbound B: XHTTP transport, same client email/subId/UUID should use no flow 3. Upgrade to `3.1.0` so clients are migrated into the new global `clients` table plus `client_inbounds` attachments. 4. Open/download the subscription for that shared client. 5. Check the generated XHTTP link and/or `/usr/local/x-ui/bin/config.json`. 6. Try to ping/connect using the XHTTP profile. ### Expected behavior Flow should be treated as an inbound-specific/client-attachment property when a global client is attached to multiple inbounds. For the same shared client: - TCP + REALITY inbound should keep `flow: xtls-rprx-vision` - XHTTP + REALITY inbound should omit `flow` The generated subscription links and runtime Xray config should reflect the per-inbound flow value. ### Actual behavior The shared/global client flow was applied to the XHTTP inbound too. The generated XHTTP subscription link included `flow=xtls-rprx-vision`, and the client profile did not work / ping showed `n/a`. Manually changing the database to clear only the XHTTP attachment flow fixed the issue: ```sql -- Pseudocode / redacted example update clients set flow = '' where email = 'shared-client'; update client_inbounds set flow_override = 'xtls-rprx-vision' where client_id = (select id from clients where email = 'shared-client') and inbound_id in (<tcp-reality-inbound-ids>); update client_inbounds set flow_override = '' where client_id = (select id from clients where email = 'shared-client') and inbound_id = <xhttp-reality-inbound-id>; ``` After restarting `x-ui`, the generated Xray config became correct: ```json // TCP + REALITY inbound user { "email": "shared-client", "id": "REDACTED_UUID", "flow": "xtls-rprx-vision" } // XHTTP + REALITY inbound user { "email": "shared-client", "id": "REDACTED_UUID" } ``` The XHTTP subscription link also stopped including `flow=xtls-rprx-vision`, and the profile started working. ### Relevant logs No Xray startup error occurs for the wrong-flow case. Xray starts successfully, but the generated XHTTP client profile fails in clients/ping. I verified the mismatch by comparing: ```shell /usr/local/x-ui/bin/config.json /etc/x-ui/x-ui.db: clients, client_inbounds, inbounds.settings ``` Before the manual fix, the XHTTP generated link contained `flow=xtls-rprx-vision`. After clearing the XHTTP attachment flow override and restarting the panel, it no longer contained `flow` and started working. ### Screenshots _No response_ ### 3x-ui version 3.1.0 ### Xray-core version 26.4.25 ### How did you install 3x-ui? Manual build from source ### Operating system Ubuntu 22.04.5 LTS ### Which parts of the panel are affected? - Xray config generation - Subscription (share links / Clash / JSON) - Database / migrations ### Browser (only if it is a UI bug) _No response_ ### Is the panel behind a reverse proxy or CDN? No — direct access ### Before submitting - [x] I searched existing issues 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).
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#3141
No description provided.