wireguardconf

package module
v0.0.0-...-9025384 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface struct {
	Address    netip.Addr
	Mask       int
	ListenPort int
	PrivateKey string
	PublicKey  string
	MTU        string
}

type Peer

type Peer struct {
	Comment      string
	PrivateKey   string
	PublicKey    string
	PresharedKey string
	AllowedIP    netip.Addr
	Mask         int
}

type Wireguard

type Wireguard struct {
	Filename  string
	Interface Interface
	Peers     []Peer
}

func New

func New(fname string) *Wireguard

func (*Wireguard) Add

func (wg *Wireguard) Add(comment string) (*Peer, error)

func (*Wireguard) Append

func (wg *Wireguard) Append(peer *Peer) error

func (*Wireguard) Load

func (wg *Wireguard) Load() error

Jump to

Keyboard shortcuts

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