vpn

package
v0.12.18 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2023 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UnknownDnsManagementErr = errors.New("unknown dns management")

Functions

func DnsDetect added in v0.12.16

func DnsDetect() (daemonStorage.LocalDnsManagement, error)

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,

) *Handler

func (*Handler) DnsClean added in v0.12.16

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

func (*Handler) ReloadVpn

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