bitmask

package
v0.0.0-...-ea310c2 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2024 License: GPL-3.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigureProvider

func ConfigureProvider(opts *ProviderOpts)

func GenerateAuthToken

func GenerateAuthToken()

func InitializeLogger

func InitializeLogger()

func ReadAuthToken

func ReadAuthToken() string

Types

type Autostart

type Autostart interface {
	Disable() error
	Enable() error
}

Autostart holds the functions to enable and disable the application autostart

func NewAutostart

func NewAutostart(appName string, iconPath string) Autostart

NewAutostart creates a handler for the autostart of your platform

type Bitmask

type Bitmask interface {
	GetStatusCh() <-chan string
	GetSnowflakeCh() <-chan *snowflake.StatusEvent
	Close()
	Version() (string, error)
	StartVPN(provider string) error
	CanStartVPN() bool
	StopVPN() error
	Reconnect() error
	ReloadFirewall() error
	GetStatus() (string, error)
	InstallHelpers() error
	VPNCheck() (helpers bool, priviledge bool, err error)
	ListLocationFullness(protocol string) map[string]float64
	ListLocationLabels(protocol string) map[string][]string
	GetBestLocation(protocol string) string
	UseGateway(name string)
	UseAutomaticGateway()
	SetProvider(string)
	GetTransport() string
	SetTransport(string) error
	UseUDP(bool) error
	UseSnowflake(bool) error
	OffersUDP() bool
	GetCurrentGateway() string
	GetCurrentLocation() string
	GetCurrentCountry() string
	IsManualLocation() bool
	NeedsCredentials() bool
	DoLogin(username, password string) (bool, error)
	CanUpgrade() bool
	GetMotd() string
}

func InitializeBitmask

func InitializeBitmask(conf *config.Config) (Bitmask, error)

type DummyAutostart

type DummyAutostart struct{}

func (*DummyAutostart) Disable

func (a *DummyAutostart) Disable() error

func (*DummyAutostart) Enable

func (a *DummyAutostart) Enable() error

type ProviderInfo

type ProviderInfo struct {
	Provider string
	AppName  string
}

func GetConfiguredProvider

func GetConfiguredProvider() *ProviderInfo

type ProviderOpts

type ProviderOpts struct {
	Provider        string `json:"name"`
	AppName         string `json:"applicationName"`
	BinaryName      string `json:"binaryName"`
	Auth            string `json:"auth"`
	AuthEmptyPass   bool   `json:"authEmptyPass"`
	ProviderURL     string `json:"providerURL"`
	DonateURL       string `json:"donateURL"`
	ApiURL          string `json:"apiURL"`
	TosURL          string `json:"tosURL"`
	HelpURL         string `json:"helpURL"`
	GeolocationURL  string `json:"geolocationAPI"`
	AskForDonations bool   `json:"askForDonations"`
	CaCert          string `json:"caCertString"`
}

Jump to

Keyboard shortcuts

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