Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrPeerNotFound = errors.New("peer not found")
ErrPeerNotFound is returned when unable to find a matching peer while looking up information about it.
Functions ¶
func IDHandler ¶
func IDHandler(wgID WgIdentity) http.HandlerFunc
func PeerHandler ¶
func PeerHandler(c WgDeviceConfigurator, wgID WgIdentity, p IPPool, ip6prefix *net.IPNet) http.HandlerFunc
Types ¶
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
Pool is a pool of available IP numbers for allocation.
type WgClient ¶
WgClient is a thin wrapper around wgctrl for binding config to a specific interface link.
type WgDeviceConfigurator ¶
type WgDeviceConfigurator interface { ConfigureDevice(wgtypes.Config) error ResolvePeerNets(wgtypes.Key) ([]net.IPNet, error) Peers() ([]wgtypes.Peer, error) }
WgDeviceConfigurator configures one WireGuard interface and tracks IPs of registered peers.
type WgIdentity ¶
WgIdentity is the information required for a remote peer to connect via WireGuard.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.