utils

package
v0.0.0-...-1796e98 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	IntfName string
	Client   *wgctrl.Client
)

Functions

func GeneratePeerConfig

func GeneratePeerConfig(peer wgtypes.Peer) wgtypes.PeerConfig

GeneratePeerConfig generates a PeerConfig from a Peer.

func GetWgCIDR

func GetWgCIDR() ([]string, error)

GetWgCIDR returns the list of WireGuard interface's CIDR.

func GetWgLocalIP

func GetWgLocalIP() (string, error)

GetWgLocalIP returns the local IP of WireGuard interface.

func InitWg

func InitWg() error

Types

This section is empty.

Jump to

Keyboard shortcuts

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