custom

package
v0.0.0-...-61b053f Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrExtractData = errors.New("failed extracting information from custom configuration file")
View Source
var ErrVPNTypeNotSupported = errors.New("VPN type not supported for custom provider")

Functions

This section is empty.

Types

type Extractor

type Extractor interface {
	Data(filepath string) (lines []string,
		connection models.Connection, err error)
}

type Provider

type Provider struct {
	common.Fetcher
	// contains filtered or unexported fields
}

func New

func New(extractor Extractor) *Provider

func (*Provider) GetConnection

func (p *Provider) GetConnection(selection settings.ServerSelection, _ bool) (
	connection models.Connection, err error,
)

GetConnection gets the connection from the OpenVPN configuration file.

func (*Provider) Name

func (p *Provider) Name() string

func (*Provider) OpenVPNConfig

func (p *Provider) OpenVPNConfig(connection models.Connection,
	settings settings.OpenVPN, ipv6Supported bool,
) (lines []string)

Jump to

Keyboard shortcuts

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