summaryrefslogtreecommitdiff
path: root/pkg/backend/actions.go
blob: 9e0941b61e957ead78861dc035abe8bb7bf271a3 (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
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()
}

func setTransport(t string) {
	err := ctx.bm.SetTransport(t)
	if err != nil {
		log.Println(err)
	}
}