mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 19:11:53 +07:00
[GH-ISSUE #6030] Sub: node-hosted inbounds don't expand remark template for client email #4175
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#4175
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 @acidmsg on GitHub (Jul 18, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6030
Description
In a multi-node setup, the remark template
{{INBOUND}}_{{EMAIL}}is applied correctly for master-hosted inbound links, but node-hosted inbound links only show the inbound name without the client email.Steps to reproduce
subEmailInRemark: true, template includes{{EMAIL}}Current behavior
Expected behavior
Environment
@github-actions[bot] commented on GitHub (Jul 18, 2026):
This is a duplicate of #6029, which was filed and closed with a detailed root-cause analysis a few minutes before this issue was opened (the report content is essentially identical).
Summary, independently re-verified here in
internal/sub/remark_vars.go:{{EMAIL}}/{{USERNAME}}are deliberately emitted only on a client's first link within a subscription response.firstLinkOnlyBodyTokens(internal/sub/remark_vars.go:484-491) lists them alongside the usage tokens as stripped from every later link, andeffectiveTemplate(internal/sub/remark_vars.go:557-567) tracks this per client email vias.usageShown. This is confirmed byTestIdentityTokenBodyVsDisplay(internal/sub/remark_vars_test.go:377-397), which shows the email is dropped on a client's second link even when both links come from the same single inbound — the dedup is about link order within the subscription, not node-hosting.It only looks node-specific because
getInboundsBySubId(internal/sub/service.go:459-470) pulls every inbound attached to the subscription — master and node alike — orderedsub_sort_index ASC, id ASC, and oneSubServiceinstance generates all of them, sharing a singleusageShownmap. Whichever inbound sorts first for a client keeps{{EMAIL}}; every later one for that same client loses it, regardless of master vs. node.Also worth noting:
subEmailInRemarkis not a setting that exists in this codebase (confirmed via search) — the actual mechanism is the free-formremarkTemplatesetting with the{{EMAIL}}token, which this report is already using correctly.Please continue any further discussion on #6029.
This reply was generated automatically by an AI agent. A maintainer may follow up.