Skip to content
Snippets Groups Projects
Verified Commit 8382f3b1 authored by meskio's avatar meskio :tent:
Browse files

[feat] configure the zmq bitmask endpoint per platform

Windows uses tcp and linux/darwin uses a local socket.
parent 5556a15e
No related branches found
No related tags found
1 merge request!14[feat] configure the zmq bitmask endpoint per platform
......@@ -18,4 +18,6 @@ package bitmask
import "os"
const coreEndpoint = "ipc:///var/tmp/bitmask.core.sock"
var ConfigPath = os.Getenv("HOME") + "/Library/Preferences/leap"
......@@ -18,7 +18,6 @@ package bitmask
import (
"encoding/json"
"errors"
"fmt"
"log"
"time"
......@@ -26,9 +25,7 @@ import (
)
const (
// On win should be: tcp://127.0.0.1:5001
coreEndpoint = "ipc://%s/bitmask.core.sock"
timeout = time.Second * 15
timeout = time.Second * 15
)
// Bitmask holds the bitmask client data
......@@ -101,7 +98,6 @@ func initCore() (*zmq4.Socket, error) {
return nil, err
}
endpointPwd := "/var/tmp"
err = socket.Connect(fmt.Sprintf(coreEndpoint, endpointPwd))
err = socket.Connect(coreEndpoint)
return socket, err
}
......@@ -18,4 +18,6 @@ package bitmask
import "os"
const coreEndpoint = "ipc:///var/tmp/bitmask.core.sock"
var ConfigPath = os.Getenv("HOME") + "/.config/leap"
......@@ -18,4 +18,6 @@ package bitmask
import "os"
const coreEndpoint = "tcp://127.0.0.1:5001"
var ConfigPath = os.Getenv("APPDATA") + "\\leap"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment