Documentation
¶
Overview ¶
Package main is the entry point for the SharX web panel application. It initializes the database, web server, and handles command-line operations for managing the panel.
Directories
¶
| Path | Synopsis |
|---|---|
|
amneziawg
|
|
|
install
Package install builds or locates the AmneziaWG-go userspace binary for panel/node images.
|
Package install builds or locates the AmneziaWG-go userspace binary for panel/node images. |
|
Package config provides configuration management utilities for the SharX panel, including version information, logging levels, database connection, and environment variable handling.
|
Package config provides configuration management utilities for the SharX panel, including version information, logging levels, database connection, and environment variable handling. |
|
Package database provides database initialization, migration, and management utilities for the SharX panel using GORM with PostgreSQL.
|
Package database provides database initialization, migration, and management utilities for the SharX panel using GORM with PostgreSQL. |
|
model
Package model defines the database models and data structures used by the SharX panel.
|
Package model defines the database models and data structures used by the SharX panel. |
|
Package logger provides logging functionality for the SharX panel with dual-backend logging (console/syslog and file) and buffered log storage for web UI.
|
Package logger provides logging functionality for the SharX panel with dual-backend logging (console/syslog and file) and buffered log storage for web UI. |
|
Package main is the entry point for the SharX node service (worker).
|
Package main is the entry point for the SharX node service (worker). |
|
amneziawg
Package amneziawg runs AmneziaWG-go sidecar processes on the SharX panel/node host.
|
Package amneziawg runs AmneziaWG-go sidecar processes on the SharX panel/node host. |
|
api
Package api provides REST API endpoints for the node service.
|
Package api provides REST API endpoints for the node service. |
|
auth
Package auth loads the node SECRET_KEY used for JWT and HMAC auth with the panel.
|
Package auth loads the node SECRET_KEY used for JWT and HMAC auth with the panel. |
|
config
Package config provides node configuration persistence (panel URL, node address).
|
Package config provides node configuration persistence (panel URL, node address). |
|
configpull
Package configpull fetches Xray configuration from the panel on worker startup (HMAC pairing).
|
Package configpull fetches Xray configuration from the panel on worker startup (HMAC pairing). |
|
defaults
Package defaults holds node service defaults (host-network worker).
|
Package defaults holds node service defaults (host-network worker). |
|
geopush
Package geopush sends one-shot egress geolocation from the worker to the panel (HMAC, pairing).
|
Package geopush sends one-shot egress geolocation from the worker to the panel (HMAC, pairing). |
|
logs
Package logs provides log pushing functionality for sending logs from node to panel in real-time.
|
Package logs provides log pushing functionality for sending logs from node to panel in real-time. |
|
telemt
Package telemt runs Telemt (MTProto) sidecar processes on the SharX node.
|
Package telemt runs Telemt (MTProto) sidecar processes on the SharX node. |
|
xray
Package xray provides XRAY Core management for the node service.
|
Package xray provides XRAY Core management for the node service. |
|
Package sub — Clash YAML subscription converter.
|
Package sub — Clash YAML subscription converter. |
|
telemt
|
|
|
install
Package install downloads official Telemt release binaries from github.com/telemt/telemt.
|
Package install downloads official Telemt release binaries from github.com/telemt/telemt. |
|
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. |
|
dockerupdater
Package dockerupdater calls an optional HTTP sidecar (e.g.
|
Package dockerupdater calls an optional HTTP sidecar (e.g. |
|
geoip
Package geoip resolves public egress IP and approximate lat/lon using public HTTP APIs (chain with fallbacks).
|
Package geoip resolves public egress IP and approximate lat/lon using public HTTP APIs (chain with fallbacks). |
|
json_util
Package json_util provides JSON utilities including a custom RawMessage type.
|
Package json_util provides JSON utilities including a custom RawMessage type. |
|
pairing_outbound
Package pairing_outbound signs node→panel requests with a shared symmetric key.
|
Package pairing_outbound signs node→panel requests with a shared symmetric key. |
|
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. |
|
Package web provides the panel static filesystem and helpers for the Next.js export.
|
Package web provides the panel static filesystem and helpers for the Next.js export. |
|
controller
Package controller provides HTTP request handlers and controllers for the SharX web management panel.
|
Package controller provides HTTP request handlers and controllers for the SharX web management panel. |
|
entity
Package entity defines data structures and entities used by the web layer of the SharX panel.
|
Package entity defines data structures and entities used by the web layer of the SharX 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 scheduled tasks for monitoring client HWIDs from access logs.
|
Package job provides scheduled tasks for monitoring client HWIDs from access logs. |
|
locale
Package locale provides internationalization (i18n) support for the SharX web panel, including translation loading, localization, and middleware for web and bot interfaces.
|
Package locale provides internationalization (i18n) support for the SharX web panel, including translation loading, localization, and middleware for web and bot interfaces. |
|
logsse
Package logsse provides a Server-Sent Events hub for real-time log streaming.
|
Package logsse provides a Server-Sent Events hub for real-time log streaming. |
|
middleware
Package middleware provides HTTP middleware functions for the SharX web panel, including domain validation and URL redirection utilities.
|
Package middleware provides HTTP middleware functions for the SharX web panel, including domain validation and URL redirection utilities. |
|
network
Package network provides network utilities for the SharX web panel, including automatic HTTP to HTTPS redirection functionality.
|
Package network provides network utilities for the SharX web panel, including automatic HTTP to HTTPS redirection functionality. |
|
service
Package service provides Client management service.
|
Package service provides Client management service. |
|
session
Package session provides session management utilities for the SharX web panel.
|
Package session provides session management utilities for the SharX web panel. |
|
websocket
Package websocket provides WebSocket hub for real-time updates and notifications.
|
Package websocket provides 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. |
Click to show internal directories.
Click to hide internal directories.