mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #5512] [Bug]: Subscription Name Uses Inbound Remark Instead of Host #3848
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#3848
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 @JackieWelles17 on GitHub (Jun 23, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5512
Describe the bug
The generated subscription name is using the Inbound Remark instead of the Host Remark value.
How to reproduce the problem
Expected behavior
The subscription name should use the configured Host Remark.
Actual behavior
The subscription name is populated with the Inbound Remark instead.
Relevant logs
Screenshots
No response
3x-ui version
3.4.0
Xray-core version
26.2.26
How did you install 3x-ui?
install.sh script
Operating system
Ubunto 26.04
Which parts of the panel are affected?
No response
Browser (only if it is a UI bug)
No response
Is the panel behind a reverse proxy or CDN?
Yes — Cloudflare (proxied DNS)
Before submitting
@github-actions[bot] commented on GitHub (Jun 23, 2026):
This is not a bug — the behavior is by design in v3.4.0, and a per-host workaround is available in the panel.
What the code does
The subscription name for each link is built in
internal/sub/remark_vars.go. Two separate template tokens control the two names:{{INBOUND}}always resolves to the inbound's own remark (inbound.Remark). The code comment is explicit: "configName is the display name for a link: always the inbound's own remark. The host endpoint's remark is surfaced only through the {{HOST}} token."{{HOST}}resolves to the host endpoint's remark (the value you entered in the Host section).The default Remark Template (set in
internal/web/service/setting.goand mirrored in the frontend default) is:Because the default template contains
{{INBOUND}}but not{{HOST}}, only the inbound remark appears in subscription names. The host remark is not used unless{{HOST}}is included in the template.This behaviour was introduced deliberately to fix issue #5443, in which
{{INBOUND}}was incorrectly showing the host name instead of the inbound name. Keeping the two tokens independent lets an operator show both, either, or neither.How to include the host remark
Open the panel and go to Settings → Subscription.
Find the Remark Template field. A
{{VAR}}picker is available;{{HOST}}is listed there under the "Client" group.Edit the template to include
{{HOST}}where you want it. Examples:Show only the host remark (with traffic and expiry):
Show both inbound and host remarks:
Note: if a host's remark field is empty,
{{HOST}}expands to an empty string. To avoid a stray separator, set a remark on every host, or use a template that does not depend on{{HOST}}for hosts that have no remark.Save settings. The new template takes effect immediately for all subsequent subscription fetches — no restart required.
This reply was generated automatically; a maintainer may follow up.