router

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2022 License: BSD-3-Clause Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddPeer

func AddPeer(public wgtypes.Key, username string) (string, error)

AddPeer the device to wireguard

func Deauthenticate

func Deauthenticate(address string) error

func GetAllAuthorised

func GetAllAuthorised() ([]string, error)

func GetPeerRealIp

func GetPeerRealIp(address string) (string, error)

func GetRules

func GetRules() (map[string]description, error)

func GetTimeStamp

func GetTimeStamp() uint64

func IsAuthed

func IsAuthed(address string) bool

func RefreshConfiguration

func RefreshConfiguration() []error

func RemovePeer

func RemovePeer(internalAddress string) error

func ServerDetails

func ServerDetails() (key wgtypes.Key, port int, err error)

func SetAuthorized

func SetAuthorized(internalAddress string) error

func Setup

func Setup(error chan<- error) (err error)

func TearDown

func TearDown()

Types

type Key

type Key struct {

	// first member must be a prefix u32 wide
	// rest can are arbitrary
	Prefixlen uint32
	IP        net.IP
}

func (Key) Bytes

func (l Key) Bytes() []byte

func (Key) String

func (l Key) String() string

func (*Key) Unpack

func (l *Key) Unpack(b []byte) error

Jump to

Keyboard shortcuts

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