Discover Packages
github.com/tyler-lloyd/wg-overlay
pkg
wireguard
package
Version:
v0.0.0-...-ccdb22c
Opens a new window with list of versions in this module.
Published: Mar 8, 2022
License: MIT
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
View Source
const (
PublicKeyAnnotationName = "wireguard-publickey"
IPAnnotationName = "wireguard-ip"
DefaultListenPort = 51820
)
FromNode returns a valid WireGuard peer if the node has the necessary metadata
type Config struct {
HostInterface Host
Peers []Peer
}
Config is the WireGuard config on the host
GetConfig builds the current WireGuard configuration of the host.
This uses the custom Config type because the wgctrl device type does not
return the IP used by the wireguard interface.
Host is a custom type for holding WireGuard state information about the host
NewHost returns a new host config.
WireGuard link type
Attrs returns the attributes of the link
Type returns the link type
Peer is a custom WireGuard peer type.
todo(tyler-lloyd) remove usage eventually and only use wgctrl/wgtypes.Peer
Source Files
¶
Click to show internal directories.
Click to hide internal directories.