internal

package
v0.0.24 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 12, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAddrAndRouter added in v0.0.4

func AddAddrAndRouter()

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

func GetPeersConfigFrom(peers []wg_core.WgPeer, endpoint string, allowedIPs string) (peerConfigs []wgtypes.PeerConfig, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL