Дмитрий Саенко
e21080f843
Merge branch 'main' of https://github.com/dimasmir03/3x-ui into feature/multi-server-support
2025-11-01 16:08:12 +03:00
Дмитрий Саенко
2f0fe071cf
Merge branch 'main' of https://github.com/dimasmir03/3x-ui into feature/multi-server-support
2025-11-01 16:06:58 +03:00
Дмитрий Олегович Саенко
4a75bd0a48
Feature: add setting certs for subscription while generating for panel ( #3578 )
Release 3X-UI / build (386) (push) Waiting to run
Release 3X-UI / build (amd64) (push) Waiting to run
Release 3X-UI / build (arm64) (push) Waiting to run
Release 3X-UI / build (armv5) (push) Waiting to run
Release 3X-UI / build (armv6) (push) Waiting to run
Release 3X-UI / build (armv7) (push) Waiting to run
Release 3X-UI / build (s390x) (push) Waiting to run
Release 3X-UI / Build for Windows (push) Waiting to run
2025-11-01 13:10:27 +01:00
OleksandrParshyn
020cd63e22
Fix: Graceful Telegram bot shutdown to prevent 409 Conflict ( #3580 )
...
* 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-11-01 13:01:44 +01:00
Дмитрий Саенко
34e244951e
revert trash
2025-10-31 21:56:02 +03:00
Дмитрий Саенко
2ac59a6c46
fix
2025-10-31 21:29:38 +03:00
Дмитрий Саенко
b2efeec70f
feat sync btn
2025-10-29 22:17:26 +03:00
Дмитрий Саенко
599686ea34
fix path endpoint
2025-10-26 23:03:46 +03:00
Дмитрий Саенко
0649a15c89
feature: setting certs for subscription whule generating
2025-10-26 15:43:34 +03:00
Дмитрий Саенко
d7d129ced5
fix path for endpoint
2025-10-26 14:49:53 +03:00
Дмитрий Саенко
4dbd9536ec
fix type www-form-urlencoded -> x-www-form-urlencoded
2025-10-26 14:19:58 +03:00
Дмитрий Саенко
1503e5cf37
clear
2025-10-25 14:38:44 +03:00
Дмитрий Саенко
62825dc188
add in err log msg
2025-10-25 14:35:06 +03:00
Дмитрий Саенко
d3865bf4d1
try fix err with nil in body
2025-10-25 14:23:46 +03:00
Дмитрий Саенко
1f3a7c947a
add debug log
2025-10-23 19:55:35 +03:00
Дмитрий Саенко
f8c2e90e44
fix any
2025-10-23 18:21:22 +03:00
Дмитрий Саенко
95a06100af
fix path with / /
2025-10-23 18:08:52 +03:00
Дмитрий Саенко
5ea900ff48
add debug log
2025-10-23 18:00:37 +03:00
Дмитрий Саенко
f13165feea
try fix err
2025-10-23 17:24:46 +03:00
Дмитрий Саенко
8fcb8c549a
fix convert model.Inbound to form
2025-10-23 16:23:26 +03:00
Дмитрий Саенко
430b0f07cd
fix
2025-10-23 15:50:29 +03:00
Дмитрий Саенко
9d0f2c953f
feature: получение онлайна с каждого сервера
2025-10-22 22:09:55 +03:00
Дмитрий Саенко
971513464e
исправил работу с SecretWebPath
2025-10-22 14:21:22 +03:00
Дмитрий Саенко
20efe2258c
добавил синхронизацию и изменил функцию синхронизации
2025-10-22 13:41:20 +03:00
Дмитрий Саенко
773e770cee
asd
2025-10-22 12:36:55 +03:00
mhsanaei
713a7328f6
gofmt
Release 3X-UI / build (386) (push) Has been cancelled
Release 3X-UI / build (amd64) (push) Has been cancelled
Release 3X-UI / build (arm64) (push) Has been cancelled
Release 3X-UI / build (armv5) (push) Has been cancelled
Release 3X-UI / build (armv6) (push) Has been cancelled
Release 3X-UI / build (armv7) (push) Has been cancelled
Release 3X-UI / build (s390x) (push) Has been cancelled
Release 3X-UI / Build for Windows (push) Has been cancelled
2025-10-21 13:02:55 +02:00
mhsanaei
d8523bbdac
fix(import): prevent sqlite disk I/O error by validating temp DB then swapping
Release 3X-UI / build (386) (push) Waiting to run
Release 3X-UI / build (amd64) (push) Waiting to run
Release 3X-UI / build (arm64) (push) Waiting to run
Release 3X-UI / build (armv5) (push) Waiting to run
Release 3X-UI / build (armv6) (push) Waiting to run
Release 3X-UI / build (armv7) (push) Waiting to run
Release 3X-UI / build (s390x) (push) Waiting to run
Release 3X-UI / Build for Windows (push) Waiting to run
2025-10-14 22:03:17 +02:00
mhsanaei
e7cfee570b
first try native CPU implementation
2025-10-01 20:13:32 +02:00
konstpic
28a17a80ec
feat: add ldap component ( #3568 )
...
Release 3X-UI / build (386) (push) Waiting to run
Release 3X-UI / build (amd64) (push) Waiting to run
Release 3X-UI / build (arm64) (push) Waiting to run
Release 3X-UI / build (armv5) (push) Waiting to run
Release 3X-UI / build (armv6) (push) Waiting to run
Release 3X-UI / build (armv7) (push) Waiting to run
Release 3X-UI / build (s390x) (push) Waiting to run
Release 3X-UI / Build for Windows (push) Waiting to run
* add ldap component
* fix: fix russian comments, tls cert verify default true
* feat: remove replaces go mod for local dev
2025-09-28 21:04:54 +02:00
Дмитрий Саенко
50cfc9bd7a
fix any errors
2025-09-25 16:37:50 +03:00
Sanaei
3b262cf180
Merge branch 'main' into feature/multi-server-support
2025-09-24 21:27:55 +02:00
mhsanaei
26c6438ec2
fix api : subid, uuid from inbound settings
Release 3X-UI / build (386) (push) Waiting to run
Release 3X-UI / build (amd64) (push) Waiting to run
Release 3X-UI / build (arm64) (push) Waiting to run
Release 3X-UI / build (armv5) (push) Waiting to run
Release 3X-UI / build (armv6) (push) Waiting to run
Release 3X-UI / build (armv7) (push) Waiting to run
Release 3X-UI / build (s390x) (push) Waiting to run
Release 3X-UI / Build for Windows (push) Waiting to run
2025-09-23 11:52:40 +02:00
mhsanaei
1016f3b4f9
fix: outbound address for vless
Release 3X-UI / build (386) (push) Waiting to run
Release 3X-UI / build (amd64) (push) Waiting to run
Release 3X-UI / build (arm64) (push) Waiting to run
Release 3X-UI / build (armv5) (push) Waiting to run
Release 3X-UI / build (armv6) (push) Waiting to run
Release 3X-UI / build (armv7) (push) Waiting to run
Release 3X-UI / build (s390x) (push) Waiting to run
Release 3X-UI / Build for Windows (push) Waiting to run
2025-09-22 00:20:05 +02:00
Sanaei
4c7249c451
Merge branch 'main' into feature/multi-server-support
2025-09-21 23:55:26 +02:00
mhsanaei
d518979e4f
pageSize to 25
2025-09-21 20:47:34 +02:00
mhsanaei
83f8a03b50
TGbot: improved (5x faster)
Release 3X-UI / build (386) (push) Waiting to run
Release 3X-UI / build (amd64) (push) Waiting to run
Release 3X-UI / build (arm64) (push) Waiting to run
Release 3X-UI / build (armv5) (push) Waiting to run
Release 3X-UI / build (armv6) (push) Waiting to run
Release 3X-UI / build (armv7) (push) Waiting to run
Release 3X-UI / build (s390x) (push) Waiting to run
Release 3X-UI / Build for Windows (push) Waiting to run
2025-09-21 19:27:05 +02:00
mhsanaei
b45e63a14a
API: UUID for getClientTraffics
2025-09-21 19:16:54 +02:00
mhsanaei
55f1d72af5
security fix: Uncontrolled data used in path expression
2025-09-21 18:51:54 +02:00
mhsanaei
e64e6327ef
security fix: Uncontrolled data used in path expression
2025-09-21 17:52:18 +02:00
mhsanaei
eacfbc86b5
security fix: Command built from user-controlled sources CWE-78
...
https://cwe.mitre.org/data/definitions/78.html
https://owasp.org/www-community/attacks/Command_Injection
2025-09-21 17:39:30 +02:00
mhsanaei
6ced549dea
docs: add comments for all functions
2025-09-20 09:35:50 +02:00
mhsanaei
f60682a6b7
new: VACUUM database
Release 3X-UI / build (386) (push) Waiting to run
Release 3X-UI / build (amd64) (push) Waiting to run
Release 3X-UI / build (arm64) (push) Waiting to run
Release 3X-UI / build (armv5) (push) Waiting to run
Release 3X-UI / build (armv6) (push) Waiting to run
Release 3X-UI / build (armv7) (push) Waiting to run
Release 3X-UI / build (s390x) (push) Waiting to run
Release 3X-UI / Build for Windows (push) Waiting to run
2025-09-19 17:14:39 +02:00
Sanaei
edd8b12988
Merge branch 'main' into feature/multi-server-support
2025-09-19 13:24:09 +02:00
mhsanaei
151f1173a1
Fix ineffassign “date”
2025-09-19 10:46:49 +02:00
mhsanaei
7447cec17e
go package correction v2
Release 3X-UI / build (386) (push) Waiting to run
Release 3X-UI / build (amd64) (push) Waiting to run
Release 3X-UI / build (arm64) (push) Waiting to run
Release 3X-UI / build (armv5) (push) Waiting to run
Release 3X-UI / build (armv6) (push) Waiting to run
Release 3X-UI / build (armv7) (push) Waiting to run
Release 3X-UI / build (s390x) (push) Waiting to run
Release 3X-UI / Build for Windows (push) Waiting to run
2025-09-19 10:05:43 +02:00
mhsanaei
0ffd27c0aa
v2.8.2
Release 3X-UI / build (386) (push) Waiting to run
Release 3X-UI / build (amd64) (push) Waiting to run
Release 3X-UI / build (arm64) (push) Waiting to run
Release 3X-UI / build (armv5) (push) Waiting to run
Release 3X-UI / build (armv6) (push) Waiting to run
Release 3X-UI / build (armv7) (push) Waiting to run
Release 3X-UI / build (s390x) (push) Waiting to run
Release 3X-UI / Build for Windows (push) Waiting to run
2025-09-19 00:22:15 +02:00
mhsanaei
054cb1dea0
go package correction
2025-09-18 23:12:14 +02:00
mhsanaei
59ea2645db
new: subJsonEnable
...
after this subEnable by default is true
and subJsonEnable is false
2025-09-18 13:56:04 +02:00
RahGozar
fcdeb1fc79
feat: add UUID to ClientTraffic ( #3491 )
...
* Update client_traffic.go
* Update inbound.go
2025-09-17 17:45:28 +02:00
fgsfds
2eb8abf61e
Improved xray logs display handling ( #3475 )
...
* improved xray logs handling
* fix download Xray Logs
* Update index.html
2025-09-17 13:19:55 +02:00