Commit graph

38 commits

Author SHA1 Message Date
google-labs-jules[bot]
11dc06863e feat: Add multi-server support for Sanai panel
This commit introduces a multi-server architecture to the Sanai panel, allowing you to manage clients across multiple servers from a central panel.

Key changes include:

- **Database Schema:** Added a `servers` table to store information about slave servers.
- **Server Management:** Implemented a new service and controller (`MultiServerService` and `MultiServerController`) for CRUD operations on servers.
- **Web UI:** Created a new web page for managing servers, accessible from the sidebar.
- **Client Synchronization:** Modified the `InboundService` to synchronize client additions, updates, and deletions across all active slave servers via a REST API.
- **API Security:** Added an API key authentication middleware to secure the communication between the master and slave panels.
- **Multi-Server Subscriptions:** Updated the subscription service to generate links that include configurations for all active servers.
- **Installation Script:** Modified the `install.sh` script to generate a random API key during installation.

**Known Issues:**

- The integration test for client synchronization (`TestInboundServiceSync`) is currently failing. It seems that the API request to the mock slave server is not being sent correctly or the API key is not being included in the request header. Further investigation is needed to resolve this issue.
2025-07-27 17:25:58 +02:00
Azavax
b1ab156e42
Endpoint for updating client traffic by email (#3259)
* Update api.go

* Update inbound.go

* Update inbound.go
2025-07-22 23:43:48 +02:00
Shishkevich D.
c988d55256
fix: handle inbounds interaction errors (#3009)
eliminates messages like: “Inbound created successfully (Port 100 is already busy)”.
2025-05-16 23:56:56 +07:00
Shishkevich D.
1ddfe4aba3
chore: toasts translation refactoring
Some checks are pending
Build and Release 3X-UI / build (386) (push) Waiting to run
Build and Release 3X-UI / build (amd64) (push) Waiting to run
Build and Release 3X-UI / build (arm64) (push) Waiting to run
Build and Release 3X-UI / build (armv5) (push) Waiting to run
Build and Release 3X-UI / build (armv6) (push) Waiting to run
Build and Release 3X-UI / build (armv7) (push) Waiting to run
Build and Release 3X-UI / build (s390x) (push) Waiting to run
2025-05-09 10:46:29 +07:00
Sanaei
d18a1a37ce
revert group management (#2656)
* Revert "json post base path bug fixed (#2647)"

This reverts commit 04cf250a54.

* Revert "Group Management of Subscription Clients"

* Revert "fix getSubGroupClients for enable/disable and edit clients."

* Revert "Enhance database initialization in db.go (#2645)"

This reverts commit 66fe84181b.

* Revert "Add checkpoint handling in CloseDB function (#2646)"

This reverts commit 4dd40f6f19.

* Revert "Improved database model migration and added indexing (#2655)"

This reverts commit b922d986d6.
2025-02-04 11:27:58 +01:00
Ali Rahimi
6e9180a665
Group Management of Subscription Clients (#2644)
* add group user with the same subscription id to all inbounds

* code format compare

* add await for reset client traffic

* en language changed

* added client traffic syncer job

* handle exist email duplicate in sub group

* multi reset and delete request for clients group

* add client traffic syncer setting option

* vi translate file updated

* auto open qr-modal bug fixed
2025-01-21 03:01:54 +01:00
mhsanaei
c7906e8598 API - Get client's traffic By ID
Co-Authored-By: Hassan Ali Gilani <mr.ajaxian@gmail.com>
2024-07-23 11:28:28 +02:00
mhsanaei
7a51d2f2cc Typo fixed 2024-07-07 12:10:24 +02:00
MHSanaei
6c73791cab [xray] add BurstObservatory + minor changes
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
2024-03-11 11:46:54 +03:30
Hamidreza
64a5a9f1bc
Some fixes and improvements (#1997)
* [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-11 01:01:24 +03:30
MHSanaei
c31882cb92 bug fix #1595 2024-02-21 22:20:51 +03:30
MHSanaei
9fba92d879 v2.1.2
revert #1650 #1661 #1664 #1670
made panel full of bug
2024-01-27 00:32:19 +03:30
Ali Rahimi
538fc9b365
add single client bug fixed (#1664) 2024-01-23 13:30:21 +03:30
Ali Rahimi
b172d450e3 Group editing feature of users with the same subscription (#1661) 2024-01-22 15:08:36 +03:30
Ali Rahimi
5c695ca652
add group user with the same subscription id to all inbounds (#1650) 2024-01-21 17:56:19 +03:30
Amin
62f08e877d
Fix inbounds with the same port and different IPs (#1595) 2024-01-17 16:21:28 +03:30
Alireza Ahmadi
35feef650f import-export inbound #1300 2023-12-08 20:08:44 +01:00
Alireza Ahmadi
f734c821d6 online users backend #1286 2023-12-04 19:13:21 +01:00
MHSanaei
be4a68bd8b move restart cron to web.go
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
2023-09-06 18:22:37 +03:30
MHSanaei
1f78842b70 [feature] using xray API for inbound
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
2023-07-18 02:40:22 +03:30
Hamidreza
1028319386
🚀 Some improvements for x-ui.sh and ip job (#665) 2023-07-01 15:56:43 +03:30
MHSanaei
d40e61fc45 fix and improve 2023-06-14 19:50:19 +03:30
MHSanaei
70f250dfe1 [feature] using xray api and more
Improve DB performance
[api] backward compatibility: add client by update

Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
2023-06-05 00:32:19 +03:30
Hamidreza Ghavami
8170b65db4
add an option for webDomain 2023-05-31 01:21:14 +04:30
MHSanaei
1fa9101b40 [feature] add multi domain tls (CDN ready)
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
2023-05-22 17:31:41 +03:30
Hamidreza Ghavami
d9b1b200ce
rename I18n to I18nWeb 2023-05-21 03:29:27 +04:30
Hamidreza Ghavami
9b7cddbec7
update to use WebI18n func 2023-05-20 19:51:45 +04:30
Hamidreza Ghavami
481d4beabb update translation 2023-05-04 22:22:54 +04:30
MHSanaei
379451135d [feature] delete depleted clients
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
2023-04-25 18:43:37 +03:30
MHSanaei
cc3ff61ae2 update by client id
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
2023-04-25 14:38:35 +03:30
MHSanaei
16e3107d23 Better client delete + api
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
2023-04-24 15:07:11 +03:30
MHSanaei
f817f922fe add getClientTraffics api
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
2023-04-21 19:06:59 +03:30
MHSanaei
3e0faecaae improve reality setting
split xtls from tls - remove iran warp - remove old setting reality from franzkafka (it was a messy code) -and other improvement

Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
2023-04-18 21:34:06 +03:30
MHSanaei
e1da43053d alireza update pack
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
2023-04-09 23:13:18 +03:30
MHSanaei
96786c9418 alireza 2023-03-17 19:37:49 +03:30
MHSanaei
5317df21f3 ip limit + export links 2023-02-28 23:24:29 +03:30
MHSanaei
b412df70f1 update pack 2 2023-02-18 16:07:32 +03:30
MHSanaei
b73e4173a3 3x-ui 2023-02-09 22:48:06 +03:30