[GH-ISSUE #5356] Subscription remark model lacks Panel Name variable / 订阅备注模型缺少面板名称变量 #3754

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

Originally created by @dkgks on GitHub (Jun 15, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5356

Describe the bug / 问题描述

在订阅设置 > 信息 > 备注模型中,系统提供了备注模板和分隔符等配置选项,但没有将「面板名称」作为可用变量加入备注模型中。

当通过 API 管理外部面板节点后,这些节点在被订阅时会自动附上 @面板名称 后缀(例如 US-01@Tokyo-VPS),这个 @ 分隔符和面板名称的附加行为是硬编码的,用户在备注模型设置中无法修改或移除。


English:

In Subscription Settings > Info > Remark Model, the system provides remark templates and separator configuration options, but "Panel Name" is not available as a variable in the remark model.

When external panel nodes are managed via API, those nodes automatically get a @PanelName suffix appended when served through subscription (e.g. US-01@Tokyo-VPS). The @ separator and panel name suffix behavior is hardcoded — users cannot modify or remove it through the remark model settings.

How to reproduce / 复现步骤

  1. 部署两个 3x-ui 实例,面板 A(名称设为 Tokyo)和面板 B
  2. 在面板 A 上创建一个入站,添加客户端,备注设为 US-01
  3. 在面板 B 通过 API -> 外部面板管理,添加面板 A
  4. 面板 B 中进入入站列表 -> 找到面板 A 的入站 -> 订阅设置 -> 生成订阅链接
  5. 打开订阅链接,观察节点名称 -> 显示为 US-01@Tokyo,而非 US-01

English:

  1. Deploy two 3x-ui instances: Panel A (named Tokyo) and Panel B
  2. On Panel A, create an inbound and add a client with remark US-01
  3. On Panel B, go to API -> External Panel Management, add Panel A
  4. On Panel B, go to Inbound List -> locate Panel A's inbound -> Subscription Settings -> generate a subscription link
  5. Open the subscription link and check node names -> they appear as US-01@Tokyo instead of US-01

Expected behavior / 期望行为

在备注模型中增加「面板名称」作为可选变量,让用户能够:

  • 选择是否在订阅节点名中显示面板名称
  • 自定义面板名称的前缀/分隔符(而非硬编码 @)
  • 或者直接用源节点的原始备注(不附加面板名称)

English:

Add "Panel Name" as an optional variable in the remark model, allowing users to:

  • Choose whether to include the panel name in subscription node names
  • Customize the prefix/separator for panel name (instead of the hardcoded @)
  • Or simply use the source node's original remark without any panel name appended

Actual behavior / 实际影响

  • 多面板订阅的终端用户看到的是 备注@面板名称 的固定格式
  • 现有备注模型设置中没有相关选项
  • 无变通方案

English:

  • End-users of multi-panel subscriptions see a fixed remark@PanelName format that cannot be changed
  • No relevant option exists in the current remark model settings
  • No workaround available
Originally created by @dkgks on GitHub (Jun 15, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5356 ## Describe the bug / 问题描述 在订阅设置 > 信息 > 备注模型中,系统提供了备注模板和分隔符等配置选项,但没有将「面板名称」作为可用变量加入备注模型中。 当通过 API 管理外部面板节点后,这些节点在被订阅时会自动附上 `@面板名称` 后缀(例如 `US-01@Tokyo-VPS`),这个 `@` 分隔符和面板名称的附加行为是硬编码的,用户在备注模型设置中无法修改或移除。 --- **English:** In Subscription Settings > Info > Remark Model, the system provides remark templates and separator configuration options, but **"Panel Name" is not available as a variable** in the remark model. When external panel nodes are managed via API, those nodes automatically get a `@PanelName` suffix appended when served through subscription (e.g. `US-01@Tokyo-VPS`). The `@` separator and panel name suffix behavior is **hardcoded** — users cannot modify or remove it through the remark model settings. ## How to reproduce / 复现步骤 1. 部署两个 3x-ui 实例,面板 A(名称设为 `Tokyo`)和面板 B 2. 在面板 A 上创建一个入站,添加客户端,备注设为 `US-01` 3. 在面板 B 通过 API -> 外部面板管理,添加面板 A 4. 面板 B 中进入入站列表 -> 找到面板 A 的入站 -> 订阅设置 -> 生成订阅链接 5. 打开订阅链接,观察节点名称 -> 显示为 `US-01@Tokyo`,而非 `US-01` --- **English:** 1. Deploy two 3x-ui instances: Panel A (named `Tokyo`) and Panel B 2. On Panel A, create an inbound and add a client with remark `US-01` 3. On Panel B, go to API -> External Panel Management, add Panel A 4. On Panel B, go to Inbound List -> locate Panel A's inbound -> Subscription Settings -> generate a subscription link 5. Open the subscription link and check node names -> they appear as `US-01@Tokyo` instead of `US-01` ## Expected behavior / 期望行为 在备注模型中增加「面板名称」作为可选变量,让用户能够: - 选择是否在订阅节点名中显示面板名称 - 自定义面板名称的前缀/分隔符(而非硬编码 `@`) - 或者直接用源节点的原始备注(不附加面板名称) --- **English:** Add "Panel Name" as an optional variable in the remark model, allowing users to: - Choose whether to include the panel name in subscription node names - Customize the prefix/separator for panel name (instead of the hardcoded `@`) - Or simply use the source node's original remark without any panel name appended ## Actual behavior / 实际影响 - 多面板订阅的终端用户看到的是 `备注@面板名称` 的固定格式 - 现有备注模型设置中没有相关选项 - 无变通方案 --- **English:** - End-users of multi-panel subscriptions see a fixed `remark@PanelName` format that cannot be changed - No relevant option exists in the current remark model settings - No workaround available
bsakaguchi 2026-10-31 20:34:43 +07:00
Author
Owner

@github-actions[bot] commented on GitHub (Jun 15, 2026):

The behavior you describe — a hardcoded @NodeName suffix appended to subscription remarks for node-hosted inbounds — is a confirmed regression introduced in v3.3.1 (via the change that fixed #5035) and has already been reported and resolved upstream.

What happened in v3.3.1. The genRemark function in internal/sub/service.go was extended with a block that appended @<NodeName> to the inbound remark for any inbound whose NodeID is set. This caused every node-hosted entry to display as Remark@NodeName (e.g. US-01@Tokyo) in client apps.

Current state on main. Commit b770287 (fix(sub): stop appending the node name to subscription remarks) removed this block entirely. The genRemark function (lines 1557–1640 of internal/sub/service.go on main) now builds the subscription remark solely from the remarkModel slots — inbound remark (i), client email (e), and endpoint remark (o) — with no node-name component. A regression test, TestGenRemarkOmitsNodeName in internal/sub/service_test.go:32, explicitly guards against the suffix returning.

Timeline. Commit b770287 was merged on 2026-06-12 at 20:35 UTC, roughly 90 minutes after v3.3.1 was published at 18:49 UTC, so v3.3.1 still contains the regression and the fix will ship in the next release.

On the enhancement request. The suffix was removed unconditionally rather than made configurable. There is no panel-name slot in the remark model and none has been added. The same enhancement (a toggle or remark-model variable for the node name) was requested in #5235 and #5257, both of which are closed. If you want to reopen that discussion, a new focused feature request is the appropriate channel.

Workaround until the next release. Either rebuild from main, or include the node name directly in the inbound's Remark field — the v3.3.1 code skips appending the suffix when the remark already contains the node name (\!strings.Contains(orders['i'], n.Name)).

This issue is a duplicate of #5231, #5235, and #5347.

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

<!-- gh-comment-id:4710353084 --> @github-actions[bot] commented on GitHub (Jun 15, 2026): The behavior you describe — a hardcoded `@NodeName` suffix appended to subscription remarks for node-hosted inbounds — is a confirmed regression introduced in v3.3.1 (via the change that fixed #5035) and has already been reported and resolved upstream. **What happened in v3.3.1.** The `genRemark` function in `internal/sub/service.go` was extended with a block that appended `@<NodeName>` to the inbound remark for any inbound whose `NodeID` is set. This caused every node-hosted entry to display as `Remark@NodeName` (e.g. `US-01@Tokyo`) in client apps. **Current state on `main`.** Commit `b770287` (`fix(sub): stop appending the node name to subscription remarks`) removed this block entirely. The `genRemark` function (lines 1557–1640 of `internal/sub/service.go` on `main`) now builds the subscription remark solely from the `remarkModel` slots — inbound remark (`i`), client email (`e`), and endpoint remark (`o`) — with no node-name component. A regression test, `TestGenRemarkOmitsNodeName` in `internal/sub/service_test.go:32`, explicitly guards against the suffix returning. **Timeline.** Commit `b770287` was merged on 2026-06-12 at 20:35 UTC, roughly 90 minutes after v3.3.1 was published at 18:49 UTC, so v3.3.1 still contains the regression and the fix will ship in the next release. **On the enhancement request.** The suffix was removed unconditionally rather than made configurable. There is no panel-name slot in the remark model and none has been added. The same enhancement (a toggle or remark-model variable for the node name) was requested in #5235 and #5257, both of which are closed. If you want to reopen that discussion, a new focused feature request is the appropriate channel. **Workaround until the next release.** Either rebuild from `main`, or include the node name directly in the inbound's `Remark` field — the v3.3.1 code skips appending the suffix when the remark already contains the node name (`\!strings.Contains(orders['i'], n.Name)`). This issue is a duplicate of #5231, #5235, and #5347. *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#3754
No description provided.