wg

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PersistentKeepaliveInterval = 25 * time.Second
	DefaultWireguardPort        = 19070
)

Variables

This section is empty.

Functions

This section is empty.

Types

type WireguardDevice

type WireguardDevice interface {
	runnable.Runnable
	DeviceName() string
}

func NewWireguardDevice

func NewWireguardDevice(cfg WireguardDeviceConfig) WireguardDevice

type WireguardDeviceConfig

type WireguardDeviceConfig struct {
	Peer       WireguardDevicePeer
	PrivateKey wgtypes.Key
	ListenPort int
	Address    netip.Addr
}

type WireguardDevicePeer

type WireguardDevicePeer struct {
	Endpoint   netip.AddrPort
	PublicKey  wgtypes.Key
	AllowedIPs []netip.Prefix
}

Jump to

Keyboard shortcuts

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