diff options
author | Ruben Pollan <meskio@sindominio.net> | 2018-01-19 19:51:03 +0100 |
---|---|---|
committer | Ruben Pollan <meskio@sindominio.net> | 2018-01-19 19:51:03 +0100 |
commit | 96a892f8400bc60a3a4021d7783776e2315036ba (patch) | |
tree | 50c3129c7d8a8724c6233a644de09b050bf265ac /main.go | |
parent | 56b9c951111a4627cd5d9f5d8e72623a0c8ecb57 (diff) |
[feat] implement bitmask.core zmq comunication
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 41 |
1 files changed, 11 insertions, 30 deletions
@@ -1,40 +1,21 @@ package main import ( - "time" + "log" + + "0xacab.org/meskio/bitmask-systray/bitmask" ) -var ch chan string +const ( + provider = "demo.bitmask.net" +) func main() { go notificate() - ch = make(chan string) - run(ch) -} - -func startVPN() { - go func() { - ch <- "starting" - time.Sleep(time.Second * 5) - ch <- "on" - }() -} - -func cancelVPN() { - go func() { - ch <- "stopping" - time.Sleep(time.Second * 5) - ch <- "off" - }() -} - -func stopVPN() { - go func() { - ch <- "failed" - }() -} - -func getVPNStatus() string { - return "off" + b, err := bitmask.Init() + if err != nil { + log.Fatal(err) + } + run(b) } |