Sign inSign up

zhengxiongzhao/s-ui

By zhengxiongzhao

•Updated about 1 month ago

šŸš€ New S-UI SagerNet/Sing-Box distributed multi-node support 🐳 Forked: alireza7/s-ui

Image
0

10K+

zhengxiongzhao/s-ui repository overview

⁠S-UI - Advanced Web Panel for SagerNet/Sing-Box

Docker Image License

An advanced Web Panel built for SagerNet/Sing-Box

ā šŸš€ Features

  • 🌐 Multi-Node Architecture - Distributed panel management with centralized control
  • šŸ“Š Web-based Management - Intuitive UI for proxy configuration and monitoring
  • šŸ”’ Secure Communication - HTTP-based panel-to-agent communication with token authentication
  • šŸ”„ Scalable - Add multiple agent nodes to expand your proxy infrastructure
  • ⚔ Sing-Box Powered - Built on the high-performance SagerNet/Sing-Box core

ā šŸ—ļø Architecture

S-UI supports a distributed multi-node architecture:

ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
│                      S-UI Panel (Main Control)              │
│                                                             │
│   ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”    ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”    ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”    │
│   │  Web UI     │    │  Config Mgr │    │  Node Mgr   │    │
│   ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜    ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜    ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜    │
│                          │                                  │
│                          ā–¼                                  │
│   ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”    │
│   │              HTTP Management API                   │    │
│   ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜    │
ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜
                           │
          ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
          ā–¼                ā–¼                ā–¼
   ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”  ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”  ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
   │ Agent Node 1│  │ Agent Node 2│  │ Agent Node N│
   │  (hk1)      │  │  (us1)      │  │  (jp1)      │
   ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜  ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜  ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜
⁠Component Roles
ComponentModeDescription
PanelpanelMain control server - manages web UI, configurations, and coordinates all agent nodes
AgentagentRemote node - executes proxy tasks, reports status to panel

ā šŸ“¦ Quick Start

⁠Single Node Deployment
docker run -d \
  --name s-ui \
  --restart unless-stopped \
  -p 2097:2097 \
  -p 51443:443/udp \
  -v ./db:/app/db \
  -v ./cert:/app/cert \
  zhengxiongzhao/s-ui:latest

ā šŸ”‘ Access Panel

After deployment, access the Web Panel at:

http://<your-server-ip>:2095/app/login
ā šŸ“‹ Default Installation Information
ItemValue
Panel Port2095
Panel Path/app/
Subscription Port2096
Subscription Path/sub/
Default User/Passwordadmin / admin

āš ļø Important: Please change the default password immediately after first login!

⁠Multi-Node Deployment
⁠1. Deploy Panel (Main Control Server)
docker run -d \
  --name s-ui-panel \
  --restart unless-stopped \
  --network host \
  -e SUI_MODE=panel \
  -v ./db:/app/db \
  -v ./cert:/app/cert \
  zhengxiongzhao/s-ui:latest
⁠2. Deploy Agent Nodes
# Agent Node 1 (e.g., Hong Kong)
docker run -d \
  --name s-ui-agent-hk1 \
  --restart unless-stopped \
  -p 2097:2097 \
  -p 51443:443/udp \
  -e SUI_MODE=agent \
  -e SUI_NODE_TOKEN=your-secure-token-here \
  -v ./agent-hk1:/app/db \
  zhengxiongzhao/s-ui:latest

# Agent Node 2 (e.g., US)
docker run -d \
  --name s-ui-agent-us1 \
  --restart unless-stopped \
  -p 2098:2097 \
  -p 51444:443/udp \
  -e SUI_MODE=agent \
  -e SUI_NODE_TOKEN=your-secure-token-here \
  -v ./agent-us1:/app/db \
  zhengxiongzhao/s-ui:latest

ā šŸ“‹ Docker Compose

⁠Multi-Node Example
services:
  # Panel (main control server)
  s-ui-panel:
    image: zhengxiongzhao/s-ui:latest
    restart: unless-stopped
    network_mode: host
    environment:
      - SUI_MODE=panel
    volumes:
      - ./test-db:/app/db
      - ./test-cert:/app/cert

  # Agent (remote node hk1)
  s-ui-agent-hk1:
    image: zhengxiongzhao/s-ui:latest
    restart: unless-stopped
    ports:
      - "2097:2097"
      - "51443:443/udp"
    environment:
      - SUI_MODE=agent
      - SUI_NODE_TOKEN=test-token-hk1-12345
    volumes:
      - ./test-agent-hk1:/app/db

ā āš™ļø Environment Variables

VariableTypeDefaultDescription
SUI_MODE"panel" | "agent""panel"Running mode: panel (main control) or agent (remote node)
SUI_NODE_TOKENstring-Authentication token for agent registration (required for agent mode)
SUI_LOG_LEVEL"debug" | "info" | "warn" | "error""info"Log level
SUI_DEBUGbooleanfalseEnable debug mode
SUI_BIN_FOLDERstring"bin"Path to binary folder
SUI_DB_FOLDERstring"db"Path to database folder
SINGBOX_APIstring-Sing-Box API address

ā šŸ”Œ Ports

PortProtocolDescription
2095TCPWeb Panel (Default)
2096TCPSubscription (Default)
2097TCPAgent Management API
443UDPProxy traffic (Sing-Box)

ā šŸ“ Volumes

PathDescription
/app/dbdatabase and configuration
/app/certTLS certificates

ā šŸ” Security

  • Use strong, unique tokens for each agent node
  • Enable TLS for production deployments
  • Restrict network access to management ports
  • Regularly update to the latest version

ā šŸ“ License

This project is licensed under the GPL-3.0 License.

ā šŸ¤ Contributing

Contributions are welcome! Please feel free to submit issues and pull requests.


Built with ā¤ļø for the SagerNet/Sing-Box community

Tag summary

Content type

Image

Digest

sha256:18fa25a77…

Size

36 MB

Last updated

about 1 month ago

docker pull zhengxiongzhao/s-ui