blob: 1860b091e902bb31a442e7cf2e9e6d9b1227ff6a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
package backend
import (
"log"
)
func startVPN() {
setError("")
err := ctx.bm.StartVPN(ctx.Provider)
if err != nil {
log.Println("ERROR: ", err)
setError(err.Error())
}
}
func stopVPN() {
err := ctx.bm.StopVPN()
if err != nil {
log.Println(err)
}
}
func getGateway() string {
return ctx.bm.GetCurrentGateway()
}
// TODO return bool?
func useTransport(transport string) {
err := ctx.bm.UseTransport(transport)
if err != nil {
log.Println(err)
}
}
|