Documentation
¶
Index ¶
- Constants
- func CheckAuth(handler http.HandlerFunc, token string) http.HandlerFunc
- func DonateAccepted()
- func DonateSeen()
- func EnableMockBackend()
- func EnableWebAPI(port string)
- func FetchProviderOptsFromRemote(providerURL string) string
- func GetTransport() *C.char
- func GetVersion() *C.char
- func InitializeBitmaskContext(opts *InitOpts)
- func InstallHelpers()
- func IsProviderURI(provider string) bool
- func Login(username, password string)
- func Quit()
- func RefreshContext() *C.char
- func ResetError(errname string)
- func ResetNotification(label string)
- func SetSnowflake(snowflake bool)
- func SetTransport(label string)
- func SetUDP(udp bool)
- func SubscribeToEvent(event string, f unsafe.Pointer)
- func SwitchOff()
- func SwitchOn()
- func UseAutomaticGateway()
- func UseLocation(label string)
- type Events
- type InitOpts
- type Providers
Constants ¶
View Source
const OnStatusChanged string = "OnStatusChanged"
Variables ¶
This section is empty.
Functions ¶
func CheckAuth ¶
func CheckAuth(handler http.HandlerFunc, token string) http.HandlerFunc
func DonateAccepted ¶
func DonateAccepted()
func DonateSeen ¶
func DonateSeen()
func EnableMockBackend ¶
func EnableMockBackend()
func InstallHelpers ¶
func InstallHelpers()
func Quit ¶
func Quit()
func SwitchOff ¶
func SwitchOff()
func SwitchOn ¶
func SwitchOn()
func UseAutomaticGateway ¶
func UseAutomaticGateway()
Types ¶
type Events ¶
type Events struct {
OnStatusChanged string
}
Events are just a enumeration of all the posible events that C functions can be interested in subscribing to. You cannot subscribe to an event that is not listed here.
type InitOpts ¶
type InitOpts struct { ProviderOptions *bitmask.ProviderOpts SkipLaunch bool Obfs4 bool UDP bool DisableAutostart bool StartVPN string AvailableProviders []string }
func InitOptsFromJSON ¶
InitOptsFromJSON initializes the provider configuration (InitOpts) struct. It is called by the c++ code during startup. There is hardcoded provider information from the binary (providersJSON). And there are dynamic provider configurations saved on disk (loaded by appendOnDiskProviders function).
type Providers ¶
type Providers struct { Default string `json:"default"` Data []bitmask.ProviderOpts `json:"providers"` }
Source Files
¶
- actions.go
- api.go
- auth.go
- callbacks.go
- donate.go
- gatewaychecker.go
- init.go
- mocks.go
- provider.go
- status.go
- webapi.go
Click to show internal directories.
Click to hide internal directories.