l-ui

command module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 6, 2026 License: GPL-3.0 Imports: 19 Imported by: 0

README

English

L-UI

One Dashboard. Multiple Xray Panels.

Build Release Go Reference Go Report Card

L-UI is a hub for managing remote VPS nodes and their Xray instances. The hub does not run Xray itself; it provisions nodes over SSH/SCP, installs a node backend, and controls nodes through signed APIs.

l-ui

What This Repo Contains

  • main.go: the Go entrypoint and CLI
  • web/: Gin controllers, services, and the embedded frontend output
  • frontend/: the React + Ant Design admin panel source
  • database/: GORM models, migrations, and seed data
  • xray/: Xray process management and config generation
  • sub/: subscription endpoints
  • docs/: architecture, install, bootstrap, API, and troubleshooting notes
  • Makefile: the main developer and release command surface

Quick Start

bash <(curl -Ls https://raw.githubusercontent.com/drunkleen/l-ui/main/install.sh)

Development

Use the Makefile from the repo root:

Command Purpose
make dev-local Start the Go backend first, then Vite, with local ./tmp runtime files
make dev Start the Docker Compose dev stack
make build Build the frontend bundle and then the Go binary
make test Run repo-wide Go tests
make lint Run Go vet and frontend lint
make typecheck Run the frontend TypeScript typecheck
make clean Remove local build artifacts

make dev-local is the preferred local development path. It prints backend compile progress, waits for readiness, and then starts Vite. make dev is the containerized path and should be used when Docker parity is required.

Local development login: admin / admin.

Installer And CLI

  • install.sh is the production installer
  • It downloads a release bundle, installs the service, and prints a command reference at the end
  • The installed l-ui wrapper is the service entrypoint for start, stop, restart, status, settings, enable, disable, log, banlog, update, legacy, install, and uninstall
  • The Go binary also supports run, agent, migrate, migrate-db, setting, and cert subcommands

Build and Release

  • make build produces the frontend assets under web/dist/ and the Go binary under bin/
  • GitHub Actions runs CI on pushes to main and pull requests
  • Tagged pushes like v1.2.3 trigger release packaging and published artifacts
  • Docker images are published on version tags too

CI/CD Flow

  • ci.yml validates Go tests, frontend lint/typecheck/tests, and a frontend build on PRs and main
  • release.yml builds the release tarballs and Windows zip assets
  • docker.yml publishes multi-arch container images for version tags

Database

  • SQLite is the default
  • Postgres is supported for hosted or multi-node deployments
  • MySQL/MariaDB is supported through the shared GORM storage layer

See docs/install.md for the deployment model and storage layout.

Hub / Node Model

  • The hub owns nodes, inbounds, clients, routing, and assignments
  • Nodes keep only runtime files, systemd units, and Xray config locally
  • Bootstrap uses SSH/SCP and panel-owned bundles, not GitHub release tags
  • Nodes expose status, logs, config, and lifecycle APIs

Docs

Support

Patreon Buy Me A Coffee

Crypto

  • BTC: bc1qsmvxpn79g6wkel3w67k37r9nvzm5jnggeltxl6
  • ETH (ERC20): 0x8613aD01910d17Bc922D95cf16Dc233B92cd32d6
  • USDT (TRC20): 0x8613aD01910d17Bc922D95cf16Dc233B92cd32d6
  • DOGE: D8U25FjxdxdQ7pEH37cMSw8HXBdY1qZ7n3
  • TRX: TGNru3vuDfPh5zBJ31DKzcVVvFgfMK9J48

Documentation

Overview

Package main is the entry point for the l-ui web panel application. It initializes the database, web server, and handles command-line operations for managing the panel.

Directories

Path Synopsis
Package config provides configuration management utilities for the l-ui panel, including version information, logging levels, database paths, and environment variable handling.
Package config provides configuration management utilities for the l-ui panel, including version information, logging levels, database paths, and environment variable handling.
Package database provides database initialization, migration, and management utilities for the l-ui panel using GORM with SQLite or PostgreSQL.
Package database provides database initialization, migration, and management utilities for the l-ui panel using GORM with SQLite or PostgreSQL.
model
Package model defines the database models and data structures used by the l-ui panel.
Package model defines the database models and data structures used by the l-ui panel.
Package logger provides logging functionality for the l-ui panel with dual-backend logging (console/syslog and file) and buffered log storage for web UI.
Package logger provides logging functionality for the l-ui panel with dual-backend logging (console/syslog and file) and buffered log storage for web UI.
Package sub provides subscription server functionality for the l-ui panel, including HTTP/HTTPS servers for serving subscription links and JSON configurations.
Package sub provides subscription server functionality for the l-ui panel, including HTTP/HTTPS servers for serving subscription links and JSON configurations.
tools
openapigen command
util
common
Package common provides common utility functions for error handling, formatting, and multi-error management.
Package common provides common utility functions for error handling, formatting, and multi-error management.
crypto
Package crypto provides cryptographic utilities for password hashing and verification.
Package crypto provides cryptographic utilities for password hashing and verification.
json_util
Package json_util provides JSON utilities including a custom RawMessage type.
Package json_util provides JSON utilities including a custom RawMessage type.
netproxy
Package netproxy builds HTTP clients that route the panel's own outbound requests through an admin-configured proxy, used to reach GitHub and Telegram from servers where those services are filtered.
Package netproxy builds HTTP clients that route the panel's own outbound requests through an admin-configured proxy, used to reach GitHub and Telegram from servers where those services are filtered.
random
Package random provides utilities for generating random strings and numbers.
Package random provides utilities for generating random strings and numbers.
reflect_util
Package reflect_util provides reflection utilities for working with struct fields and values.
Package reflect_util provides reflection utilities for working with struct fields and values.
sys
Package sys provides system utilities for monitoring network connections and CPU usage.
Package sys provides system utilities for monitoring network connections and CPU usage.
web
Package web provides the main web server implementation for the l-ui panel, including HTTP/HTTPS serving, routing, templates, and background job scheduling.
Package web provides the main web server implementation for the l-ui panel, including HTTP/HTTPS serving, routing, templates, and background job scheduling.
controller
Package controller provides HTTP request handlers and controllers for the l-ui web management panel.
Package controller provides HTTP request handlers and controllers for the l-ui web management panel.
entity
Package entity defines data structures and entities used by the web layer of the l-ui panel.
Package entity defines data structures and entities used by the web layer of the l-ui panel.
global
Package global provides global variables and interfaces for accessing web and subscription servers.
Package global provides global variables and interfaces for accessing web and subscription servers.
job
Package job provides background job implementations for the l-ui web panel, including traffic monitoring, system checks, and periodic maintenance tasks.
Package job provides background job implementations for the l-ui web panel, including traffic monitoring, system checks, and periodic maintenance tasks.
locale
Package locale provides internationalization (i18n) support for the l-ui web panel, including translation loading, localization, and middleware for web and bot interfaces.
Package locale provides internationalization (i18n) support for the l-ui web panel, including translation loading, localization, and middleware for web and bot interfaces.
middleware
Package middleware provides HTTP middleware functions for the l-ui web panel, including domain validation and URL redirection utilities.
Package middleware provides HTTP middleware functions for the l-ui web panel, including domain validation and URL redirection utilities.
network
Package network provides network utilities for the l-ui web panel, including automatic HTTP to HTTPS redirection functionality.
Package network provides network utilities for the l-ui web panel, including automatic HTTP to HTTPS redirection functionality.
service
Package service provides business logic services for the l-ui web panel, including inbound/outbound management, user administration, settings, and Xray integration.
Package service provides business logic services for the l-ui web panel, including inbound/outbound management, user administration, settings, and Xray integration.
websocket
Package websocket provides a WebSocket hub for real-time updates and notifications.
Package websocket provides a WebSocket hub for real-time updates and notifications.
Package xray provides integration with the Xray proxy core.
Package xray provides integration with the Xray proxy core.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL