Documentation
¶
Overview ¶
Package main is the entry point for the 3x-ui web panel application. It initializes the database, web server, and handles command-line operations for managing the panel.
Directories
¶
| Path | Synopsis |
|---|---|
|
internal
|
|
|
config
Package config provides configuration management utilities for the 3x-ui panel, including version information, logging levels, database paths, and environment variable handling.
|
Package config provides configuration management utilities for the 3x-ui panel, including version information, logging levels, database paths, and environment variable handling. |
|
database
Package database provides database initialization, migration, and management utilities for the 3x-ui panel using GORM with SQLite or PostgreSQL.
|
Package database provides database initialization, migration, and management utilities for the 3x-ui panel using GORM with SQLite or PostgreSQL. |
|
database/model
Package model defines the database models and data structures used by the 3x-ui panel.
|
Package model defines the database models and data structures used by the 3x-ui panel. |
|
logger
Package logger provides logging functionality for the 3x-ui panel with dual-backend logging (console/syslog and file) and buffered log storage for web UI.
|
Package logger provides logging functionality for the 3x-ui panel with dual-backend logging (console/syslog and file) and buffered log storage for web UI. |
|
mtproto
Package mtproto manages mtg (github.com/9seconds/mtg) sidecar processes that serve MTProto FakeTLS proxies.
|
Package mtproto manages mtg (github.com/9seconds/mtg) sidecar processes that serve MTProto FakeTLS proxies. |
|
performance
Package performance provides profiling, caching, concurrency, and benchmarking infrastructure for X-UI PRO.
|
Package performance provides profiling, caching, concurrency, and benchmarking infrastructure for X-UI PRO. |
|
sub
Package sub provides subscription server functionality for the 3x-ui panel, including HTTP/HTTPS servers for serving subscription links and JSON configurations.
|
Package sub provides subscription server functionality for the 3x-ui panel, including HTTP/HTTPS servers for serving subscription links and JSON configurations. |
|
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. |
|
util/crypto
Package crypto provides cryptographic utilities for password hashing and verification.
|
Package crypto provides cryptographic utilities for password hashing and verification. |
|
util/json_util
Package json_util provides JSON utilities including a custom RawMessage type.
|
Package json_util provides JSON utilities including a custom RawMessage type. |
|
util/link
Package link provides parsers for VPN share links (vmess://, vless://, etc.) and subscription bodies (typically base64-encoded newline lists of such links).
|
Package link provides parsers for VPN share links (vmess://, vless://, etc.) and subscription bodies (typically base64-encoded newline lists of such links). |
|
util/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. |
|
util/random
Package random provides utilities for generating random strings and numbers.
|
Package random provides utilities for generating random strings and numbers. |
|
util/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. |
|
util/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. |
|
util/wirecodec
Package wirecodec holds the shared envelope codec for node-to-node config transport: zstd (de)compression, SHA-256 integrity hashing, and the header / capability constants both the panel (sender) and node (receiver) agree on.
|
Package wirecodec holds the shared envelope codec for node-to-node config transport: zstd (de)compression, SHA-256 integrity hashing, and the header / capability constants both the panel (sender) and node (receiver) agree on. |
|
web
Package web provides the main web server implementation for the 3x-ui panel, including HTTP/HTTPS serving, routing, templates, and background job scheduling.
|
Package web provides the main web server implementation for the 3x-ui panel, including HTTP/HTTPS serving, routing, templates, and background job scheduling. |
|
web/controller
Package controller provides HTTP request handlers and controllers for the 3x-ui web management panel.
|
Package controller provides HTTP request handlers and controllers for the 3x-ui web management panel. |
|
web/entity
Package entity defines data structures and entities used by the web layer of the 3x-ui panel.
|
Package entity defines data structures and entities used by the web layer of the 3x-ui panel. |
|
web/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. |
|
web/job
Package job provides background job implementations for the 3x-ui web panel, including traffic monitoring, system checks, and periodic maintenance tasks.
|
Package job provides background job implementations for the 3x-ui web panel, including traffic monitoring, system checks, and periodic maintenance tasks. |
|
web/locale
Package locale provides internationalization (i18n) support for the 3x-ui web panel, including translation loading, localization, and middleware for web and bot interfaces.
|
Package locale provides internationalization (i18n) support for the 3x-ui web panel, including translation loading, localization, and middleware for web and bot interfaces. |
|
web/middleware
Package middleware provides HTTP middleware functions for the 3x-ui web panel, including domain validation utilities.
|
Package middleware provides HTTP middleware functions for the 3x-ui web panel, including domain validation utilities. |
|
web/network
Package network provides network utilities for the 3x-ui web panel, including automatic HTTP to HTTPS redirection functionality.
|
Package network provides network utilities for the 3x-ui web panel, including automatic HTTP to HTTPS redirection functionality. |
|
web/service
Package service implements the panel's business-logic layer.
|
Package service implements the panel's business-logic layer. |
|
web/service/panel
Package service: WebSocketService owns the per-connection pump goroutines and bridges the HTTP-layer controller to the broadcast hub.
|
Package service: WebSocketService owns the per-connection pump goroutines and bridges the HTTP-layer controller to the broadcast hub. |
|
web/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. |
|
xray
Package xray provides integration with the Xray proxy core.
|
Package xray provides integration with the Xray proxy core. |
|
tools
|
|
|
openapigen
command
|
Click to show internal directories.
Click to hide internal directories.