legacy

package
v0.0.0-...-351c999 Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: GPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	On       = "on"
	Off      = "off"
	Starting = "starting"
	Stopping = "stopping"
	Failed   = "failed"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Bitmask3

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

Bitmask3 holds the bitmask client data Bitmask3 implements Bitmask interface (api version v3)

func Init

func Init() (*Bitmask3, error)

Init the connection to bitmask

func (*Bitmask3) CanStartVPN

func (b *Bitmask3) CanStartVPN() bool

func (*Bitmask3) CanUpgrade

func (b *Bitmask3) CanUpgrade() bool

func (*Bitmask3) Close

func (b *Bitmask3) Close()

Close the connection to bitmask, and does cleanup of temporal files

func (*Bitmask3) DoLogin

func (b *Bitmask3) DoLogin(username, password string) (bool, error)

func (*Bitmask3) GetBestLocation

func (b *Bitmask3) GetBestLocation(transport string) string

func (*Bitmask3) GetCurrentCountry

func (b *Bitmask3) GetCurrentCountry() string

func (*Bitmask3) GetCurrentGateway

func (b *Bitmask3) GetCurrentGateway() string

func (*Bitmask3) GetCurrentLocation

func (b *Bitmask3) GetCurrentLocation() string

func (*Bitmask3) GetMotd

func (b *Bitmask3) GetMotd() string

func (*Bitmask3) GetSnowflakeCh

func (b *Bitmask3) GetSnowflakeCh() <-chan *snowflake.StatusEvent

func (*Bitmask3) GetStatus

func (b *Bitmask3) GetStatus() (string, error)

GetStatus returns the VPN status

func (*Bitmask3) GetStatusCh

func (b *Bitmask3) GetStatusCh() <-chan string

GetStatusCh returns a channel that will recieve VPN status changes

func (*Bitmask3) GetTransport

func (b *Bitmask3) GetTransport() string

GetTransport gets the obfuscation transport to use. Only obfs4 available for now.

func (*Bitmask3) InstallHelpers

func (b *Bitmask3) InstallHelpers() error

func (*Bitmask3) IsManualLocation

func (b *Bitmask3) IsManualLocation() bool

func (*Bitmask3) ListLocationFullness

func (b *Bitmask3) ListLocationFullness(transport string) map[string]float64

func (*Bitmask3) ListLocationLabels

func (b *Bitmask3) ListLocationLabels(transport string) map[string][]string

func (*Bitmask3) NeedsCredentials

func (b *Bitmask3) NeedsCredentials() bool

func (*Bitmask3) OffersUDP

func (b *Bitmask3) OffersUDP() bool

func (*Bitmask3) Reconnect

func (b *Bitmask3) Reconnect() error

Reconnect to the VPN

func (*Bitmask3) ReloadFirewall

func (b *Bitmask3) ReloadFirewall() error

ReloadFirewall restarts the firewall

func (*Bitmask3) SetProvider

func (b *Bitmask3) SetProvider(p string)

func (*Bitmask3) SetTransport

func (b *Bitmask3) SetTransport(t string) error

SetTransport selects an obfuscation transport to use

func (*Bitmask3) StartVPN

func (b *Bitmask3) StartVPN(provider string) error

StartVPN for provider

func (*Bitmask3) StopVPN

func (b *Bitmask3) StopVPN() error

StopVPN or cancel

func (*Bitmask3) UseAutomaticGateway

func (b *Bitmask3) UseAutomaticGateway()

UseAutomaticGateway sets the gateway to be selected automatically best gateway will be used

func (*Bitmask3) UseGateway

func (b *Bitmask3) UseGateway(label string)

UseGateway selects a gateway, by label, as the default gateway

func (*Bitmask3) UseSnowflake

func (b *Bitmask3) UseSnowflake(s bool) error

func (*Bitmask3) UseUDP

func (b *Bitmask3) UseUDP(udp bool) error

func (*Bitmask3) VPNCheck

func (b *Bitmask3) VPNCheck() (helpers bool, privilege bool, err error)

VPNCheck returns if the helpers are installed and up to date and if polkit is running

func (*Bitmask3) Version

func (b *Bitmask3) Version() (string, error)

Version gets the bitmask version string

Jump to

Keyboard shortcuts

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