# Functions
CheckUID - Checks to make sure user has root privileges.
Convert converts netclient host/node struct to netmaker host/node structs.
ConvertNode accepts a netmaker node struct and converts to the structs used by netclient.
ConvertOldNode accepts a netmaker node struct and converts to the structs used by netclient.
ConvertOldServerCfg converts a netmaker ServerConfig to netclient server struct.
ConvertServerCfg converts a netmaker ServerConfig to netclient server struct.
ConvertToNetmakerNode converts a netclient node to a netmaker node.
DeleteClientNodes - delete the nodes in client config.
DeleteNode deletes the node from the nodemap for the specified network.
DeleteNodes - removes all nodes.
DeleteServer deletes the specified server name from the server map.
DeleteServerHostPeerCfg - deletes the host peers for the server.
FirewallHasChanged - checks if the firewall has changed.
FormatBool converts a boolean to a [yes|no] string.
FormatName ensures name is in character set and is proper length Sets name to blank on failure.
GetCurrServerCtxFromFile - gets current server context from file.
GetNetclientInstallPath returns the full path where netclient should be installed based on OS.
GetNetclientPath - returns path to netclient config directory.
GetNode returns returns the node configuation of the specified network name.
GetNodes returns a copy of the NodeMap.
GetServer returns the server struct for the given server name.
GetServers - gets all the server names host has registered to.
GetSystemNetworks - get networks for older version (pre v0.18.0) of netclient.
InCharSet verifies if all chars in string are part of defined charset.
IsPidDead checks if given pid is not running.
Lock creates a lockfile with pid as contents if lockfile exists but belongs to defunct process the existing lockfile will be deleted and new one created if unable to create within TIMEOUT returns error.
ModPort - Change Node Port if ListenPort is not free.
Netclient returns a pointer to the im memory version of the host configuration.
OldAuthenticate authenticates with netmaker api to permit subsequent interactions with the api.
ParseAccessToken - decodes base64 encoded access token.
ParseBool parses a [yes|no] string to boolean value.
ReadConfig - reads a config of a older version of client from disk for specified network.
ReadNetclientConfig reads the host configuration file and returns it as an instance.
ReadNodeConfig reads node configuration from disk.
ReadServerConf reads the servers configuration file and populates the server map.
RemoveServerHostPeerCfg - sets remove flag for all peers on the given server peers.
SaveServer updates the server map with current server struct and writes map to disk.
SetCurrServerCtxInFile - sets the current server context in the file.
setFirewall - determine and record firewall in use.
SetNodes - sets server nodes in client config.
SetServerCtx - sets netclient's server context.
SetVersion - sets version for use by other packages.
ToIPNet parses a cidr string and returns a net.IPNet.
ToUDPAddr parses and ip address string to return a pointer to net.UDPAddr.
Unlock removes a lockfile if contents of lockfile match current pid also removes lockfile if owner process is no longer running will return TIMEOUT error if timeout exceeded.
No description provided by the author
UpdateHostPeers - updates host peer map in the netclient config.
UpdateNetclient updates the in memory version of the host configuration.
UpdateNodeMap updates the in memory nodemap for the specified network.
UpdateServer updates the in-memory server map.
UpdateServerConfig updates the in memory server map with values provided from netmaker server.
WriteNetclientConfiig writes the in memory host configuration to disk.
WriteNodeConfig writes the node map to disk.
WriteServerConfig writes server map to disk.
# Constants
ConfigLockfile lockfile to control access to config file.
DefaultListenPort default port for wireguard.
DefaultMTU default MTU for wireguard.
No description provided by the author
LinuxAppDataPath - linux path.
MacAppDataPath - mac path.
MaxNameLength maximum length of a node name.
NodeLockFile is name of lockfile for controlling access to node config file on disk.
No description provided by the author
No description provided by the author
ServerLockFile is a lockfile for controlling access to the server map file on disk.
No description provided by the author
No description provided by the author
Timeout timelimit for obtaining/releasing lockfile.
No description provided by the author
WindowsAppDataPath - windows path.
# Variables
CurrServer - holds the value of current server of client.
FwClose - firewall manager shutdown func.
HostNatType - host's NAT type.
HostPublicIP - host's public ipv4 endpoint.
HostPublicIP6 - host's public ipv6 endpoint.
Nodes provides a map of node configurations indexed by network name.
Servers is map of servers indexed by server name.
Version - default version string.
WgPublicListenPort - host's wireguard public listen port.
# Structs
ClientConfig - struct for dealing with client configuration.
Config configuration for netclient and host as a whole.
Node provides configuration of a node.
OldNetmakerServerConfig - pre v0.18.0 server configuration.
Server represents a server configuration.
TurnConfig - struct to hold turn server config.