Documentation ¶
Index ¶
- func GetPeerConfig(allowIPs string, publicKey string, presharedKey string, toRemove bool) (peerConfig *wgtypes.PeerConfig, err error)
- func GetPeerConfigFrom(peer *wg_core.WgPeer) (peerConfig *wgtypes.PeerConfig, err error)
- func GetPeersConfigFrom(peers []wg_core.WgPeer, endpoint string, allowedIPs string) (peerConfigs []wgtypes.PeerConfig, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetPeerConfig ¶
func GetPeerConfig(allowIPs string, publicKey string, presharedKey string, toRemove bool) (peerConfig *wgtypes.PeerConfig, err error)
Takes the IP, public key, pre-shared key as strings, and a bool whether the peer should be removed or added to the interface, and returns the wgtypes peer config for this peer. This config is then applied as part of updateInterface, which expects a list of these peer configs.
func GetPeerConfigFrom ¶
func GetPeerConfigFrom(peer *wg_core.WgPeer) (peerConfig *wgtypes.PeerConfig, err error)
func GetPeersConfigFrom ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.