[GH-ISSUE #7047] [Bug]: Multiple Hosts for the same inbound/client show identical labels in the QR Code popup #6600

Closed
opened 2026-11-07 14:33:25 +07:00 by bsakaguchi · 1 comment
Owner

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

Describe the bug

When one inbound has multiple enabled Managed Hosts, the Clients > QR Code popup shows one identical section for each Host, with no Host remark, address, or endpoint shown.

Example setup:

  • Host remark host-a, endpoint host-a.example.com:80
  • Host remark host-b, endpoint host-b.example.com:80

Both Hosts belong to the same VLESS + WebSocket inbound and the same client. In the QR Code popup, both sections show exactly the same collapsed header:

Vless WS (example-inbound-example-client)

Expanding a section also does not show which Host it belongs to. I have to copy a link and inspect its address to know whether it is the host-a link or the host-b link. This makes it easy to copy and send the wrong Host's config.

The Hosts list itself shows the difference correctly (remark, endpoint, inbound, security). Only the QR Code / client links popup hides it.

How to reproduce the problem

  1. Create a VLESS inbound with WebSocket transport, port 80, security None.
  2. Add a client to that inbound.
  3. In Hosts, add 2 enabled Hosts for that inbound, with different remarks, addresses, Host headers, and the same path /.
  4. Go to Clients, click the QR Code icon for that client.
  5. Observe two identical Vless WS (example-inbound-example-client) sections, with no way to tell which one is which Host.

Expected behavior

Each Host section in the QR Code popup should show the Host remark and/or its endpoint address, for example:

Vless WS (example-inbound-example-client) — host-a / host-a.example.com:80
Vless WS (example-inbound-example-client) — host-b / host-b.example.com:80

The expanded link entry should also carry a distinct name per Host, so the copied link and the imported config in the client app can be told apart.

Actual behavior

Both sections have the identical header Vless WS (example-inbound-example-client), and the expanded entry does not identify its Host. The only way to tell them apart is by copying the link and reading its address.

Relevant logs

N/A — this is a UI display issue in the QR Code popup. No panel or Xray error occurs.

Screenshots

No response

3x-ui version

3.11.0

Xray-core version

26.10.21

How did you install 3x-ui?

install.sh script

Operating system

Ubuntu 24.04

Which parts of the panel are affected?

Frontend (UI / panel pages), Subscription (share links / Clash / JSON)

Browser (only if it is a UI bug)

Chrome

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 @hellodesignsburner on GitHub (Nov 2, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/7047 ### Describe the bug When one inbound has multiple enabled Managed Hosts, the Clients > QR Code popup shows one identical section for each Host, with no Host remark, address, or endpoint shown. Example setup: - Host remark `host-a`, endpoint `host-a.example.com:80` - Host remark `host-b`, endpoint `host-b.example.com:80` Both Hosts belong to the same VLESS + WebSocket inbound and the same client. In the QR Code popup, both sections show exactly the same collapsed header: `Vless WS (example-inbound-example-client)` Expanding a section also does not show which Host it belongs to. I have to copy a link and inspect its address to know whether it is the `host-a` link or the `host-b` link. This makes it easy to copy and send the wrong Host's config. The Hosts list itself shows the difference correctly (remark, endpoint, inbound, security). Only the QR Code / client links popup hides it. ### How to reproduce the problem 1. Create a VLESS inbound with WebSocket transport, port 80, security None. 2. Add a client to that inbound. 3. In Hosts, add 2 enabled Hosts for that inbound, with different remarks, addresses, Host headers, and the same path `/`. 4. Go to Clients, click the QR Code icon for that client. 5. Observe two identical `Vless WS (example-inbound-example-client)` sections, with no way to tell which one is which Host. ### Expected behavior Each Host section in the QR Code popup should show the Host remark and/or its endpoint address, for example: `Vless WS (example-inbound-example-client) — host-a / host-a.example.com:80` `Vless WS (example-inbound-example-client) — host-b / host-b.example.com:80` The expanded link entry should also carry a distinct name per Host, so the copied link and the imported config in the client app can be told apart. ### Actual behavior Both sections have the identical header `Vless WS (example-inbound-example-client)`, and the expanded entry does not identify its Host. The only way to tell them apart is by copying the link and reading its address. ### Relevant logs ```shell N/A — this is a UI display issue in the QR Code popup. No panel or Xray error occurs. ``` ### Screenshots _No response_ ### 3x-ui version 3.11.0 ### Xray-core version 26.10.21 ### How did you install 3x-ui? install.sh script ### Operating system Ubuntu 24.04 ### Which parts of the panel are affected? Frontend (UI / panel pages), Subscription (share links / Clash / JSON) ### Browser (only if it is a UI bug) Chrome ### 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-11-07 14:33:25 +07:00
  • closed this issue
  • added the
    question
    label
Author
Owner

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

This is expected behaviour that a setting controls, not a QR-popup bug. A Host's remark only becomes part of the config name when your Remark Template contains the {{HOST}} token. The default template doesn't include it, so every Host link for a client gets the same name, <inbound>-<email>. The QR popup just shows that name, which is why both sections read example-inbound-example-client.

Fix (works now on 3.11.0):

  1. Open Settings → Subscription.
  2. In Remark Template, add {{HOST}}, for example:
    {{INBOUND}}-{{HOST}}-{{EMAIL}}|📊{{TRAFFIC_LEFT}}|⏳{{DAYS_LEFT}}D
    
  3. Save, then reopen the QR popup.

Each section header becomes example-inbound-host-a-example-client / ...-host-b-.... The copied link and the config your client app imports carry the same distinct name, because the popup reads its label from the link's own remark. That covers both of your expected behaviours.

Why the popup looks this way

  • The popup's section header is built only from the link itself: protocol, transport and security tags, then remark:port (frontend/src/pages/clients/ClientQrModal.tsx:453-458, linkMetaText in frontend/src/lib/xray/link-label.tsx:151-153). Both of your Hosts use port 80, so the only part that could tell them apart is the remark.
  • That remark comes from the backend. genHostRemark uses the template whenever one is set (internal/sub/remark_vars.go:683-688), and the default is DefaultRemarkTemplate = "{{INBOUND}}-{{EMAIL}}|📊{{TRAFFIC_LEFT}}|⏳{{DAYS_LEFT}}D" (internal/web/service/setting.go:41), which has no {{HOST}}.
  • This is deliberate. internal/sub/remark_vars.go:18-20 says the host remark "backs the {{HOST}} token only — it never substitutes the inbound's remark as the config name (use {{INBOUND}} and {{HOST}} side by side to show both)". TestGenHostRemark_GlobalTemplate (internal/sub/remark_vars_test.go:231) asserts it. The token is documented in docs/content/docs/en/config/share-links.mdx ("{{HOST}} | Host-row remark (managed hosts)").
  • The same answer resolved #6791 and #7027.

Verdict: Not a bug (user configuration)
Severity: N/A
Confidence: High
Root cause: No defect. Host links share a name because the default Remark Template (internal/web/service/setting.go:41) leaves out {{HOST}}, and by design (internal/sub/remark_vars.go:18-20, from 6d9fd4b4 "fix(sub): {{INBOUND}} = inbound remark…", #5443) a host's remark only enters the name through that token.
Same class: None found
Already fixed: Not applicable
Duplicate of: Related: #6791, #7027 (same cause, same fix)
Evidence: ClientQrModal.tsx:453-469 (header and QR remark come from parseLinkParts(link)); link-label.tsx:151-153; remark_vars.go:683-688; remark_vars_test.go:231-245
Not determined: None

A possible improvement for the maintainer, not a defect: with the default template, nothing in this popup shows a link's address, so links that differ only by Host can't be told apart. Showing the address in the header, or adding {{HOST}} to the default template, would change that. Either one is a deliberate behaviour change.

I'm closing this as expected behaviour. Reply here if adding {{HOST}} still leaves the two sections looking the same.

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

<!-- gh-comment-id:6566102764 --> @github-actions[bot] commented on GitHub (Nov 2, 2026): This is expected behaviour that a setting controls, not a QR-popup bug. A Host's remark only becomes part of the config name when your **Remark Template** contains the `{{HOST}}` token. The default template doesn't include it, so every Host link for a client gets the same name, `<inbound>-<email>`. The QR popup just shows that name, which is why both sections read `example-inbound-example-client`. **Fix (works now on 3.11.0):** 1. Open **Settings → Subscription**. 2. In **Remark Template**, add `{{HOST}}`, for example: ``` {{INBOUND}}-{{HOST}}-{{EMAIL}}|📊{{TRAFFIC_LEFT}}|⏳{{DAYS_LEFT}}D ``` 3. Save, then reopen the QR popup. Each section header becomes `example-inbound-host-a-example-client` / `...-host-b-...`. The copied link and the config your client app imports carry the same distinct name, because the popup reads its label from the link's own remark. That covers both of your expected behaviours. **Why the popup looks this way** - The popup's section header is built only from the link itself: protocol, transport and security tags, then `remark:port` (`frontend/src/pages/clients/ClientQrModal.tsx:453-458`, `linkMetaText` in `frontend/src/lib/xray/link-label.tsx:151-153`). Both of your Hosts use port 80, so the only part that could tell them apart is the remark. - That remark comes from the backend. `genHostRemark` uses the template whenever one is set (`internal/sub/remark_vars.go:683-688`), and the default is `DefaultRemarkTemplate = "{{INBOUND}}-{{EMAIL}}|📊{{TRAFFIC_LEFT}}|⏳{{DAYS_LEFT}}D"` (`internal/web/service/setting.go:41`), which has no `{{HOST}}`. - This is deliberate. `internal/sub/remark_vars.go:18-20` says the host remark "backs the {{HOST}} token only — it never substitutes the inbound's remark as the config name (use {{INBOUND}} and {{HOST}} side by side to show both)". `TestGenHostRemark_GlobalTemplate` (`internal/sub/remark_vars_test.go:231`) asserts it. The token is documented in `docs/content/docs/en/config/share-links.mdx` ("`{{HOST}}` | Host-row remark (managed hosts)"). - The same answer resolved #6791 and #7027. Verdict: Not a bug (user configuration) Severity: N/A Confidence: High Root cause: No defect. Host links share a name because the default Remark Template (`internal/web/service/setting.go:41`) leaves out `{{HOST}}`, and by design (`internal/sub/remark_vars.go:18-20`, from 6d9fd4b4 "fix(sub): {{INBOUND}} = inbound remark…", #5443) a host's remark only enters the name through that token. Same class: None found Already fixed: Not applicable Duplicate of: Related: #6791, #7027 (same cause, same fix) Evidence: `ClientQrModal.tsx:453-469` (header and QR remark come from `parseLinkParts(link)`); `link-label.tsx:151-153`; `remark_vars.go:683-688`; `remark_vars_test.go:231-245` Not determined: None A possible improvement for the maintainer, not a defect: with the default template, nothing in this popup shows a link's address, so links that differ only by Host can't be told apart. Showing the address in the header, or adding `{{HOST}}` to the default template, would change that. Either one is a deliberate behaviour change. I'm closing this as expected behaviour. Reply here if adding `{{HOST}}` still leaves the two sections looking the same. *This reply was generated automatically; a maintainer may follow up.* <!-- claude-issue:analyst -->
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#6600
No description provided.