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-03-18feat(tgbot): send connection links and qrs on client creation (closes ↵Abdalrahman
#3320)\n\n- Refactored inline keyboards into getCommonClientButtons to respect DRY\n- Extended SubmitAddClient callback handlers to dispatch individual links and QR codes to the bot chat on success. (#3888)
2026-03-04update dependenciesMHSanaei
2026-03-04Fix: escape HTML characters in tgbot start command (#3883)Aleksei Sidorenko
2026-02-15Improve telego client robustness and retriesMHSanaei
Add a createRobustFastHTTPClient helper to configure fasthttp.Client with better timeouts, connection limits, retries and optional SOCKS5 proxy dialing. Validate and sanitize proxy and API server URLs instead of returning early on invalid values, and build telego.Bot options dynamically. Reduce long-polling timeout to detect connection issues faster and adjust update retrieval comments. Implement exponential-backoff retry logic for SendMessage calls to handle transient connection/timeouts and improve delivery reliability; also reduce inter-message delay for better throughput.
2026-02-15Add timeouts and delays to backup sendsMHSanaei
Add rate-limit friendly delays and context timeouts when sending backups via Telegram. Iterate admin IDs with index to sleep 1s between sends; add 30s context.WithTimeout for each SendDocument call and defer file.Close() for opened files; insert a 500ms pause between sending DB and config files. These changes improve resource cleanup and reduce chance of Telegram rate-limit/timeout failures.
2026-02-12bug fix #3785MHSanaei
2026-02-03Add workflow to clean old GitHub Actions cachesMHSanaei
Adds a scheduled GitHub Actions workflow (.github/workflows/cleanup_caches.yml) that runs weekly (and via workflow_dispatch) to delete Actions caches not accessed in the last 3 days. The job uses the gh CLI with the repository token and actions: write permission to list caches, filter by last_accessed_at against a 3-day cutoff, and delete matching cache IDs.
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