summaryrefslogtreecommitdiff
path: root/bitmask_go/main.go
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2018-06-13 20:48:27 +0200
committerRuben Pollan <meskio@sindominio.net>2018-06-20 12:18:17 +0200
commit37413f5eb2b8d4719c959db03874cc9bcc362ddc (patch)
treebd14bf1489da7b0da030015d2d9ff112c1b2b833 /bitmask_go/main.go
parentd4f013fee611299aea7f8cfff0377ba8646ba17d (diff)
[feat] get openvpn args/gateways from the eip-service.json
Diffstat (limited to 'bitmask_go/main.go')
-rw-r--r--bitmask_go/main.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/bitmask_go/main.go b/bitmask_go/main.go
index 6b60d43..fee4a42 100644
--- a/bitmask_go/main.go
+++ b/bitmask_go/main.go
@@ -28,6 +28,7 @@ type Bitmask struct {
tempdir string
statusCh chan string
managementClient *openvpn.MgmtClient
+ bonafide *bonafide
launch *launcher
}
@@ -38,15 +39,16 @@ func Init() (*Bitmask, error) {
if err != nil {
return nil, err
}
+ bonafide := newBonafide()
launch := newLauncher()
- b := Bitmask{tempdir, statusCh, nil, launch}
+ b := Bitmask{tempdir, statusCh, nil, bonafide, launch}
err = b.StopVPN()
if err != nil {
return nil, err
}
- cert, err := getCertPem()
+ cert, err := b.bonafide.getCertPem()
if err != nil {
return nil, err
}