openvpn

package
v0.0.0-...-851e5e8 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: GPL-3.0 Imports: 23 Imported by: 0

Documentation

Overview

Package openvpn provides OpenVPN technology.

Index

Constants

View Source
const (
	InterfaceName = "nordtun"
)

Variables

View Source
var (
	ErrServerVersion = errors.New("invalid openvpn server version")
)

Functions

This section is empty.

Types

type OpenVPN

type OpenVPN struct {

	// sync.Mutex is used all over the place due to how OpenVPN
	// is managed over the management interface.
	// Simple Lock(); defer Unlock() results in deadlocks, since
	// substates updates get stuck waiting for Mutex.
	sync.Mutex
	// contains filtered or unexported fields
}

func New

func New(fwmark uint32) *OpenVPN

func (*OpenVPN) IsActive

func (ovpn *OpenVPN) IsActive() bool

IsActive checks if openvpn process is running

func (*OpenVPN) NetworkChanged

func (ovpn *OpenVPN) NetworkChanged() error

func (*OpenVPN) Start

func (ovpn *OpenVPN) Start(
	creds vpn.Credentials,
	serverData vpn.ServerData,
) error

Start starts openvpn process

func (*OpenVPN) State

func (ovpn *OpenVPN) State() vpn.State

func (*OpenVPN) Stop

func (ovpn *OpenVPN) Stop() error

Stop stops openvpn process

func (*OpenVPN) Tun

func (ovpn *OpenVPN) Tun() tunnel.T

Jump to

Keyboard shortcuts

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