diff options
author | Ruben Pollan <meskio@sindominio.net> | 2020-09-24 12:24:48 +0200 |
---|---|---|
committer | Ruben Pollan <meskio@sindominio.net> | 2020-09-24 16:50:04 +0200 |
commit | 998b5cb54ad23be1f6df0ee8abd08af5614f38db (patch) | |
tree | aafb1c6f11ba23da120b29170ed712d6a07d5336 /gui/backend.go | |
parent | 3a74c28cce41fe783d9dde707ebb6de941d5cf0a (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.go | 8 |
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) } |