mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-08-23 03:16:52 +00:00
![google-labs-jules[bot]](/assets/img/avatar_default.png)
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.
105 lines
4.6 KiB
Modula-2
105 lines
4.6 KiB
Modula-2
module x-ui
|
|
|
|
go 1.24.5
|
|
|
|
require (
|
|
github.com/gin-contrib/gzip v1.2.3
|
|
github.com/gin-contrib/sessions v1.0.4
|
|
github.com/gin-gonic/gin v1.10.1
|
|
github.com/goccy/go-json v0.10.5
|
|
github.com/google/uuid v1.6.0
|
|
github.com/joho/godotenv v1.5.1
|
|
github.com/mymmrac/telego v0.32.0
|
|
github.com/nicksnyder/go-i18n/v2 v2.6.0
|
|
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7
|
|
github.com/pelletier/go-toml/v2 v2.2.4
|
|
github.com/robfig/cron/v3 v3.0.1
|
|
github.com/shirou/gopsutil/v4 v4.25.6
|
|
github.com/stretchr/testify v1.10.0
|
|
github.com/valyala/fasthttp v1.63.0
|
|
github.com/xlzd/gotp v0.1.0
|
|
github.com/xtls/xray-core v1.250726.0
|
|
go.uber.org/atomic v1.11.0
|
|
golang.org/x/crypto v0.40.0
|
|
golang.org/x/text v0.27.0
|
|
google.golang.org/grpc v1.74.2
|
|
gorm.io/driver/sqlite v1.6.0
|
|
gorm.io/gorm v1.30.0
|
|
)
|
|
|
|
require (
|
|
github.com/andybalholm/brotli v1.2.0 // indirect
|
|
github.com/bytedance/sonic v1.13.3 // indirect
|
|
github.com/bytedance/sonic/loader v0.2.4 // indirect
|
|
github.com/cloudflare/circl v1.6.1 // indirect
|
|
github.com/cloudwego/base64x v0.1.5 // indirect
|
|
github.com/davecgh/go-spew v1.1.1 // indirect
|
|
github.com/dgryski/go-metro v0.0.0-20250106013310-edb8663e5e33 // indirect
|
|
github.com/ebitengine/purego v0.8.4 // indirect
|
|
github.com/fasthttp/router v1.5.4 // indirect
|
|
github.com/gabriel-vasile/mimetype v1.4.9 // indirect
|
|
github.com/gin-contrib/sse v1.1.0 // indirect
|
|
github.com/go-ole/go-ole v1.3.0 // indirect
|
|
github.com/go-playground/locales v0.14.1 // indirect
|
|
github.com/go-playground/universal-translator v0.18.1 // indirect
|
|
github.com/go-playground/validator/v10 v10.27.0 // indirect
|
|
github.com/google/btree v1.1.3 // indirect
|
|
github.com/gorilla/context v1.1.2 // indirect
|
|
github.com/gorilla/securecookie v1.1.2 // indirect
|
|
github.com/gorilla/sessions v1.4.0 // indirect
|
|
github.com/gorilla/websocket v1.5.3 // indirect
|
|
github.com/grbit/go-json v0.11.0 // indirect
|
|
github.com/jinzhu/inflection v1.0.0 // indirect
|
|
github.com/jinzhu/now v1.1.5 // indirect
|
|
github.com/json-iterator/go v1.1.12 // indirect
|
|
github.com/juju/ratelimit v1.0.2 // indirect
|
|
github.com/klauspost/compress v1.18.0 // indirect
|
|
github.com/klauspost/cpuid/v2 v2.2.11 // indirect
|
|
github.com/kr/text v0.2.0 // indirect
|
|
github.com/leodido/go-urn v1.4.0 // indirect
|
|
github.com/lufia/plan9stats v0.0.0-20250317134145-8bc96cf8fc35 // indirect
|
|
github.com/mattn/go-isatty v0.0.20 // indirect
|
|
github.com/mattn/go-sqlite3 v1.14.28 // indirect
|
|
github.com/miekg/dns v1.1.67 // indirect
|
|
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
|
github.com/modern-go/reflect2 v1.0.2 // indirect
|
|
github.com/pires/go-proxyproto v0.8.1 // indirect
|
|
github.com/pmezard/go-difflib v1.0.0 // indirect
|
|
github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect
|
|
github.com/quic-go/qpack v0.5.1 // indirect
|
|
github.com/quic-go/quic-go v0.54.0 // indirect
|
|
github.com/refraction-networking/utls v1.8.0 // indirect
|
|
github.com/riobard/go-bloom v0.0.0-20200614022211-cdc8013cb5b3 // indirect
|
|
github.com/rogpeppe/go-internal v1.14.1 // indirect
|
|
github.com/sagernet/sing v0.6.6 // indirect
|
|
github.com/sagernet/sing-shadowsocks v0.2.7 // indirect
|
|
github.com/savsgio/gotils v0.0.0-20250408102913-196191ec6287 // indirect
|
|
github.com/seiflotfy/cuckoofilter v0.0.0-20240715131351-a2f2c23f1771 // indirect
|
|
github.com/tklauser/go-sysconf v0.3.15 // indirect
|
|
github.com/tklauser/numcpus v0.10.0 // indirect
|
|
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
|
|
github.com/ugorji/go/codec v1.3.0 // indirect
|
|
github.com/v2fly/ss-bloomring v0.0.0-20210312155135-28617310f63e // indirect
|
|
github.com/valyala/bytebufferpool v1.0.0 // indirect
|
|
github.com/valyala/fastjson v1.6.4 // indirect
|
|
github.com/vishvananda/netlink v1.3.1 // indirect
|
|
github.com/vishvananda/netns v0.0.5 // indirect
|
|
github.com/xtls/reality v0.0.0-20250725142056-5b52a03d4fb7 // indirect
|
|
github.com/yusufpapurcu/wmi v1.2.4 // indirect
|
|
go.uber.org/mock v0.5.2 // indirect
|
|
go4.org/netipx v0.0.0-20231129151722-fdeea329fbba // indirect
|
|
golang.org/x/arch v0.19.0 // indirect
|
|
golang.org/x/mod v0.26.0 // indirect
|
|
golang.org/x/net v0.42.0 // indirect
|
|
golang.org/x/sync v0.16.0 // indirect
|
|
golang.org/x/sys v0.34.0 // indirect
|
|
golang.org/x/time v0.12.0 // indirect
|
|
golang.org/x/tools v0.35.0 // indirect
|
|
golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2 // indirect
|
|
golang.zx2c4.com/wireguard v0.0.0-20231211153847-12269c276173 // indirect
|
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20250721164621-a45f3dfb1074 // indirect
|
|
google.golang.org/protobuf v1.36.6 // indirect
|
|
gopkg.in/yaml.v3 v3.0.1 // indirect
|
|
gvisor.dev/gvisor v0.0.0-20250428193742-2d800c3129d5 // indirect
|
|
lukechampine.com/blake3 v1.4.1 // indirect
|
|
)
|