vpn

package
v0.12.9 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2022 License: MIT Imports: 27 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 {
	VpnCheckInterval   time.Duration
	VpnCheckRetryCount int
	VpnCheckTimeout    time.Duration
}

type Handler

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

func New

func New(
	config Config,
	logger logger.Logger,
	daemonStorage *daemonStorage.Handler,
	dnsServer *dnsServer.Handler,

) *Handler

func (*Handler) ReloadVpn added in v0.12.8

func (h *Handler) ReloadVpn(
	ctx context.Context,
) (err error)

func (*Handler) StartVpn

func (h *Handler) StartVpn(
	ctx context.Context,
	grpcApiAddress string,
	grpcVpnAddress string,
	token string,
	projectId string,
	userId string,
	mtu uint32,
	caCertificateUrl string,
	preferredPortMin uint32,
	preferredPortMax uint32,
) (err error)

func (*Handler) StatusVpn

func (h *Handler) StatusVpn(ctx context.Context) (*daemon.VpnStatus, error)

func (*Handler) StopVpn

func (h *Handler) StopVpn(ctx context.Context) error

Jump to

Keyboard shortcuts

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