network

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RandomSubnet

func RandomSubnet(network net.IPNet, prefix int) net.IPNet

Types

type WGDevice

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

func New

func New(name string, port int, privateKey wgtypes.Key) (*WGDevice, error)

func (*WGDevice) AddPeer

func (m *WGDevice) AddPeer(peer types.Peer) error

func (*WGDevice) Ensure

func (d *WGDevice) Ensure() error

func (*WGDevice) InitConfig

func (m *WGDevice) InitConfig() error

func (*WGDevice) Remove

func (m *WGDevice) Remove() error

func (*WGDevice) RemovePeer

func (m *WGDevice) RemovePeer(publicKey wgtypes.Key) error

func (*WGDevice) ReplacePeers

func (m *WGDevice) ReplacePeers(peers []types.Peer) error

func (WGDevice) SetAddr

func (d WGDevice) SetAddr(ipnet net.IPNet) error

Jump to

Keyboard shortcuts

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