bitmask

package
v0.0.0-...-dc7f2ee Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2026 License: GPL-3.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigureProvider

func ConfigureProvider(opts *ProviderOpts)

Types

type Bitmask

type Bitmask interface {
	GetStatusCh() <-chan string
	GetStatusCloseCh() chan int
	GetSnowflakeCh() <-chan *snowflake.StatusEvent
	Close()
	Version() (string, error)
	StartVPN(provider string) error
	CanStartVPN() bool
	StopVPN() error
	Reconnect() error
	GetStatus() (string, error)
	VPNCheck() (helpers bool, priviledge bool, err error)
	GetLocationQualityMap(protocol string) map[string]float64
	GetLocationLabels(protocol string) map[string][]string
	GetBestLocation(protocol string) string
	UseGateway(name string)
	UseAutomaticGateway()
	SetProvider(string)
	GetTransport() string
	SetTransport(string) error
	UseUDP(bool)
	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
	OffersObfs4() bool
	OffersQUIC() bool
	OffersKCP() bool
	OffersHopping() bool
}

func InitializeBitmask

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

type ProviderInfo

type ProviderInfo struct {
	Provider string
	AppName  string
}

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"`
	APIVersion           int      `json:"apiVersion"`
	STUNServers          []string `json:"STUNServers"`
	CountryCodeLookupURL string   `json:"countryCodeLookupURL"`
}

Source Files

  • init.go
  • interface.go

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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