Documentation ¶
Overview ¶
Package vpnstatus contains the VPN status.
Index ¶
Constants ¶
View Source
const ( TrafPolStateUnknown = iota TrafPolStateInactive TrafPolStateActive TrafPolStateDisabled )
TrafPolState states.
View Source
const ( TNDStateUnknown = iota TNDStateInactive TNDStateActive )
TNDState states.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectionState ¶
type ConnectionState uint32
ConnectionState is the current connection state.
const ( ConnectionStateUnknown ConnectionState = iota ConnectionStateDisconnected ConnectionStateConnecting ConnectionStateConnected ConnectionStateDisconnecting )
ConnectionState states.
func (ConnectionState) Connected ¶
func (c ConnectionState) Connected() bool
Connected returns whether ConnectionState is state "connected".
func (ConnectionState) String ¶
func (c ConnectionState) String() string
String returns ConnectionState as string.
type OCRunning ¶
type OCRunning uint32
OCRunning is the current state of the openconnect client.
type Status ¶
type Status struct { TrustedNetwork TrustedNetwork ConnectionState ConnectionState IP string Device string Server string ServerIP string ConnectedAt int64 Servers []string OCRunning OCRunning OCPID uint32 TrafPolState TrafPolState AllowedHosts []string TNDState TNDState TNDServers []string VPNConfig *vpnconfig.Config }
Status is a VPN status.
func NewFromJSON ¶
NewFromJSON parses and returns the Status in b.
type TrafPolState ¶ added in v1.2.0
type TrafPolState uint32
TrafPolState is the current TrafPol state.
func (TrafPolState) String ¶ added in v1.2.0
func (t TrafPolState) String() string
String resturns TrafPolState as string.
type TrustedNetwork ¶
type TrustedNetwork uint32
TrustedNetwork is the current trusted network state.
const ( TrustedNetworkUnknown TrustedNetwork = iota TrustedNetworkNotTrusted TrustedNetworkTrusted )
TrustedNetwork states
func (TrustedNetwork) Trusted ¶
func (t TrustedNetwork) Trusted() bool
Trusted returns whether TrustedNetwork is state "trusted".
Click to show internal directories.
Click to hide internal directories.