wgnet

package
v0.0.0-...-eb4ca66 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Interface Interface
	Peers     []Peer
}

func (*Config) Instantiate

func (c *Config) Instantiate(ctx context.Context) (*netstack.Net, error)

func (*Config) ToUAPI

func (c *Config) ToUAPI() (string, error)

type Interface

type Interface struct {
	PrivateKey   Key
	ListenPort   uint16
	FirewallMark uint32
	Address      []net.IP
	DNS          []net.IP
	MTU          uint16
}

type Key

type Key [32]byte

type Peer

type Peer struct {
	PublicKey           Key
	PresharedKey        Key
	AllowedIPs          []net.IPNet
	Endpoint            *net.UDPAddr
	PersistentKeepalive uint16
}

Jump to

Keyboard shortcuts

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