web

package
v2.8.6 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2026 License: GPL-3.0 Imports: 26 Imported by: 0

Documentation

Overview

Package web provides the main web server implementation for the 3x-ui panel, including HTTP/HTTPS serving, routing, templates, and background job scheduling.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EmbeddedAssets

func EmbeddedAssets() embed.FS

EmbeddedAssets returns the embedded assets filesystem for reuse by other servers.

func EmbeddedHTML

func EmbeddedHTML() embed.FS

EmbeddedHTML returns the embedded HTML templates filesystem for reuse by other servers.

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server represents the main web server for the 3x-ui panel with controllers, services, and scheduled jobs.

func NewServer

func NewServer() *Server

NewServer creates a new web server instance with a cancellable context.

func (*Server) GetCron

func (s *Server) GetCron() *cron.Cron

GetCron returns the server's cron scheduler instance.

func (*Server) GetCtx

func (s *Server) GetCtx() context.Context

GetCtx returns the server's context for cancellation and deadline management.

func (*Server) Start

func (s *Server) Start() (err error)

Start initializes and starts the web server with configured settings, routes, and background jobs.

func (*Server) Stop

func (s *Server) Stop() error

Stop gracefully shuts down the web server, stops Xray, cron jobs, and Telegram bot.

Directories

Path Synopsis
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.
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.
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.
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.
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.
Package middleware provides HTTP middleware functions for the 3x-ui web panel, including domain validation and URL redirection utilities.
Package middleware provides HTTP middleware functions for the 3x-ui web panel, including domain validation and URL redirection utilities.
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.
Package service provides business logic services for the 3x-ui web panel, including inbound/outbound management, user administration, settings, and Xray integration.
Package service provides business logic services for the 3x-ui web panel, including inbound/outbound management, user administration, settings, and Xray integration.
Package session provides session management utilities for the 3x-ui web panel.
Package session provides session management utilities for the 3x-ui web panel.

Jump to

Keyboard shortcuts

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