mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #3269] [CLOSED] feat: Add multi-server support #5379
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#5379
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/MHSanaei/3x-ui/pull/3269
Author: @javadtgh
Created: 7/24/2025
Status: ❌ Closed
Base:
main← Head:feature/multi-server-support📝 Commits (10+)
11dc068feat: Add multi-server support for Sanai paneld65233cMerge branch 'main' into feature/multi-server-supportae82373Merge branch 'main' into feature/multi-server-support3299d15Merge branch 'main' into feature/multi-server-supporta3ccccfMerge branch 'main' into feature/multi-server-support747af37Merge branch 'main' into feature/multi-server-support5e953baMerge branch 'main' into feature/multi-server-supportedd8b12Merge branch 'main' into feature/multi-server-support4c7249cMerge branch 'main' into feature/multi-server-support3b262cfMerge branch 'main' into feature/multi-server-support📊 Changes
17 files changed (+624 additions, -29 deletions)
View changed files
📝
database/db.go(+1 -0)📝
database/model/model.go(+9 -0)📝
go.mod(+1 -0)📝
install.sh(+7 -0)📝
main.go(+14 -2)📝
sub/subService.go(+48 -27)📝
web/controller/inbound.go(+1 -0)➕
web/controller/multi_server_controller.go(+89 -0)📝
web/controller/xui.go(+5 -0)📝
web/html/component/aSidebar.html(+5 -0)➕
web/html/servers.html(+165 -0)➕
web/middleware/auth.go(+34 -0)📝
web/service/inbound.go(+58 -0)➕
web/service/inbound_service_sync_test.go(+72 -0)➕
web/service/multi_server_service.go(+37 -0)➕
web/service/multi_server_service_test.go(+63 -0)📝
web/service/setting.go(+15 -0)📄 Description
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:
serverstable to store information about slave servers.MultiServerServiceandMultiServerController) for CRUD operations on servers.InboundServiceto synchronize client additions, updates, and deletions across all active slave servers via a REST API.install.shscript to generate a random API key during installation.Known Issues:
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.What is the pull request?
Which part of the application is affected by the change?
Type of Changes
Screenshots
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.