summaryrefslogtreecommitdiff
path: root/gui/backend.go
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2020-09-24 12:24:48 +0200
committerRuben Pollan <meskio@sindominio.net>2020-09-24 16:50:04 +0200
commit998b5cb54ad23be1f6df0ee8abd08af5614f38db (patch)
treeaafb1c6f11ba23da120b29170ed712d6a07d5336 /gui/backend.go
parent3a74c28cce41fe783d9dde707ebb6de941d5cf0a (diff)
[feat] send cmd flags to the go backend
Also disable autostart if manual quit, remove custom printer that was used for i18n and disable previous autostart if -disable-autostart We didn't disable autostart after the migration to qt. - Resolves: #355 #289
Diffstat (limited to 'gui/backend.go')
-rw-r--r--gui/backend.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/gui/backend.go b/gui/backend.go
index 7632bb4..92fbb97 100644
--- a/gui/backend.go
+++ b/gui/backend.go
@@ -53,9 +53,15 @@ func SubscribeToEvent(event string, f unsafe.Pointer) {
}
//export InitializeBitmaskContext
-func InitializeBitmaskContext(provider string, jsonPtr unsafe.Pointer, jsonLen C.int) {
+func InitializeBitmaskContext(provider string,
+ jsonPtr unsafe.Pointer, jsonLen C.int,
+ obfs4 bool, disableAutostart bool, startVPN string) {
+
json := C.GoBytes(jsonPtr, jsonLen)
opts := backend.InitOptsFromJSON(provider, string(json))
+ opts.Obfs4 = obfs4
+ opts.DisableAutostart = disableAutostart
+ opts.StartVPN = startVPN
backend.InitializeBitmaskContext(opts)
}