mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #5671] [Bug]: Host remark is ignored in Inbounds in Hosts #3950
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#3950
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 @Tommytalk on GitHub (Jun 30, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5671
Describe the bug
i already removed the Remark of inbound, and add the host(exteral proxy). but the Host remark is not still displayed right.
I added a Remark for a Host in Hosts, but in the Inbounds list it still displays only the Address instead of using the Host’s Remark.
How to reproduce the problem
Expected behavior
If the Inbound has No Remark, the UI should display the Host’s Remark.
Actual behavior
The UI displays only the Host Address. The Host Remark is ignored.
Relevant logs
Screenshots
No response
3x-ui version
3.4.2
Xray-core version
v26.6.27
How did you install 3x-ui?
install.sh script
Operating system
debian 13
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?
None
Before submitting
@github-actions[bot] commented on GitHub (Jun 30, 2026):
The host remark is not being ignored — it requires an explicit
{{HOST}}token in the Remark Template to appear in the generated node name. The current default template does not include{{HOST}}, which is why only the inbound-derived portion of the name is shown.Root cause
The default Remark Template (confirmed in
internal/web/service/setting.go:60) is:```
{{INBOUND}}-{{EMAIL}}|📊{{TRAFFIC_LEFT}}|⏳{{DAYS_LEFT}}D
```
Two separate tokens control the two names:
{{INBOUND}}— always resolves to the inbound's own remark. When the inbound has no remark this token expands to an empty string, leaving a leading-or just the email portion.{{HOST}}— resolves to the remark you set on the Host entry.Because the default template contains
{{INBOUND}}but not{{HOST}}, the host remark is never included in the node name regardless of whether the inbound has its own remark. The logic is confirmed ininternal/sub/remark_vars.go:32–37, whereconfigName()is documented as "always the inbound's own remark. The host endpoint's remark is surfaced only through the{{HOST}}token."Misleading tooltip
The Remark field tooltip in the Host form (
internal/web/translation/en-US.json:1036) reads:This description is accurate only when the Remark Template is completely empty (no template configured). With any template active — including the default — the host remark reaches the node name only if
{{HOST}}appears in that template. The tooltip text does not reflect this constraint, which causes the confusion described here.Workaround
{{HOST}}where you want the host remark to appear.To show only the host remark (dropping the inbound remark):
```
{{HOST}}|📊{{TRAFFIC_LEFT}}|⏳{{DAYS_LEFT}}D
```
To show both side by side (the inbound remark first when set, then the host remark):
```
{{INBOUND}}-{{HOST}}|📊{{TRAFFIC_LEFT}}|⏳{{DAYS_LEFT}}D
```
Note: when the inbound remark is empty and
{{INBOUND}}stays in the template, the generated name will start with a-separator before the host remark. Using the first example above avoids that if you rely entirely on host remarks.The underlying tooltip text inaccuracy is a known discrepancy (discussed in related issues #5512 and #5541); correcting it requires a documentation/i18n fix to
en-US.jsonand all other locale files.This reply was generated automatically; a maintainer may follow up.