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-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. * .
2026-01-02fix: handle GitHub API error responses in GetXrayVersions (#3609)Zhenyu Qi
GitHub API returns JSON object instead of array when encountering errors (e.g., rate limit exceeded). This causes JSON unmarshal error: 'cannot unmarshal object into Go value of type []service.Release' Add HTTP status code check to handle error responses gracefully and return user-friendly error messages instead of JSON parsing errors. Fixes issue where getXrayVersion fails with unmarshal error when GitHub API rate limit is exceeded.
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-09Fix: Incorrect time in xray logs (#3587)fgsfds
* fixed timezone in xray logs * remove leading / at the address
2025-11-01Feature: add setting certs for subscription while generating for panel (#3578)Дмитрий Олегович Саенко
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-10-21gofmtmhsanaei
2025-10-14fix(import): prevent sqlite disk I/O error by validating temp DB then swappingmhsanaei
2025-10-01first try native CPU implementationmhsanaei
2025-09-28feat: add ldap component (#3568)konstpic
* add ldap component * fix: fix russian comments, tls cert verify default true * feat: remove replaces go mod for local dev
2025-09-23fix api : subid, uuid from inbound settingsmhsanaei
2025-09-22fix: outbound address for vlessmhsanaei
2025-09-21pageSize to 25mhsanaei
2025-09-21TGbot: improved (5x faster)mhsanaei
2025-09-21API: UUID for getClientTrafficsmhsanaei
2025-09-21security fix: Uncontrolled data used in path expressionmhsanaei
2025-09-21security fix: Uncontrolled data used in path expressionmhsanaei
2025-09-21security fix: Command built from user-controlled sources CWE-78mhsanaei
https://cwe.mitre.org/data/definitions/78.html https://owasp.org/www-community/attacks/Command_Injection
2025-09-20docs: add comments for all functionsmhsanaei
2025-09-19new: VACUUM databasemhsanaei
2025-09-19Fix ineffassign “date”mhsanaei
2025-09-19go package correction v2mhsanaei
2025-09-19v2.8.2v2.8.2mhsanaei
2025-09-19go package correctionmhsanaei
2025-09-18new: subJsonEnablemhsanaei
after this subEnable by default is true and subJsonEnable is false
2025-09-17feat: add UUID to ClientTraffic (#3491)RahGozar
* Update client_traffic.go * Update inbound.go
2025-09-17Improved xray logs display handling (#3475)fgsfds
* improved xray logs handling * fix download Xray Logs * Update index.html
2025-09-17API: subid to getClientTrafficsmhsanaei
/getClientTraffics/:email /getClientTrafficsById/:id
2025-09-17fix CPU History intervalsmhsanaei
2025-09-16bug fix: del Depletedmhsanaei
2025-09-16bug fix: enablemhsanaei
2025-09-16CPU History, CPU Utilizationmhsanaei
2025-09-16tgbot: subscription, qrcode, link - for adminmhsanaei
2025-09-16feat: Simple periodic traffic reset (for Inbounds) – daily | weekly | ↵Vadim Iskuchekov
monthly (#3407) * Add periodic traffic reset feature model and ui with localization support * Remove periodic traffic reset fields from client * fix: add periodicTrafficReset field to inbound data structure * feat: implement periodic traffic reset job and integrate with cron scheduler * feat: enhance periodic traffic reset functionality with scheduling and inbound filtering * refactor: rename periodicTrafficReset to trafficReset and add lastTrafficResetTime field * feat: add periodic client traffic reset job and schedule tasks * Update web/job/periodic_traffic_reset_job.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update web/job/periodic_client_traffic_reset_job.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update web/service/inbound.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * refactor: rename periodicTrafficReset to trafficReset and add lastTrafficResetTime * feat: add last traffic reset time display and update logic in inbound service * fix: correct log message for completed periodic traffic reset * refactor: update traffic reset fields in Inbound model and remove unused client traffic reset job * refactor: remove unused traffic reset logic and clean up client model fields * cleanup comments * fix
2025-09-14tgbot: subscription,qrcode, linkmhsanaei
2025-09-10Fixed: update Xray Core on Windowsmhsanaei
2025-09-10API: delClientByEmailmhsanaei
2025-09-10Xray Core v25.9.11mhsanaei
2025-09-10Remove the buggy version of Xray coremhsanaei
2025-09-09dokodemo-door, socks renamed to mixed, tunnelmhsanaei
2025-09-09api (#3434)Sanaei
2025-09-07Vlessenc (#3426)Sanaei
* mlkem768 * VlessEnc
2025-09-02fix: prevent client `updated_at` from resetting when parent inbound is updatedAli Golzar
2025-08-31feat: add "Last Online" column to client list and modal (Closes #3402) (#3405)Ali Golzar
* feat: persist client last online and expose API * feat(ui): show client last online in table and info modal * i18n: add “Last Online” across locales * chore: format timestamps as HH:mm:ss
2025-08-28removed: Allocatemhsanaei
2025-08-28Add all-time traffic for inbounds and clients (#3387)Ali Golzar
* feat(db): add allTime field to Inbound and ClientTraffic models * feat(inbound): increment all_time for inbounds and clients on traffic updates calculate correct all_time traffic on migrate command * feat(ui): show all-time traffic column for inbounds and its clients * i18n: add pages.inbounds.allTimeTraffic label across locales * Add All Time Traffic Usage in inbounds page top banner
2025-08-27Created / Updated fields for clients (#3384)Ali Golzar
* feat(backend): add created_at/updated_at to clients and maintain on create/update backfill existing clients and set updated_at on mutations * feat(frontend): carry created_at/updated_at in client models and round-trip via JSON * feat(frontend): display Created and Updated columns in client table with proper date formatting * i18n: add pages.inbounds.createdAt/updatedAt across all locales * Update inbound.go Remove duplicate code
2025-08-21more list for public IP addressmhsanaei
2025-08-17feat: Add remaining time to tgbot #3355 (#3360)Alireza Ahmand