mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #6253] [Bug]: Panel-to-Panel Reverse connection triggers Telegram login notifications #4243
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#4243
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 @Mo7amadd on GitHub (Aug 18, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6253
Describe the bug
When Telegram login notifications are enabled on Panel A, establishing a Panel-to-Panel Reverse connection from Panel B triggers a Telegram Login successful notification.
For example:
Panel A has Telegram bot/login notifications enabled.
Panel B connects to Panel A using Panel-to-Panel Reverse.
Panel A sends a normal Login successful Telegram notification for the authentication from Panel B.
This is misleading because the authentication is generated by the internal Panel-to-Panel Reverse connection, not by an administrator logging into the web panel.
The notification may also be triggered again during reverse reconnect attempts when the connection is interrupted or unavailable.
How to reproduce the problem
Configure Telegram bot notifications on Panel A.
Enable Login Notification on Panel A.
Configure Panel B to connect to Panel A using Panel-to-Panel Reverse.
Start the reverse connection.
Check Telegram notifications from Panel A.
A Login successful notification is generated for the Panel-to-Panel Reverse authentication.
If the reverse connection is interrupted and reconnect attempts occur, additional login notifications may also be generated.
Expected behavior
Panel-to-Panel Reverse authentication should not trigger normal Telegram panel login notifications.
Login notifications should only be sent for actual administrator/user logins to the web panel.
Internal Panel-to-Panel Reverse authentication or reconnect requests should either be excluded from login notifications or use a separate notification type.
Actual behavior
Panel-to-Panel Reverse authentication is treated as a normal panel login and generates Telegram Login successful notifications.
Relevant logs
Screenshots
No response
3x-ui version
dev+380aff4d
Xray-core version
No response
How did you install 3x-ui?
install.sh script
Operating system
Ubuntu 24.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?
None
Before submitting
@github-actions[bot] commented on GitHub (Aug 18, 2026):
I could not reproduce this path in the source: there is no code in the panel where a reverse connection authenticates against the login handler. The "Logged in to the panel successfully" Telegram message has exactly one producer, a successful
POST /loginwith valid credentials.The chain I traced on the current
main(the commit you are running,380aff4):internal/web/controller/index.go:117is the onlyUserLoginNotify(..., Status: tgbot.LoginSuccess)call, and it is reached only aftera.userService.CheckUser(...)returns a user (index.go:95).internal/web/service/tgbot/tgbot_report.go:180publishes thelogin.attemptevent.internal/web/service/tgbot/tgbot_event.go:138-147renderstgbot.messages.loginSuccess, i.e. the message you received.POST /loginis registered once, atinternal/web/controller/index.go:46, and nothing in the repository calls it; the only caller is the browser login form (frontend/src/pages/login/LoginPage.tsx:81).Two things that rule out the mechanisms one would suspect first:
reverse.tag(internal/database/model/model.go:868-878, persisted ininternal/web/service/client_crud.go:570-580) plus a matchingsettings.reverseTagon the VLESS outbound. It is carried entirely in the generated Xray config and never reaches the panel's HTTP router, so it cannot invoke the login handler./logineither: the master authenticates with a bearer API token or an mTLS client certificate (internal/web/runtime/remote.go:232-237, verified ininternal/web/controller/api.go:37-62), so node heartbeats and reconnects cannot emit login notifications.That means something is performing a genuine credentialed login against Panel A's web panel, and it is worth identifying rather than filtering out. To narrow it down, please provide:
UsernameandIPlines from the Telegram message on Panel A (the template includes both,tgbot_event.go:143-144). Whether the IP is Panel B's address decides where to look next.x-ui logon the server. Every successful login also writes<username> logged in successfully, Ip Address: <ip>atinternal/web/controller/index.go:116. If that line is present, a real login request arrived; if the Telegram message appears without it, that is a different defect and useful to know./loginand re-authenticate on every reconnect, which would match the pattern you describe, including the repeat notifications on reconnect.As an interim measure, login notifications can be switched off in Panel Settings, Telegram tab, "Security" group, "Login attempt" toggle. It writes the
tgEnabledEventssetting (defaultlogin.attempt,cpu.high,internal/web/service/setting.go:157) and is all-or-nothing, so it also suppresses failed-login alerts.Certainty: the notification chain above is confirmed in the source at the lines given; the reverse-triggered path is what I could not confirm, which is why the details above are needed.
This reply was generated automatically. A maintainer may follow up.