openvpn

package
v1.13.2 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTimeout              = errors.New("timeout")
	ErrEmptyResponse        = errors.New("empty response")
	ErrUnknownProtocol      = errors.New("unknown protocol")
	ErrInvalidPassword      = errors.New("invalid password")
	ErrErrorResponse        = errors.New("error response")
	ErrConnectionTerminated = errors.New("OpenVPN management interface connection terminated")
)

Functions

This section is empty.

Types

type Client added in v1.0.0

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

func NewClient added in v1.0.0

func NewClient(logger *slog.Logger, conf config.Config, oauth2Client *oauth2.Provider) *Client

func (*Client) AcceptClient added in v1.8.0

func (c *Client) AcceptClient(logger *slog.Logger, client state.ClientIdentifier, username string)

func (*Client) Connect added in v1.0.0

func (c *Client) Connect() error

func (*Client) DenyClient added in v1.8.0

func (c *Client) DenyClient(logger *slog.Logger, client state.ClientIdentifier, reason string)

func (*Client) SendCommand added in v1.0.0

func (c *Client) SendCommand(cmd string) (string, error)

SendCommand passes command to a given connection (adds logging and EOL character) and returns the response.

func (*Client) SendCommandf added in v1.6.0

func (c *Client) SendCommandf(format string, a ...any) (string, error)

SendCommandf passes command to a given connection (adds logging and EOL character) and returns the response.

func (*Client) Shutdown added in v1.3.0

func (c *Client) Shutdown()

Shutdown shutdowns the client connection.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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