mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #4778] [Feature]: Display Inbound Tag / Port context in Web UI (Connections) and Telegram Bot for clients with multiple attached inbounds #3314
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#3314
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 @Speert on GitHub (Jun 1, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/4778
Is your feature request related to a problem?
With the introduction of the "Attached Inbounds" feature, an administrator can now cleanly link a single client profile (email) to multiple inbounds/ports simultaneously to generate a unified subscription link. This is a massive improvement for user database organization, but it creates a critical blind spot in server monitoring:
Complete Loss of Routing Context: Because the client now uses a single identifier (email) across all assigned inbounds, it is completely impossible to determine which specific inbound, protocol, or port the client is actively connected to. Both the Web UI and the Telegram Bot completely lose this vital context.
Blind Troubleshooting: If a client experiences a poor connection on a backup port or accidentally triggers a traffic limit alert, the administrator only sees that the generic email triggered the event. There is no way to know whether the issue occurred on the primary VLESS-Reality inbound, a secondary SplitHTTP port, or an alternative fallback gateway without manually combing through raw system logs via SSH.
Describe the solution you'd like
Since the Xray-core backend already processes and associates session data with specific inbound tags internally, we need this routing context exposed to the panel's front-facing utilities:
Web UI Optimization (Connections Tab): Add a dedicated Inbound Tag or Port column to the active connections table. This will allow administrators to see exactly where traffic is being routed in real time.
Telegram Bot Enhancements: Include inbound context variables (such as {{inbound.tag}} and {{inbound.port}}) into the bot's automated alert and summary message templates.
Example of the requested Telegram notification change:
Current Behavior: Client "sudo" has exceeded the traffic limit.
Requested Behavior: Client "sudo" [inbound-443] has exceeded the traffic limit.
Alternatives you've considered
The only current workaround is maintaining old-style duplicate client configurations (e.g., creating separate sudo and sudo_R entries for each inbound), which actively conflicts with the new strict UNIQUE constraints on sub_id fields in recent database migrations and breaks unified subscriptions.
Concrete use case
No response
Mockups, screenshots, or examples
No response
Which parts of the panel would this affect?
No response
Are you willing to help?
Before submitting
@github-actions[bot] commented on GitHub (Jun 1, 2026):
Thank you for the well-detailed feature request, @Speert!
This is a valid gap introduced by the Attached Inbounds feature. When a single client email is linked to multiple inbounds, the Connections tab and Telegram Bot alerts lose the per-inbound context that was previously implicit (because each client mapped to exactly one inbound).
A few notes on the scope and feasibility:
Web UI – Connections Tab
The active connections data comes from Xray-core's
/stats/API (viastatsService). The connection session data returned by Xray does not natively expose the inbound tag per-connection in a straightforward way today. Surfacing this would likely require correlating traffic stats with inbound tag data internally. This is technically non-trivial, but the request is reasonable.Telegram Bot Alerts
Adding inbound context (e.g.
[inbound-tag]) to traffic-limit and similar notifications appears more feasible. The Telegram notification logic lives primarily intelegram/— adding the associated inbound tag(s) when building alert messages for a client would be a focused change.Workaround in the meantime:
As you noted, the old approach of separate per-inbound client entries (e.g.
sudo,sudo_R) conflicts with the new uniquesub_idconstraint. There is currently no clean workaround — this feature addition is the right path.If you (or anyone else) wants to open a PR, the most impactful starting point would be the Telegram alert path, as it is more self-contained. Contributions are welcome!
@Speert commented on GitHub (Jun 1, 2026):
Thank you for the quick and detailed response!
I completely agree with your assessment. Starting with the Telegram bot alerts makes perfect sense since it's more self-contained and will immediately restore the lost visibility for day-to-day monitoring.
I'm glad we are on the same page regarding the workaround limitations. Hopefully, someone from the community (or myself, if I get a chance to dive into the Go code) can open a PR for the Telegram path soon.
I'll leave this issue open for tracking. Thanks again for your amazing work on maintaining 3x-ui!