config

package
v0.0.0-...-9223259 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2024 License: BSD-2-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GeneratePeerIni

func GeneratePeerIni(peer Peer, ip string) string

GeneratePeerIni generates an INI-formatted string for a single Peer configuration

Types

type Interface

type Interface struct {
	PublicKey  string
	PrivateKey string
	Address    string
	Endpoint   string
	ListenPort string
	Mask       string
}

Define the structure for the configuration

type Peer

type Peer struct {
	PublicKey           string
	AllowedIPs          string
	Endpoint            string
	IsGateway           bool
	PersistentKeepalive string
}

type WireGuardConfig

type WireGuardConfig struct {
	Interface
	Peers []Peer
}

func ReadWireGuardConfig

func ReadWireGuardConfig(filename string) (*WireGuardConfig, error)

Jump to

Keyboard shortcuts

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