openvpn

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBService

type DBService interface {
	SetNameBucket(name string)
	GetValueFromBucket(key string) error
	ReOpen() error
	Message() []entity.Message
}

type DnsManager

type DnsManager interface {
	SetupDns(key string) error
	ConfigureDns(key string)
	AddDnsAddrs(s string)
}

type Logger

type Logger interface {
	Fatal(...interface{})
	Debugf(string, ...interface{})
	Fatalf(string, ...interface{})
	Info(...interface{})
}

type ProfileCore

type ProfileCore interface {
	CheckUseCfgFile() bool
	GetProfileFromCache(cfg string) entity.Profile
	SearchFileAbsolutePath(file string) (*string, error)
	SaveProfileWithoutCfgFile(cfg string) error
	SaveProfileWithCfgFile(cfg string) error
}

type TransportOvpnClient

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

func New

func New(
	configsPath string, core core,
	pcore ProfileCore, dnsManager DnsManager,
	l Logger, db DBService, s sessionService, n notiferService,
) *TransportOvpnClient

func (*TransportOvpnClient) Connect

func (t *TransportOvpnClient) Connect(cfgName string)

func (*TransportOvpnClient) Context

func (t *TransportOvpnClient) Context() context.Context

func (*TransportOvpnClient) Disconnect

func (t *TransportOvpnClient) Disconnect()

func (*TransportOvpnClient) SetContext

func (t *TransportOvpnClient) SetContext(ctx context.Context)

Jump to

Keyboard shortcuts

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