Commit graph

250 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
Mikhail Grigorev
0ad708b1b6
Added list of services for get public IP address (IP v4 and v6) (#3216)
* Fixed get public IP address

* Remove https://ifconfig.io/ip and https://ipinfo.tw/ip

---------

Co-authored-by: Mikhail Grigorev <grigorev_mm@magnit.ru>
2025-07-27 17:24:11 +02:00
Alireza Ahmadi
487ec74e0b add mldsa65 2025-07-25 01:22:01 +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
mhsanaei
bbdeb65291
new alternative to get public IP address 2025-07-06 20:45:58 +02:00
Shishkevich D.
5d11e6e13f
chore: reset two-factor authentication after changing admin credentials (#3029)
* chore: add `resetTwoFactor` argument for main.go

fixes #3025

* chore: reset two-factor authentication after changing admin credentials

* chore: reset two-factor authentication after changing admin credentials

---------

Co-authored-by: somebodywashere <68244480+somebodywashere@users.noreply.github.com>
Co-authored-by: Sanaei <ho3ein.sanaei@gmail.com>
2025-07-02 11:25:25 +02:00
Shishkevich D.
dff4ad31ff
chore: up minimal xray-core version to v25.6.8 2025-06-16 12:22:56 +07:00
rammiah
d1e07954c5
feat: support metrics config 2025-06-11 18:42:41 +08:00
spatiumstas
29f950046a
feat: add command list in telegram bot (#3027)
Some checks failed
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
2025-05-28 15:26:29 +07:00
Columbiysky
3666d1193f
fix: Restore from .db file fails (#2988)
Some checks failed
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
* fix: issue 2953. Restore from .db file fails because

* Update server.go
2025-05-14 17:35:53 +02:00
Shishkevich D.
fe3b1c9b52
chore: implement 2fa auth (#2968)
Some checks failed
Build and Release 3X-UI / build (386) (push) Has been cancelled
Build and Release 3X-UI / build (amd64) (push) Has been cancelled
Build and Release 3X-UI / build (arm64) (push) Has been cancelled
Build and Release 3X-UI / build (armv5) (push) Has been cancelled
Build and Release 3X-UI / build (armv6) (push) Has been cancelled
Build and Release 3X-UI / build (armv7) (push) Has been cancelled
Build and Release 3X-UI / build (s390x) (push) Has been cancelled
* chore: implement 2fa auth

from #2786

* chore: format code

* chore: replace two factor token input with qr-code

* chore: requesting confirmation of setting/removing two-factor authentication

otpauth library was taken from cdnjs

* chore: revert changes in `ClipboardManager`

don't need it.

* chore: removing twoFactor prop in settings page

* chore: remove `twoFactorQr` object in `mounted` function
2025-05-08 16:20:58 +02:00
nistootsin
d39ccf4b8f
Added 3 new buttons to telegram bot (#2965)
Some checks failed
Build and Release 3X-UI / build (386) (push) Has been cancelled
Build and Release 3X-UI / build (amd64) (push) Has been cancelled
Build and Release 3X-UI / build (arm64) (push) Has been cancelled
Build and Release 3X-UI / build (armv5) (push) Has been cancelled
Build and Release 3X-UI / build (armv6) (push) Has been cancelled
Build and Release 3X-UI / build (armv7) (push) Has been cancelled
Build and Release 3X-UI / build (s390x) (push) Has been cancelled
* 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-05-06 18:27:17 +02:00
Shishkevich D.
1aed2d8cdc
feat: implement geofiles update in panel (#2971)
solves #2672

Co-authored-by: Sanaei <ho3ein.sanaei@gmail.com>
2025-05-06 18:10:58 +02:00
Columbiysky
85cbad3ef4
feat: hashing user passwords
solves problems #2944, #2783
2025-05-03 16:27:53 +07:00
nistootsin
be8d55dadb
feat: add Submit As Enable in telegram bot 2025-04-16 15:16:55 +07:00
mhsanaei
3ded4ee658
minor changes 2025-04-07 00:45:52 +02:00
nistootsin
728166bd1a
Add Admin-Controlled Client Management to Telegram Bot (#2788)
* 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-26 19:16:35 +01:00
Ilya Afanasov
d30cdbf49a
feat: custom subscription title in panel (#2773)
* feat: custom subscription title in panel

* feat: added translations
2025-03-15 08:16:59 +01:00
mhsanaei
0bde51b91e
Refactor: Use any instead of interface{} 2025-03-12 20:43:43 +01:00
mhsanaei
280a22b57d
warp - optimize utility code 2025-03-12 19:27:19 +01:00
mhsanaei
315d852087
fix - public IP #2763 2025-03-12 19:20:13 +01:00
mhsanaei
a0dd101d97
tgbot - restart
change restart force to restart
2025-03-08 23:08:04 +01:00
mhsanaei
0f97eca314
Xray core v25.3.3 2025-03-04 09:54:10 +01:00
mhsanaei
ea19fb8ff6
fix mistake 2025-03-01 10:19:52 +01:00
mhsanaei
4def70a006
Xray core buggy version removed 2025-02-27 13:40:56 +01:00
mhsanaei
664bd9b596
bug fix #2660 2025-02-22 14:31:08 +01:00
AAA
1bbf31df9f
feat(externalTrafficJob): External Traffic Inform (#2660)
* Add Setting entity + GUI field in panel settings

* Add a missing 'Traffic' in InformEnabale field

* Add ExternalTrafficURL Post request call

* Add translation + cleanup

* Move options to General tab

---------

Co-authored-by: root <root@vm3562019.stark-industries.solutions>
Co-authored-by: root <root@vm3688062.stark-industries.solutions>
2025-02-22 10:45:14 +01: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
mhsanaei
51220917c4
outbound Traffic - default false
if you need it you need to change it manually to true
2025-01-26 11:22:42 +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
783f1a073e
time Location - local 2025-01-11 15:13:49 +01:00
mhsanaei
26a7700557
Xray core buggy version removed
v1.8.24 and
major >=25.1.1
2025-01-01 18:36:46 +01:00
mhsanaei
049177024b
Xray core buggy version removed
accept >= v24.11.30 or v1.8.24
2024-12-05 20:17:47 +01:00
mhsanaei
4e0aca16c2
[warp] report error in change license
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
2024-12-03 23:01:32 +01:00
mhsanaei
9476472bf6
AsIs - freedom DS 2024-11-21 00:31:45 +03:30
Alireza Ahmadi
2ce9c3cc81
fix core restart on client change (#2603) 2024-11-16 17:05:23 +03:30
mhsanaei
6e59aa14b0
Xray core buggy version removed
accept >= v24.11.11 or v1.8.24
2024-11-12 12:13:10 +03:30
mhsanaei
5ae587ee81
bash - set or reset listenIP
we need this if we want to add SSH port forwarding
2024-10-30 16:35:36 +01:00
mhsanaei
0e3691fdbd
Xray core buggy version removed
only v24.10.16 or newer and v1.8.24
2024-10-29 14:56:30 +01:00
MadrinX
f1f813269c
feat(tgbot): Add the option to change the telegram API server (#2584) 2024-10-17 10:59:42 +02:00
mhsanaei
2950ce0c17
freedom - default settings 2024-10-17 10:36:05 +02:00
Ahmad Thoriq Najahi
2ef5ccc2fd
feat(tgbot): Allow restart core via telegram bot (#2581) 2024-10-16 14:39:25 +02:00
MHSanaei
1c2b6095c9
fix core restart on traffic reset of disabled client
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
2024-10-15 20:54:23 +02:00
Alireza Ahmadi
1454c4ebc5 [bug] fix restarting core on disabling depleted user 2024-10-10 17:37:06 +02:00
Alireza Ahmadi
4b1c76e972 [refactor] email verification method 2024-10-10 17:32:50 +02:00
mhsanaei
4f2f855c04
validate Email - non-English Pattern 2024-10-09 10:49:05 +02:00
mhsanaei
4fdef3cfde
add or remove noise 2024-09-24 11:38:10 +02:00
mhsanaei
6b0c9a5fad
update noise to noises
+ type
2024-09-17 09:51:57 +02:00
mhsanaei
566cd9e9c4 New - Allocate 2024-09-16 11:41:21 +02:00
mhsanaei
3e7c7831bc Email Validation - new pattern
@ included
2024-09-12 10:07:53 +02:00