View Source
const OnStatusChanged string = "OnStatusChanged"


This section is empty.


func CheckAuth

func CheckAuth(handler http.HandlerFunc, token string) http.HandlerFunc

func DonateAccepted

func DonateAccepted()

func EnableMockBackend

func EnableMockBackend()

func EnableWebAPI

func EnableWebAPI(port string)

func GetVersion

func GetVersion() *C.char

func InitializeBitmaskContext

func InitializeBitmaskContext(opts *InitOpts)

func InstallHelpers

func InstallHelpers()

func Login

func Login(username, password string)

func Quit

func Quit()

func RefreshContext

func RefreshContext() *C.char

func ResetError

func ResetError(errname string)

func ResetNotification

func ResetNotification(label string)

func SubscribeToEvent

func SubscribeToEvent(event string, f unsafe.Pointer)

func SwitchOff

func SwitchOff()

func SwitchOn

func SwitchOn()


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
    	DisableAutostart bool
    	StartVPN         string

    func InitOptsFromJSON

    func InitOptsFromJSON(provider, providersJSON string) *InitOpts

    type Providers

    type Providers struct {
    	Default string                 `json:"default"`
    	Data    []bitmask.ProviderOpts `json:"providers"`