wg

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	UnreachableVPNServiceErr = errors.New("Wireguard service is not running !")
	UnauthorizedErr          = errors.New("Unauthorized attempt to use VPN service ")
	NoTokenErrMsg            = "token contains an invalid number of segments"
	UnauthorizeErrMsg        = "unauthorized"
	AUTH_KEY                 = "wg"
)

Functions

func NewGRPCVPNClient

func NewGRPCVPNClient(wgConn WireGuardConfig) (wgproto.WireguardClient, error)

func TranslateRPCErr

func TranslateRPCErr(err error) error

Types

type Creds

type Creds struct {
	Token    string
	Insecure bool
}

func (Creds) GetRequestMetadata

func (c Creds) GetRequestMetadata(context.Context, ...string) (map[string]string, error)

func (Creds) RequireTransportSecurity

func (c Creds) RequireTransportSecurity() bool

type WireGuardConfig

type WireGuardConfig struct {
	Endpoint string
	Port     uint64
	AuthKey  string
	SignKey  string
	Enabled  bool
	CertFile string
	CertKey  string
	CAFile   string
	Dir      string // client configuration file will reside
}

Jump to

Keyboard shortcuts

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