[GH-ISSUE #4836] [Bug]: The flow drop-down menu in the client section does not correctly display the actual xtls-rprx-vision settings. #3366

Closed
opened 2026-10-31 20:31:56 +07:00 by bsakaguchi · 4 comments
Owner

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

Describe the bug

Partial problems with the xtls-rprx-vision option in UI persist.
Since no one can formulate and describe the problem in a clear way, despite the constant mentions, I will try to do it myself properly.

How to reproduce the problem

The problem is as follows.

We have the following inbounds. Important! - we have exactly these inbounds, nothing is missing, and the order and IDs are correct.

Each inbound has a unique port, not identical to the port of another inbound!

ID 3 | VLESS XHTTP for CDN
ID 4 | VLESS XHTTP Reality
ID 7 | VLESS XHTTP TLS
ID 8 | VLESS TCP+Vision Reality
ID 9 | VLESS TCP+Vision TLS
ID 10 | Hysteria 2+Salamander
ID 11 | Hysteria 2+Masquerade

We have a client whose profile includes inbounds with the following IDs: 4, 7, 8, 9, 10, 11.
In the Flow drop-down menu, set the xtls-rprx-vision option. Save the profile. Close the profile.
Open the profile again and see that the Flow drop-down menu option is set to "None."
We don't change anything and go check the inbound configurations.
We see that the extended template for inbounds with IDs 4 and 7 doesn't contain any mention of xtls-rprx-vision.
We look at the extended template for inbounds with IDs 8 and 9 – as expected, the xtls-rprx-vision option is included in the client configuration lines. This is as it should be.

Thus, the error that existed before 3x-ui 3.2 has been partially fixed, but remains in the client card behavior.

Let's go back to the profile of the same client whose profile has inbounds with the following IDs: 4, 7, 8, 9, 10, 11.
We see that the Flow drop-down menu parameter is set to "None."
In the Flow drop-down menu, set the xtls-rprx-vision option. Save the profile. Close the profile.
Open the profile again and see that the Flow drop-down menu parameter is set to "None."

The inbound configurations are correctly configured, as described above.

No operations involving adding or removing inbounds in any panel area are performed during this issue. Configuration of inbounds themselves and inbounds assigned to clients is not performed during this issue.

Expected behavior

No response

Actual behavior

No response

Relevant logs


Screenshots

Image Image

3x-ui version

3,2,6

Xray-core version

26.6.1

How did you install 3x-ui?

install.sh script

Operating system

Ubuntu 24.04

Which parts of the panel are affected?

No response

Browser (only if it is a UI bug)

MS Edge148.0.3967.96

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 @Ramazik on GitHub (Jun 2, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/4836 ### Describe the bug Partial problems with the xtls-rprx-vision option in UI persist. Since no one can formulate and describe the problem in a clear way, despite the constant mentions, I will try to do it myself properly. ### How to reproduce the problem The problem is as follows. We have the following inbounds. Important! - we have exactly these inbounds, nothing is missing, and the order and IDs are correct. Each inbound has a unique port, not identical to the port of another inbound! ID 3 | VLESS XHTTP for CDN ID 4 | VLESS XHTTP Reality ID 7 | VLESS XHTTP TLS ID 8 | VLESS TCP+Vision Reality ID 9 | VLESS TCP+Vision TLS ID 10 | Hysteria 2+Salamander ID 11 | Hysteria 2+Masquerade We have a client whose profile includes inbounds with the following IDs: 4, 7, 8, 9, 10, 11. In the Flow drop-down menu, set the xtls-rprx-vision option. Save the profile. Close the profile. Open the profile again and see that the Flow drop-down menu option is set to "None." We don't change anything and go check the inbound configurations. We see that the extended template for inbounds with IDs 4 and 7 doesn't contain any mention of xtls-rprx-vision. We look at the extended template for inbounds with IDs 8 and 9 – as expected, the xtls-rprx-vision option is included in the client configuration lines. This is as it should be. Thus, the error that existed before 3x-ui 3.2 has been partially fixed, but remains in the client card behavior. Let's go back to the profile of the same client whose profile has inbounds with the following IDs: 4, 7, 8, 9, 10, 11. We see that the Flow drop-down menu parameter is set to "None." In the Flow drop-down menu, set the xtls-rprx-vision option. Save the profile. Close the profile. Open the profile again and see that the Flow drop-down menu parameter is set to "None." The inbound configurations are correctly configured, as described above. No operations involving adding or removing inbounds in any panel area are performed during this issue. Configuration of inbounds themselves and inbounds assigned to clients is not performed during this issue. ### Expected behavior _No response_ ### Actual behavior _No response_ ### Relevant logs ```shell ``` ### Screenshots <img width="1628" height="859" alt="Image" src="https://github.com/user-attachments/assets/bd4859ad-8f1b-423b-b938-2bd4c36389c4" /> <img width="1212" height="1049" alt="Image" src="https://github.com/user-attachments/assets/d3386d48-8959-4110-bbe1-ce55614de11e" /> ### 3x-ui version 3,2,6 ### Xray-core version 26.6.1 ### How did you install 3x-ui? install.sh script ### Operating system Ubuntu 24.04 ### Which parts of the panel are affected? _No response_ ### Browser (only if it is a UI bug) MS Edge148.0.3967.96 ### 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:31:56 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

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

Thanks for the detailed, reproducible write-up — this is exactly the kind of report that makes it possible to isolate what is left to fix.


What the code analysis shows

The backend fix introduced for issue #4792 (the EffectiveFlow function in web/service/client.go:319–343) is present in v3.2.6 and appears logically correct:

  • SyncInbound stores a per-inbound flow_override in the client_inbounds junction table every time a client is updated (web/service/client.go:260–267).
  • For flow-capable inbounds (VLESS + TCP + TLS/Reality), clientWithInboundFlow keeps the flow, so flow_override = "xtls-rprx-vision" is stored.
  • For non-flow inbounds (XHTTP, Hysteria), flow_override = "" is stored.
  • EffectiveFlow queries client_inbounds WHERE flow_override <> '' ORDER BY inbound_id ASC LIMIT 1, which should find inbound 8 and return "xtls-rprx-vision".
  • The /panel/api/clients/get/:email handler calls EffectiveFlow and returns its result as rec.Flow to the frontend.

The xray configs for inbounds 8 and 9 being correct confirms that the write path and SyncInbound are working.


Where the remaining display bug likely is

The frontend ClientFormModal has a side-effect that clears the flow field if no flow-capable inbound is selected (ClientFormModal.tsx:246–251):

useEffect(() => {
  if (\!showFlow && form.flow) {
    update('flow', '');
  }
}, [showFlow, form.flow]);

showFlow is true when at least one of the client's attached inbounds has tlsFlowCapable: true. That flag comes from the /panel/api/inbounds/options endpoint, which is fetched once and cached, and is invalidated (triggering a background refetch) every time a client is saved.

The component stays mounted between modal open/close cycles (via LazyMount), so this effect runs whenever showFlow or form.flow changes — regardless of whether the modal is open. If inbounds data is momentarily missing or stale when the form is initialised after modal open, showFlow could be false at that instant, causing the effect to clear the correctly loaded "xtls-rprx-vision" before inbounds finishes updating. The flow would show as None even though the backend returned the right value.


To help narrow down the exact failure mode, please check two things in your browser:

  1. Open the client edit modal, then immediately open DevTools → Network. Find the request to /panel/api/clients/get/<your-email> and check the obj.client.flow field in the JSON response. If it is "xtls-rprx-vision", the backend is correct and the bug is in the frontend display. If it is "", EffectiveFlow is returning an empty value despite the xray configs being correct.

  2. Check the inbound options response. In the same Network tab, find the request to /panel/api/inbounds/options. Check that the entries for inbounds 8 and 9 have "tlsFlowCapable": true. If they do not, showFlow will never be true for this client and the frontend will clear the flow on every open.


Relevant code locations

Component File Lines
EffectiveFlow (per-inbound flow read) web/service/client.go 319–343
GET handler that calls it web/controller/client.go 85–104
inboundCanEnableTlsFlow (flow-capable detection) web/service/inbound.go 284–301
showFlow side-effect that clears flow frontend/src/pages/clients/ClientFormModal.tsx 246–251

The diagnostic results above will confirm which of these two paths is responsible.

<!-- gh-comment-id:4607792285 --> @github-actions[bot] commented on GitHub (Jun 2, 2026): Thanks for the detailed, reproducible write-up — this is exactly the kind of report that makes it possible to isolate what is left to fix. --- **What the code analysis shows** The backend fix introduced for issue #4792 (the `EffectiveFlow` function in `web/service/client.go:319–343`) **is present** in v3.2.6 and appears logically correct: - `SyncInbound` stores a per-inbound `flow_override` in the `client_inbounds` junction table every time a client is updated (`web/service/client.go:260–267`). - For flow-capable inbounds (VLESS + TCP + TLS/Reality), `clientWithInboundFlow` keeps the flow, so `flow_override = "xtls-rprx-vision"` is stored. - For non-flow inbounds (XHTTP, Hysteria), `flow_override = ""` is stored. - `EffectiveFlow` queries `client_inbounds WHERE flow_override <> '' ORDER BY inbound_id ASC LIMIT 1`, which should find inbound 8 and return `"xtls-rprx-vision"`. - The `/panel/api/clients/get/:email` handler calls `EffectiveFlow` and returns its result as `rec.Flow` to the frontend. The xray configs for inbounds 8 and 9 being correct confirms that the **write** path and `SyncInbound` are working. --- **Where the remaining display bug likely is** The frontend `ClientFormModal` has a side-effect that clears the flow field if no flow-capable inbound is selected (`ClientFormModal.tsx:246–251`): ```ts useEffect(() => { if (\!showFlow && form.flow) { update('flow', ''); } }, [showFlow, form.flow]); ``` `showFlow` is `true` when at least one of the client's attached inbounds has `tlsFlowCapable: true`. That flag comes from the `/panel/api/inbounds/options` endpoint, which is fetched once and cached, and is **invalidated** (triggering a background refetch) every time a client is saved. The component stays mounted between modal open/close cycles (via `LazyMount`), so this effect runs whenever `showFlow` or `form.flow` changes — **regardless of whether the modal is open**. If `inbounds` data is momentarily missing or stale when the form is initialised after modal open, `showFlow` could be `false` at that instant, causing the effect to clear the correctly loaded `"xtls-rprx-vision"` before `inbounds` finishes updating. The flow would show as `None` even though the backend returned the right value. --- **To help narrow down the exact failure mode, please check two things in your browser:** 1. **Open the client edit modal, then immediately open DevTools → Network.** Find the request to `/panel/api/clients/get/<your-email>` and check the `obj.client.flow` field in the JSON response. If it is `"xtls-rprx-vision"`, the backend is correct and the bug is in the frontend display. If it is `""`, `EffectiveFlow` is returning an empty value despite the xray configs being correct. 2. **Check the inbound options response.** In the same Network tab, find the request to `/panel/api/inbounds/options`. Check that the entries for inbounds 8 and 9 have `"tlsFlowCapable": true`. If they do not, `showFlow` will never be `true` for this client and the frontend will clear the flow on every open. --- **Relevant code locations** | Component | File | Lines | |---|---|---| | `EffectiveFlow` (per-inbound flow read) | `web/service/client.go` | 319–343 | | GET handler that calls it | `web/controller/client.go` | 85–104 | | `inboundCanEnableTlsFlow` (flow-capable detection) | `web/service/inbound.go` | 284–301 | | `showFlow` side-effect that clears flow | `frontend/src/pages/clients/ClientFormModal.tsx` | 246–251 | The diagnostic results above will confirm which of these two paths is responsible.
Author
Owner

@Ramazik commented on GitHub (Jun 2, 2026):

My apologies. Although I did look through the issue, I didn't see that the problem was previously described well here: https://github.com/MHSanaei/3x-ui/issues/4792
I tested the bug described there by creating a separate client with two inbounds, ID 8 and 10, and the problem is the same. For some reason, I thought the problem was specifically with XHTTP, not Hysteria. But I think my information might be just as useful.

<!-- gh-comment-id:4607871756 --> @Ramazik commented on GitHub (Jun 2, 2026): My apologies. Although I did look through the issue, I didn't see that the problem was previously described well here: https://github.com/MHSanaei/3x-ui/issues/4792 I tested the bug described there by creating a separate client with two inbounds, ID 8 and 10, and the problem is the same. For some reason, I thought the problem was specifically with XHTTP, not Hysteria. But I think my information might be just as useful.
Author
Owner

@Ramazik commented on GitHub (Jun 3, 2026):

I checked the data recommended by the AI ​​for verification in the browser

1. Tab Response request to /panel/api/clients/get/13900k
contains the following data
(the obj.client.flow` field parameter is empty.)

{
    "success": true,
    "msg": "",
    "obj": {
        "client": {
            "id": 38,
            "email": "13900k",
            "subId": "9k291fnvn919zvm1",
            "uuid": "xxxxxxa-xxxxxx-xxxxx-xxxx0-0xxxxxxx4a6c",
            "password": "fferfe4ehjn",
            "auth": "3dfg45gdfg",
            "flow": "",
            "security": "auto",
            "limitIp": 0,
            "totalGB": 0,
            "expiryTime": 0,
            "enable": true,
            "tgId": 0,
            "group": "",
            "comment": "ID подписки",
            "reset": 0,
            "createdAt": 1779995228367,
            "updatedAt": 1780445665351,
            "reverse": null
        },
        "inboundIds": [
            4,
            7,
            8,
            9,
            10,
            11,
            12
        ]
    }
}

Some data - passwords and uuid have been changed here for privacy reasons

2. Tab Response request to /panel/api/inbounds/options
contains the following data

{
    "success": true,
    "msg": "",
    "obj": [
        {
            "id": 3,
            "remark": "✈️ VLESS XHTTP for CDN",
            "tag": "in-1xxx2-tcp",
            "protocol": "vless",
            "port": 1xxx2,
            "tlsFlowCapable": false
        },
        {
            "id": 4,
            "remark": "🛸 VLESS XHTTP Reality",
            "tag": "in-8xx3-tcp",
            "protocol": "vless",
            "port": 8xx3,
            "tlsFlowCapable": false
        },
        {
            "id": 7,
            "remark": "🛸 VLESS XHTTP TLS",
            "tag": "in-8xx1-tcp",
            "protocol": "vless",
            "port": 8xx1,
            "tlsFlowCapable": false
        },
        {
            "id": 8,
            "remark": "🚀 VLESS TCP+Vision Reality",
            "tag": "in-4xx3-tcp",
            "protocol": "vless",
            "port": 4xx3,
            "tlsFlowCapable": true
        },
        {
            "id": 9,
            "remark": "🚀 VLESS TCP+Vision TLS",
            "tag": "in-443-tcp",
            "protocol": "vless",
            "port": 443,
            "tlsFlowCapable": true
        },
        {
            "id": 10,
            "remark": "♨️ Hysteria 2+Salamander",
            "tag": "in-8xx1-udp",
            "protocol": "hysteria",
            "port": 8xx1,
            "tlsFlowCapable": false
        },
        {
            "id": 11,
            "remark": "♨️ Hysteria 2+Masquerade",
            "tag": "in-3xxx4-udp",
            "protocol": "hysteria",
            "port": 3xxx4,
            "tlsFlowCapable": false
        },
        {
            "id": 12,
            "remark": "⛔ TEST --- VLESS gRPC Reality",
            "tag": "in-8xx8-tcp",
            "protocol": "vless",
            "port": 8xx8,
            "tlsFlowCapable": false
        }
    ]
}

(The "port" and "tag" data have been edited here. Some numbers have been replaced with the letter x).

<!-- gh-comment-id:4608071697 --> @Ramazik commented on GitHub (Jun 3, 2026): I checked the data recommended by the AI ​​for verification in the browser **1. Tab `Response` request to `/panel/api/clients/get/13900k`** contains the following data (the obj.client.flow` field parameter is empty.) ``` { "success": true, "msg": "", "obj": { "client": { "id": 38, "email": "13900k", "subId": "9k291fnvn919zvm1", "uuid": "xxxxxxa-xxxxxx-xxxxx-xxxx0-0xxxxxxx4a6c", "password": "fferfe4ehjn", "auth": "3dfg45gdfg", "flow": "", "security": "auto", "limitIp": 0, "totalGB": 0, "expiryTime": 0, "enable": true, "tgId": 0, "group": "", "comment": "ID подписки", "reset": 0, "createdAt": 1779995228367, "updatedAt": 1780445665351, "reverse": null }, "inboundIds": [ 4, 7, 8, 9, 10, 11, 12 ] } } ``` Some data - passwords and uuid have been changed here for privacy reasons **2. Tab `Response` request to `/panel/api/inbounds/options`** contains the following data ``` { "success": true, "msg": "", "obj": [ { "id": 3, "remark": "✈️ VLESS XHTTP for CDN", "tag": "in-1xxx2-tcp", "protocol": "vless", "port": 1xxx2, "tlsFlowCapable": false }, { "id": 4, "remark": "🛸 VLESS XHTTP Reality", "tag": "in-8xx3-tcp", "protocol": "vless", "port": 8xx3, "tlsFlowCapable": false }, { "id": 7, "remark": "🛸 VLESS XHTTP TLS", "tag": "in-8xx1-tcp", "protocol": "vless", "port": 8xx1, "tlsFlowCapable": false }, { "id": 8, "remark": "🚀 VLESS TCP+Vision Reality", "tag": "in-4xx3-tcp", "protocol": "vless", "port": 4xx3, "tlsFlowCapable": true }, { "id": 9, "remark": "🚀 VLESS TCP+Vision TLS", "tag": "in-443-tcp", "protocol": "vless", "port": 443, "tlsFlowCapable": true }, { "id": 10, "remark": "♨️ Hysteria 2+Salamander", "tag": "in-8xx1-udp", "protocol": "hysteria", "port": 8xx1, "tlsFlowCapable": false }, { "id": 11, "remark": "♨️ Hysteria 2+Masquerade", "tag": "in-3xxx4-udp", "protocol": "hysteria", "port": 3xxx4, "tlsFlowCapable": false }, { "id": 12, "remark": "⛔ TEST --- VLESS gRPC Reality", "tag": "in-8xx8-tcp", "protocol": "vless", "port": 8xx8, "tlsFlowCapable": false } ] } ``` **(The "port" and "tag" data have been edited here. Some numbers have been replaced with the letter `x`).**
Author
Owner

@Ramazik commented on GitHub (Jun 4, 2026):

Apparently, the issue for me has been resolved in 3X-UI version 3.2.7.
Thanks!

<!-- gh-comment-id:4617779639 --> @Ramazik commented on GitHub (Jun 4, 2026): Apparently, the issue for me **has been resolved in 3X-UI version 3.2.7**. Thanks!
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#3366
No description provided.