blob: 9d12f85927c1efd3d89c391c03cb44fc67edd2c2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
package bitmask
// StartVPN for provider
func (b *Bitmask) StartVPN(provider string) error {
_, err := b.send("vpn", "start", provider)
return err
}
// StopVPN or cancel
func (b *Bitmask) StopVPN() error {
_, err := b.send("vpn", "stop")
return err
}
// GetStatus returns the VPN status
func (b *Bitmask) GetStatus() (string, error) {
res, err := b.send("vpn", "status")
if err != nil {
return "", err
}
return res["status"].(string), nil
}
|