[GH-ISSUE #5671] [Bug]: Host remark is ignored in Inbounds in Hosts #3950

Closed
opened 2026-10-31 20:36:06 +07:00 by bsakaguchi · 1 comment
Owner

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

  1. Create or edit an Inbound and leave its Remark empty (No Remark).
  2. Create or edit a Host and edit the Remark.

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

  • 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 @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 1. Create or edit an Inbound and leave its Remark empty (No Remark). 2. Create or edit a Host and edit the Remark. ### 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 ```shell ``` ### 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 - [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:36:06 +07:00
Author
Owner

@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 in internal/sub/remark_vars.go:32–37, where configName() 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:

"A plain label for this host. Shown as the config name only when the inbound has no remark of its own."

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

  1. Open the panel and go to Settings → Subscription.
  2. Find the Remark Template field and add {{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.

  1. Save settings. The change takes effect immediately for all subsequent subscription fetches — no restart required.

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.json and all other locale files.

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

<!-- gh-comment-id:4839467252 --> @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 in `internal/sub/remark_vars.go:32–37`, where `configName()` 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: > "A plain label for this host. Shown as the config name only when the inbound has no remark of its own." 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** 1. Open the panel and go to **Settings → Subscription**. 2. Find the **Remark Template** field and add `{{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. 3. Save settings. The change takes effect immediately for all subsequent subscription fetches — no restart required. 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.json` and all other locale files. *This reply was generated automatically; a maintainer may follow up.*
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#3950
No description provided.