wireguard

package
v1.3.5 Latest Latest
Warning

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

Go to latest
Published: May 12, 2021 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Wireguard

type Wireguard struct {
	// contains filtered or unexported fields
}

Wireguard is a utility for managing wireguard configuration

func New

func New(interfaces []string) (*Wireguard, error)

New ensures that the interfaces given are valid, and returns a new Wireguard instance

func (*Wireguard) AddPeer

func (w *Wireguard) AddPeer(peer api.WireguardPeer)

AddPeer adds the given peer to the wireguard interfaces, without checking the existing configuration

func (*Wireguard) Close

func (w *Wireguard) Close()

Close closes the underlying wireguard client

func (*Wireguard) CountPeers added in v1.3.4

func (w *Wireguard) CountPeers() (connectedKeyList api.ConnectedKeysMap, peerCount int)

func (*Wireguard) RemovePeer

func (w *Wireguard) RemovePeer(peer api.WireguardPeer)

RemovePeer removes the given peer from the wireguard interfaces, without checking the existing configuration

func (*Wireguard) ResetPeers added in v1.3.4

func (w *Wireguard) ResetPeers()

func (*Wireguard) UpdatePeers

func (w *Wireguard) UpdatePeers(peers api.WireguardPeerList)

UpdatePeers updates the configuration of the wireguard interfaces to match the given list of peers

Jump to

Keyboard shortcuts

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