openvpn

package
v0.0.0-...-19a9ac9 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrVersionTooShort = errors.New("version output is too short")
View Source
var ErrVersionUnknown = errors.New("OpenVPN version is unknown")

Functions

This section is empty.

Types

type Configurator

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

func New

func New(logger Infoer, cmder command.RunStarter,
	puid, pgid int) *Configurator

func (*Configurator) Version25

func (c *Configurator) Version25(ctx context.Context) (version string, err error)

func (*Configurator) Version26

func (c *Configurator) Version26(ctx context.Context) (version string, err error)

func (*Configurator) WriteAskPassFile

func (c *Configurator) WriteAskPassFile(passphrase string) error

WriteAskPassFile writes the OpenVPN askpass file to disk with the right permissions.

func (*Configurator) WriteAuthFile

func (c *Configurator) WriteAuthFile(user, password string) error

WriteAuthFile writes the OpenVPN auth file to disk with the right permissions.

func (*Configurator) WriteConfig

func (c *Configurator) WriteConfig(lines []string) error

type Infoer

type Infoer interface {
	Info(s string)
}

type Logger

type Logger interface {
	Debug(s string)
	Infoer
	Warn(s string)
	Error(s string)
}

type Runner

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

func NewRunner

func NewRunner(settings settings.OpenVPN, starter command.Starter,
	logger Logger) *Runner

func (*Runner) Run

func (r *Runner) Run(ctx context.Context, errCh chan<- error, ready chan<- struct{})

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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