vpnsetup

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package vpnsetup contains the VPN setup component.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cleanup

func Cleanup(ctx context.Context, vpnDevice string, splitrtConfig *splitrt.Config)

Cleanup cleans up the configuration after a failed shutdown.

Types

type State added in v1.2.0

type State struct {
	SplitRouting *splitrt.State
	DNSProxy     *dnsproxy.State
}

State is the internal state of the VPN Setup.

type VPNSetup

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

VPNSetup sets up the configuration of the vpn tunnel that belongs to the current VPN connection.

func NewVPNSetup

func NewVPNSetup(
	dnsProxyConfig *dnsproxy.Config,
	splitrtConfig *splitrt.Config,
) *VPNSetup

NewVPNSetup returns a new VPNSetup.

func (*VPNSetup) GetState added in v1.2.0

func (v *VPNSetup) GetState() *State

GetState returns the internal state of the VPN config.

func (*VPNSetup) Setup

func (v *VPNSetup) Setup(vpnconfig *vpnconfig.Config)

Setup sets the VPN config up.

func (*VPNSetup) Start

func (v *VPNSetup) Start()

Start starts the VPN setup.

func (*VPNSetup) Stop

func (v *VPNSetup) Stop()

Stop stops the VPN setup.

func (*VPNSetup) Teardown

func (v *VPNSetup) Teardown(vpnconfig *vpnconfig.Config)

Teardown tears the VPN config down.

Jump to

Keyboard shortcuts

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