web

package
v1.3.9 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2026 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MonitorBind

func MonitorBind() string

MonitorBind reports the configured host, defaulting to loopback.

func SetMonitorBind

func SetMonitorBind(host string)

SetMonitorBind records the address the monitor page should listen on. The engine calls it once, before any listener exists. An empty host, or one that means "everything", is left as the caller wrote it — refusing to serve publicly is a decision for the operator, not for this function.

Types

type PortUsage

type PortUsage struct {
	Port  int
	Usage uint64
}

type SystemStats

type SystemStats struct {
	TunnelStatus   string `json:"tunnelStatus"`
	CPUUsage       string `json:"cpuUsage"`
	RAMUsage       string `json:"ramUsage"`
	DiskUsage      string `json:"diskUsage"`
	SwapUsage      string `json:"swapUsage"`
	NetworkTraffic string `json:"networkTraffic"`
	UploadSpeed    string `json:"uploadSpeed"`
	DownloadSpeed  string `json:"downloadSpeed"`
	TunnelTraffic  string `json:"tunnelTraffic"`
	Sniffer        string `json:"sniffer"`
	AllConnections string `json:"allConnections"`
}

type Usage

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

func NewDataStore

func NewDataStore(listenAddr string, shutdownCtx context.Context, snifferLog string, sniffer bool, tunnelStatus func() string, logger *logrus.Logger) *Usage

func (*Usage) AddOrUpdatePort

func (m *Usage) AddOrUpdatePort(port int, usage uint64)

func (*Usage) Monitor

func (m *Usage) Monitor()

Jump to

Keyboard shortcuts

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