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 Bitmask

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

    Bitmask holds the bitmask client data

    func Init

    func Init() (*Bitmask, error)

      Init the connection to bitmask

      func (*Bitmask) CanStartVPN

      func (b *Bitmask) CanStartVPN() bool

      func (*Bitmask) Close

      func (b *Bitmask) Close()

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

        func (*Bitmask) DoLogin

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

        func (*Bitmask) GetStatus

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

          GetStatus returns the VPN status

          func (*Bitmask) GetStatusCh

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

            GetStatusCh returns a channel that will recieve VPN status changes

            func (*Bitmask) InstallHelpers

            func (b *Bitmask) InstallHelpers() error

            func (*Bitmask) ListGateways

            func (b *Bitmask) ListGateways(provider string) ([]string, error)

              ListGateways return the names of the gateways

              func (*Bitmask) NeedsCredentials

              func (b *Bitmask) NeedsCredentials() bool

              func (*Bitmask) ReloadFirewall

              func (b *Bitmask) ReloadFirewall() error

                ReloadFirewall restarts the firewall

                func (*Bitmask) StartVPN

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

                  StartVPN for provider

                  func (*Bitmask) StopVPN

                  func (b *Bitmask) StopVPN() error

                    StopVPN or cancel

                    func (*Bitmask) UseGateway

                    func (b *Bitmask) UseGateway(name string) error

                      UseGateway selects name as the default gateway

                      func (*Bitmask) UseTransport

                      func (b *Bitmask) UseTransport(transport string) error

                        UseTransport selects an obfuscation transport to use

                        func (*Bitmask) VPNCheck

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

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

                          func (*Bitmask) Version

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

                            Version gets the bitmask version string

                            Directories

                            Path Synopsis