mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #7047] [Bug]: Multiple Hosts for the same inbound/client show identical labels in the QR Code popup #6600
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#6600
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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-a, endpointhost-a.example.com:80host-b, endpointhost-b.example.com:80Both 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-alink or thehost-blink. 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
/.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:80Vless WS (example-inbound-example-client) — host-b / host-b.example.com:80The 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
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
@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 readexample-inbound-example-client.Fix (works now on 3.11.0):
{{HOST}}, for example: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
remark:port(frontend/src/pages/clients/ClientQrModal.tsx:453-458,linkMetaTextinfrontend/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.genHostRemarkuses the template whenever one is set (internal/sub/remark_vars.go:683-688), and the default isDefaultRemarkTemplate = "{{INBOUND}}-{{EMAIL}}|📊{{TRAFFIC_LEFT}}|⏳{{DAYS_LEFT}}D"(internal/web/service/setting.go:41), which has no{{HOST}}.internal/sub/remark_vars.go:18-20says 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 indocs/content/docs/en/config/share-links.mdx("{{HOST}}| Host-row remark (managed hosts)").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, from6d9fd4b4"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 fromparseLinkParts(link));link-label.tsx:151-153;remark_vars.go:683-688;remark_vars_test.go:231-245Not 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.