Commit graph

65 commits

Author SHA1 Message Date
Sanaei
d65233cc2c
Merge branch 'main' into feature/multi-server-support 2025-08-04 10:33:41 +02:00
mhsanaei
de5314c01f
fix: pqv for sub #3306 2025-08-04 10:24:21 +02:00
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
Alireza Ahmadi
487ec74e0b add mldsa65 2025-07-25 01:22:01 +02:00
Shishkevich D.
d54e7a9b14
fix: encoding subscription title in base64 2025-04-15 19:29:54 +07: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
9bc5c1d070
tcpNoDelay to penetrate 2025-01-01 18:42:50 +01:00
mhsanaei
4efcdb3e01
Transport: Remove HTTP
Migrated to XHTTP "stream-one" mode.
2024-12-04 13:49:43 +01:00
mhsanaei
b859327b8a
splithttp to xhttp 2024-12-03 22:24:34 +01:00
mhsanaei
9476472bf6
AsIs - freedom DS 2024-11-21 00:31:45 +03:30
mhsanaei
ccda652e69
SplitHTTP - Mode 2024-11-14 13:09:51 +03:30
mhsanaei
e359b5c75e
removed - XTLS Security
because its too old and no one use it anymore
2024-10-29 12:50:25 +01:00
mhsanaei
2950ce0c17
freedom - default settings 2024-10-17 10:36:05 +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
58c721e7d2 quic removed 2024-09-09 09:46:39 +02:00
Dmitry Zhavoronkov
4494ffabb6
fix TypeError: this.shortIds.split is not a function (#2507)
* fix TypeError: this.shortIds.split is not a function
2024-09-02 12:02:15 +02:00
mhsanaei
fa43248e30 New - Noise
freedom
2024-08-29 11:27:43 +02:00
Ilya
438a9684ee
Fix #2470 (The subscription service gives two ports for VLESS) (#2479)
* Fix #2470
2024-08-11 18:26:43 +02:00
mhsanaei
93d52bc86c new - vmess security (inbound client side - outbound) 2024-08-11 00:47:44 +02:00
mhsanaei
7417c52c8f fixed - sub show time when "Start After First Use" 2024-07-17 16:39:53 +02:00
mhsanaei
f1500a5d31 improved - message logs 2024-07-08 23:47:49 +02:00
mhsanaei
39aae6fd16 sub - add hour for time left
1D,10H
22M
2024-07-01 19:11:40 +02:00
mhsanaei
5d007435ab some changes
undo secret key gen for wireguard
2024-06-18 14:37:44 +02:00
mhsanaei
7f2c11220f new - splithttp transport
splithttp inbound
splithttp outbound
change priority host for ws - httpupgrade (host>>headers)
2024-06-18 12:49:20 +02:00
mhsanaei
fdf805f264 minor changes 2024-05-28 16:28:20 +02:00
Ahmad Thoriq Najahi
d070a82b3d
feat: Enhance host extraction from headers (#2292)
- Refactor SUBController subs and subJsons methods to extract host from X-Forwarded-Host header, falling back to X-Real-IP header and then to the request host if unavailable.
- Update html function to extract host from X-Forwarded-Host header, falling back to X-Real-IP header and then to the request host if unavailable.
- Update DomainValidatorMiddleware to first attempt to extract host from X-Forwarded-Host header, falling back to X-Real-IP header and then to the request host.

Fixes: #2284

Signed-off-by: Ahmad Thoriq Najahi <najahi@zephyrus.id>
2024-05-23 23:51:19 +02:00
mhsanaei
275370e32c new - (Sockopt) tcpMptcp , tcpNoDelay
https://xtls.github.io/en/config/transport.html#sockoptobject
2024-05-22 20:06:49 +02:00
mhsanaei
e7c59adc59 Ensure IPv6 compliant host
Co-Authored-By: vnxme <46669194+vnxme@users.noreply.github.com>
2024-05-22 20:06:49 +02:00
mhsanaei
c147636133 add header for httpupgrade 2024-04-02 23:41:06 +03:30
mhsanaei
4e20bb5f02 Add host for WS 2024-04-01 17:02:02 +04:30
mhsanaei
866f7bd042 [subjson] avoid array for one config
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
2024-04-01 12:22:10 +04:30
mhsanaei
21d988133e [sub] fix grpc authority failure
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
2024-04-01 12:09:45 +04:30
somebodywashere
43ec88bb24
Small fixes (#2106) 2024-03-21 10:21:12 +03:30
Tara Rostami
0bec29f2ba
UI Improvements (#2067) 2024-03-20 14:13:37 +03:30
MHSanaei
8b5fe0b018 [subJson] add mux and direct
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
2024-03-12 19:44:51 +03:30
MHSanaei
5b87b12535 [sub] JSON sub enhancement + minor changes
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
2024-03-11 18:40:11 +03:30
MHSanaei
3af55cc5b4 [sub] random reality params
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
2024-03-11 13:52:06 +03:30
MHSanaei
01cd7539f9 New - gRPC Authority 2024-03-11 13:00:00 +03:30
MHSanaei
7f0fc1b8ef run sub on http if https failed
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
2024-03-11 11:37:16 +03:30
MHSanaei
d18eb7e4e4 New - HttpUpgrade Transport 2024-03-11 11:27:43 +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
9b026572cf close modal only after success msg
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
2024-02-27 16:01:20 +03:30
MHSanaei
e705ae8e48 minor changes 2024-02-25 02:08:14 +03:30
MHSanaei
03b7a34793 [sub] json + fragment
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
2024-02-21 14:17:52 +03:30
Ali Rahimi
c76199514a
added Jalalian datepicker (shamsi) (#1460)
* added datepicker option in setting page
jalalian datepicker component was added
translate files for datepicker updated

* dark mode bug fixed
2024-01-02 12:02:21 +03:30
MHSanaei
af54b34f3a v2.0.0 2023-12-11 15:15:06 +01:00
Alireza Ahmadi
c980a06969 customizable remark #1300 2023-12-08 20:31:17 +01:00
Alireza Ahmadi
5fbf8f0d53 Expand multiDomain to externalProxy #1300 2023-12-08 18:45:21 +01:00