summaryrefslogtreecommitdiff
path: root/pkg/backend/api.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/backend/api.go')
-rw-r--r--pkg/backend/api.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/pkg/backend/api.go b/pkg/backend/api.go
index f63962c..0cab17f 100644
--- a/pkg/backend/api.go
+++ b/pkg/backend/api.go
@@ -6,6 +6,7 @@ import (
"C"
"fmt"
"log"
+ "strconv"
"unsafe"
"0xacab.org/leap/bitmask-vpn/pkg/bitmask"
@@ -76,8 +77,12 @@ func EnableMockBackend() {
go enableMockBackend()
}
-func EnableWebAPI() {
- go enableWebAPI()
+func EnableWebAPI(port string) {
+ intPort, err := strconv.Atoi(port)
+ if err != nil {
+ log.Fatal("Cannot parse port", port)
+ }
+ go enableWebAPI(intPort)
}
/* these two are a bit redundant since we already add them to ctx. however, we