# Functions
No description provided by the author
BuildClientConfig to create wireguard client config string.
ClientDefaultsFromEnv to read the default values for creating a new client from the environment or use sane defaults.
No description provided by the author
ContainsCIDR to check if ipnet1 contains ipnet2 https://stackoverflow.com/a/40406619/6111641 https://go.dev/play/p/Q4J-JEN3sF.
FillClientSubnetRange to fill subnet ranges client belongs to, does nothing if SRs are not found.
GetAllocatedIPs to get all ip addresses allocated to clients and server.
GetAvailableIP get the ip address that can be allocated from an CIDR We need interfaceAddresses to find real broadcast and network addresses.
GetBroadcastAndNetworkAddrsLookup get the ip address that can't be used with current server interfaces.
GetBroadcastIP func to get the broadcast ip address of a network.
No description provided by the author
GetCurrentHash returns current hashes.
No description provided by the author
GetInterfaceIPs to get local machine's interface ip addresses.
GetIPFromCIDR get ip from CIDR.
GetPublicIP to get machine's public ip address.
GetSubnetRangesString to get a formatted string, representing active subnet ranges.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
SendRequestedConfigsToTelegram to send client all their configs.
No description provided by the author
No description provided by the author
No description provided by the author
ValidateAllowedIPs to validate allowed ip addresses in CIDR format.
ValidateAndFixSubnetRanges to check if subnet ranges are valid for the server configuration Removes all non-valid CIDRs.
ValidateCIDR to validate a network CIDR.
ValidateCIDRList to validate a list of network CIDR.
ValidateExtraAllowedIPs to validate extra Allowed ip addresses, allowing empty strings.
ValidateIPAddress to validate the IPv4 and IPv6 address.
ValidateIPAddressList to validate a list of IPv4 and IPv6 addresses.
ValidateIPAllocation to validate the list of client's ip allocation They must have a correct format and available in serverAddresses space.
ValidateServerAddresses to validate allowed ip addresses in CIDR format.
No description provided by the author
WriteWireGuardServerConfig to write Wireguard server config.
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
i.e.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
Runtime config.
Runtime config.
No description provided by the author
Runtime config.
Runtime config.
Runtime config.
No description provided by the author
Runtime config.
Runtime config.
Runtime config.
Runtime config.
Runtime config.
Runtime config.
Runtime config.
Runtime config.
Runtime config.
Runtime config.
Runtime config.
Runtime config.
Runtime config.
No description provided by the author
No description provided by the author
Runtime config.