Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2026-01-19fix Telegram bot ignores reverse proxy setting #3673 (#3684)mr-shura
Refactor URL construction to use pre-configured URIs if available, otherwise fallback to default scheme and host.
2026-01-02Fix telegram bot issue (#3608)Vlad Yaroslavlev
* fix: improve Telegram bot handling for concurrent starts and graceful shutdown - Added logic to stop any existing long-polling loop when Start is called again. - Introduced a mutex to manage access to shared state variables, ensuring thread safety. - Updated the OnReceive method to prevent multiple concurrent executions. - Enhanced Stop method to ensure proper cleanup of resources and state management. * fix: enhance Telegram bot's long-polling management - Improved handling of concurrent starts by stopping existing long-polling loops. - Implemented mutex for thread-safe access to shared state variables. - Updated OnReceive method to prevent multiple executions. - Enhanced Stop method for better resource cleanup and state management. * .
2025-12-03Fix int64 for 32-bit arch (#3591)Roman Gogolev
* fix int64 for 32-bit arch * Update web/service/tgbot.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-03Add "Last Online" printing for Telegram bot (#3593)Anton Petrov
2025-11-01Fix: Graceful Telegram bot shutdown to prevent 409 Conflict (#3580)OleksandrParshyn
* Fix: Graceful Telegram bot shutdown to prevent 409 Conflict Introduces a `botCancel` context and a global `StopBot()` function to ensure the Telegram bot's Long Polling operation is safely terminated (via context cancellation) before the service restarts. This prevents the "Conflict: another update consumer is running" (409) error upon panel restart. Changes: - Added `botCancel context.CancelFunc` to manage context cancellation. - Implemented global `StopBot()` function. - Updated `Tgbot.Stop()` to call `StopBot()`. - Modified `Tgbot.OnReceive()` to use the new cancellable context for `UpdatesViaLongPolling`. * Fix: Prevent race condition and goroutine leak in TgBot Addresses a critical race condition on the global `botCancel` variable, which could occur if `Tgbot.OnReceive()` was called concurrently (e.g., during rapid panel restarts or unexpected behavior). Changes in tgbot.go: - Added `tgBotMutex sync.Mutex` to ensure thread safety. - Protected `botCancel` creation and assignment in `OnReceive()` using the mutex, and added a check to prevent overwriting an active context, which avoids goroutine leaks. - Protected the cancellation and cleanup logic in `StopBot()` with the mutex. * Refactor: Replace time.Sleep with sync.WaitGroup for reliable TgBot shutdown Replaced the unreliable `time.Sleep(1 * time.Second)` in `service.StopBot()` with `sync.WaitGroup`. This ensures the Long Polling goroutine is explicitly waited for and reliably exits before the panel continues, preventing potential resource leaks and incomplete shutdowns during restarts. Changes: - Added `botWG sync.WaitGroup` variable. - Updated `service.StopBot()` to call `botWG.Wait()` instead of `time.Sleep()`. - Modified `Tgbot.OnReceive()` to correctly use `botWG.Add(1)` and `defer botWG.Done()` within the Long Polling goroutine. - Corrected the goroutine structure in `OnReceive()` to properly encapsulate all message handling logic.
2025-09-22fix: outbound address for vlessmhsanaei
2025-09-21TGbot: improved (5x faster)mhsanaei
2025-09-20docs: add comments for all functionsmhsanaei
2025-09-19Fix ineffassign “date”mhsanaei
2025-09-19go package correction v2mhsanaei
2025-09-19go package correctionmhsanaei
2025-09-18new: subJsonEnablemhsanaei
after this subEnable by default is true and subJsonEnable is false
2025-09-16tgbot: subscription, qrcode, link - for adminmhsanaei
2025-09-14tgbot: subscription,qrcode, linkmhsanaei
2025-09-09dokodemo-door, socks renamed to mixed, tunnelmhsanaei
2025-08-17feat: Add remaining time to tgbot #3355 (#3360)Alireza Ahmand
2025-08-17minor changesmhsanaei
2025-08-08upgrade telego (#3334)Alireza Ahmadi
2025-05-28feat: add command list in telegram bot (#3027)spatiumstas
2025-05-06Added 3 new buttons to telegram bot (#2965)nistootsin
* Add a new button to but : Reset All Clients * handel translation for `Reset All Clients` button * refactoring * add a new button to telegram bot >> `Sorted Traffic Usage Report` * - refactoring * add ip limit conifg on new client adding time
2025-04-16feat: add `Submit As Enable` in telegram botnistootsin
2025-04-07minor changesmhsanaei
2025-03-26Add Admin-Controlled Client Management to Telegram Bot (#2788)nistootsin
* Add feature to add clients to inbound: - Implement buttons for adding new clients - Handle client addition process (submission remains to be completed) - Support for multiple languages * update the go.mod * feat: complete submission process for adding a client to inbounds * - Add client variables: client_method, client_sh_password, client_tr_password - Exclude specific inbound protocols (HTTP, WireGuard, Socks, DOKODEMO) from addclient inline button * - customize the add client message and json for each protocol * - handle password input rather than id for shadow and trojan protocols * - remove add_client_as_enable button in bot * restructrure the add client bot feature * update all files in web/translation/ * Refactoring * - add traffic button to add client bot feature * - fix a mistake in the email prompt message * - add expire data button to add client telegram process. * Refactroring * remove refresh button in add client * - delete message after cancel * - uptimize the process of adding client by deleting main message on getting text inputs.
2025-03-12Refactor: Use any instead of interface{}mhsanaei
2025-03-09tgbot - restartmhsanaei
change restart force to restart
2024-10-17feat(tgbot): Add the option to change the telegram API server (#2584)MadrinX
2024-10-16feat(tgbot): Allow restart core via telegram bot (#2581)Ahmad Thoriq Najahi
2024-08-19New - TGbot, "All clients" button (#2493)Rizvan Nukhtarov
2024-07-09improved - message logsmhsanaei
2024-07-07Typo fixedmhsanaei
2024-07-03tgbot - login notify (show password for failed login)mhsanaei
2024-05-14feat(tgbot): Add refresh button to server usage (#2253)Ahmad Thoriq Najahi
- Added a refresh button to the server usage interface to allow users to refresh the displayed information. - Updated the sendReport function to use the sendServerUsage function instead of getServerUsage to ensure consistency in functionality. Signed-off-by: Ahmad Thoriq Najahi <najahi@zephyrus.id>
2024-04-29feat(tgbot): Add `xray-core` version into server status (#2236)Ahmad Thoriq Najahi
Signed-off-by: Ahmad Thoriq Najahi <najahi@zephyrus.id>
2024-04-02telego v0.29.2mhsanaei
2024-04-02tgbot - fix chatidmhsanaei
2024-03-21Small fixes (#2106)somebodywashere
2024-03-15Fixed unnecessary Xray restarts in Tgbotsomebodywashere
2024-03-11Some fixes and improvements (#1997)Hamidreza
* [refactor] api controller * [fix] access log path better to not hardcode the access log path, maybe some ppl dont want to use the default ./access.log * [fix] set select options from logs paths in xray settings * [update] .gitignore * [lint] all .go files * [update] use status code for jsonMsg and 401 to unauthorize * [update] handle response status code via axios * [fix] set correct value if log paths is set to 'none' we also use the default value for the paths if its set to none * [fix] iplimit - only warning access log if f2b is installed
2024-03-02Enhance CheckClientIpJob #1964MHSanaei
2024-02-17tgbot - Telegram api 7.1 changesMHSanaei
2024-02-04Fix tgbot - document upload issue for empty ban logsMHSanaei
2024-02-04fix tgbot - no warning for empty socks5MHSanaei
2024-01-29bug fix - traffic limit tbbotMHSanaei
2024-01-03socks5 proxy option added to telegram bot settings (#1500)Saeid
* socks5 option added to telegram bot settings * update socks5 proxy settings translations
2024-01-01Major changes to tgbot, also small changes for panel (#1463)somebodywashere
* Reduce outage time on Xray errors * Improved logs clearing, added previous logs File name change: 3xipl-access-persistent.log -> 3xipl-ap.log All previous logs have .prev suffix * Preparations for tgbot additions * [tgbot] Improvements, Additions and Fixes * Changed interaction with Expire Date for Clients * Added more info and interactions with Online Clients * Added a way to get Ban Logs (also added them to backup) * Few fixes and optimizations in code * Fixed RU translation * [tgbot] More updates and fixes * [tgbot] Quick Fix * [tgbot] Quick Fix 2 * [tgbot] Big Updates Added Notifications for Clients throught Tgbot (when Expire) Added compability for Usernames both w/wo @ Added more buttons overall for admins * [tgbot] Fixes * [tbot] Fixes 2 * [tgbot] Removed usernames support for Notifications to work * [tgbot] Fix * [tgbot] Fix Notify * [tgbot] small fixes * [tgbot] replyMarkup only for last message on big messages * [tgbot] Fixed last message is empty * [tgbot] Fix messages split
2023-12-08Update DB WAL before backup #1300Alireza Ahmadi
2023-11-20[bot] Some new features for telegram bot (#1241)Masoud Hidden
* [bot] Some new features for telegram bot +Ability to set traffic limit for client. +Custom input for reset expire days. +Custom input for reset IP limit. +Added refresh time to the client ip log message. * [bot] fix translations
2023-10-25fixed telegoMHSanaei
after github.com/mymmrac/telego from 0.26.3 to 0.27.0
2023-08-02v1.7.5v1.7.5MHSanaei
2023-06-17new - tg Login Notification #584MHSanaei