summaryrefslogtreecommitdiff
path: root/gui/backend.go
diff options
context:
space:
mode:
Diffstat (limited to 'gui/backend.go')
-rw-r--r--gui/backend.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/gui/backend.go b/gui/backend.go
index 5fa6134..a1dafe8 100644
--- a/gui/backend.go
+++ b/gui/backend.go
@@ -7,6 +7,7 @@ package main
import (
"C"
+ "log"
"unsafe"
"0xacab.org/leap/bitmask-vpn/pkg/backend"
@@ -53,8 +54,11 @@ func SubscribeToEvent(event string, f unsafe.Pointer) {
}
//export InitializeBitmaskContext
-func InitializeBitmaskContext() {
- opts := &backend.InitOpts{}
+func InitializeBitmaskContext(provider string, jsonPtr unsafe.Pointer, jsonLen C.int) {
+ log.Println("DEBUG: provider=", provider)
+ json := C.GoBytes(jsonPtr, jsonLen)
+ log.Println("DEBUG: json=", string(json))
+ opts := backend.InitOptsFromJSON(provider, string(json))
backend.InitializeBitmaskContext(opts)
}