[GH-ISSUE #5512] [Bug]: Subscription Name Uses Inbound Remark Instead of Host #3848

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

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

  1. Install or upgrade to 3x-ui v3.4.0.
  2. Create an inbound with a custom remark (e.g. Germany-01).
  3. Configure an external proxy (that is now in Host section) with a different Remark.
  4. Generate or access the subscription link.
  5. Import the subscription into a client.

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

  • 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 @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 1. Install or upgrade to 3x-ui v3.4.0. 2. Create an inbound with a custom remark (e.g. Germany-01). 3. Configure an external proxy (that is now in Host section) with a different Remark. 4. Generate or access the subscription link. 5. Import the subscription into a client. ### 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 ```shell ``` ### 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 - [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:35:23 +07:00
Author
Owner

@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.go and mirrored in the frontend default) is:

{{INBOUND}}|📊{{TRAFFIC_LEFT}}|⏳{{DAYS_LEFT}}D

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

  1. Open the panel and go to Settings → Subscription.

  2. Find the Remark Template field. A {{VAR}} picker is available; {{HOST}} is listed there under the "Client" group.

  3. Edit the template to include {{HOST}} where you want it. Examples:

    Show only the host remark (with traffic and expiry):

    {{HOST}}|📊{{TRAFFIC_LEFT}}|⏳{{DAYS_LEFT}}D
    

    Show both inbound and host remarks:

    {{INBOUND}}-{{HOST}}|📊{{TRAFFIC_LEFT}}|⏳{{DAYS_LEFT}}D
    

    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.

  4. 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.

<!-- gh-comment-id:4781594817 --> @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.go` and mirrored in the frontend default) is: ``` {{INBOUND}}|📊{{TRAFFIC_LEFT}}|⏳{{DAYS_LEFT}}D ``` 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** 1. Open the panel and go to **Settings → Subscription**. 2. Find the **Remark Template** field. A `{{VAR}}` picker is available; `{{HOST}}` is listed there under the "Client" group. 3. Edit the template to include `{{HOST}}` where you want it. Examples: Show only the host remark (with traffic and expiry): ``` {{HOST}}|📊{{TRAFFIC_LEFT}}|⏳{{DAYS_LEFT}}D ``` Show both inbound and host remarks: ``` {{INBOUND}}-{{HOST}}|📊{{TRAFFIC_LEFT}}|⏳{{DAYS_LEFT}}D ``` 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. 4. 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.*
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#3848
No description provided.