wg

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2021 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AUTH_KEY = "wg"
)

Variables

View Source
var (
	InvalidAuthKey        = errors.New("Invalid Authentication Key")
	InvalidTokenFormatErr = errors.New("Invalid token format")
	MissingKeyErr         = errors.New("No Authentication Key provided")
)

Functions

func InitServer

func InitServer(conf *config.Config) (*wireguard, error)

func SecureConn

func SecureConn(conf *config.Config) ([]grpc.ServerOption, error)

SecureConn enables communication over secure channel

func WireGuardCmd

func WireGuardCmd(cmd string) ([]byte, error)

Types

type Authenticator

type Authenticator interface {
	AuthenticateContext(context.Context) error
}

func NewAuthenticator

func NewAuthenticator(Skey, AKey string) Authenticator

type IPRuleForWG added in v1.0.5

type IPRuleForWG struct {
	WgInterfaceName   string
	HostInterfaceName string
}

type Interface

type Interface struct {
	// contains filtered or unexported fields
}

type Peer

type Peer struct {
	// contains filtered or unexported fields
}

type WGInterface added in v1.0.5

type WGInterface struct {
	Address    string
	ListenPort uint32
	SaveConfig bool
	PrivateKey string
	IPRules    []IPRuleForWG
}

Jump to

Keyboard shortcuts

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