wg

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrIPsMaxedOut error = fmt.Errorf("maximum IPs limit reached")

Functions

func GenIPAddr

func GenIPAddr(offset int, cidr string) (string, error)

func GeneratePublicKey

func GeneratePublicKey(privateKey string) ([]byte, error)

func GenerateWgKeys

func GenerateWgKeys() ([]byte, []byte, error)

func Ptr

func Ptr[T any](t T) *T

Types

type Client

type Client interface {
	Sync(conf []byte) error
	Stop() error
}

func NewClient

func NewClient(ifName string) (Client, error)

Jump to

Keyboard shortcuts

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