client

package
v1.26.4 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuthControlFileEnvKey      = "auth_control_file"
	AuthPendingFileEnvKey      = "auth_pending_file"
	AuthFailedReasonFileEnvKey = "auth_failed_reason_file"
)

Variables

View Source
var (
	ErrAuthControlFileNotSet = errors.New("auth_control_file not set")
	ErrAuthPendingFileNotSet = errors.New("auth_pending_file not set")
)

Functions

This section is empty.

Types

type Client

type Client struct {
	AuthFailedReasonFile string
	AuthPendingFile      string
	AuthControlFile      string
	ClientConfig         string

	ClientID uint64 // A unique identifier for the client
	// contains filtered or unexported fields
}

func NewClient

func NewClient(clientID uint64, envArray util.List) (*Client, error)

func (*Client) GetConnectMessage

func (c *Client) GetConnectMessage() string

func (*Client) GetDisconnectMessage

func (c *Client) GetDisconnectMessage() string

func (*Client) WriteAuthPending

func (c *Client) WriteAuthPending(resp *management.Response) error

WriteAuthPending writes the auth_pending_file can be written, which causes the openvpn server to send a pending auth request to the client. See doc/management.txt for more details on this authentication mechanism. The format of the auth_pending_file is line 1: timeout in seconds line 2: Pending auth method the client needs to support (e.g. webauth) line 3: EXTRA (e.g. WEB_AUTH::http://www.example.com)

func (*Client) WriteToAuthFile

func (c *Client) WriteToAuthFile(auth string) error

Jump to

Keyboard shortcuts

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