vpn

package
v0.12.3 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 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) StartVpn

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

func (*Handler) StatusVpn

func (h *Handler) StatusVpn() (vpnStatus *daemon.VpnStatus)

func (*Handler) StopVpn

func (h *Handler) StopVpn() (_ *daemon.StopVpnResponse, err error)

Jump to

Keyboard shortcuts

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