model

package
v0.0.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ProtocolOpenVPNUDP   = "openvpn_udp"
	ProtocolOpenVPNTCP   = "openvpn_tcp"
	ProtocolSoftEtherTLS = "softether_https"
	ProtocolSSTP         = "sstp"
	ProtocolL2TP         = "l2tp"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

type Node struct {
	HostName        string    `json:"hostName"`
	IP              string    `json:"ip"`
	Port            int       `json:"port"`
	Score           int64     `json:"score"`
	PingMS          int64     `json:"pingMs"`
	SpeedBPS        int64     `json:"speedBps"`
	CountryLong     string    `json:"countryLong"`
	CountryShort    string    `json:"countryShort"`
	Sessions        int64     `json:"sessions"`
	UptimeMS        int64     `json:"uptimeMs"`
	TotalUsers      int64     `json:"totalUsers"`
	TotalTraffic    int64     `json:"totalTraffic"`
	LogType         string    `json:"logType"`
	Operator        string    `json:"operator"`
	Message         string    `json:"message"`
	OpenVPNConfig   string    `json:"-"`
	Protocols       []string  `json:"protocols"`
	MeasuredBPS     int64     `json:"measuredBps"`
	MeasuredAt      time.Time `json:"measuredAt,omitzero"`
	SpeedTestFailed bool      `json:"speedTestFailed"`
	LastFailure     time.Time `json:"lastFailure,omitzero"`
	FailureReason   string    `json:"failureReason,omitempty"`
	RefreshedAt     time.Time `json:"refreshedAt"`
}

type RuntimeStatus

type RuntimeStatus struct {
	State            string    `json:"state"`
	ConnectingIP     string    `json:"connectingIp,omitempty"`
	Selection        string    `json:"selection"`
	ActiveIP         string    `json:"activeIp,omitempty"`
	ActiveHostName   string    `json:"activeHostName,omitempty"`
	ActiveProtocol   string    `json:"activeProtocol,omitempty"`
	LastRefresh      time.Time `json:"lastRefresh,omitzero"`
	LastHealthCheck  time.Time `json:"lastHealthCheck,omitzero"`
	LastError        string    `json:"lastError,omitempty"`
	RefreshRunning   bool      `json:"refreshRunning"`
	DirectMode       bool      `json:"directMode"`
	ConnectionPaused bool      `json:"connectionPaused"`
}

Jump to

Keyboard shortcuts

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