summaryrefslogtreecommitdiff
path: root/bitmask_go/launcher_linux.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/launcher_linux.go
parentd4f013fee611299aea7f8cfff0377ba8646ba17d (diff)
[feat] get openvpn args/gateways from the eip-service.json
Diffstat (limited to 'bitmask_go/launcher_linux.go')
-rw-r--r--bitmask_go/launcher_linux.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/bitmask_go/launcher_linux.go b/bitmask_go/launcher_linux.go
index 6a1407c..12bd1cb 100644
--- a/bitmask_go/launcher_linux.go
+++ b/bitmask_go/launcher_linux.go
@@ -58,10 +58,12 @@ func (l *launcher) openvpnStop() error {
return runBitmaskRoot("openvpn", "stop")
}
-func (l *launcher) firewallStart(gateways []string) error {
+func (l *launcher) firewallStart(gateways []gateway) error {
log.Println("firewall start")
arg := []string{"firewall", "start"}
- arg = append(arg, gateways...)
+ for _, gw := range gateways {
+ arg = append(arg, gw.IPAddress)
+ }
return runBitmaskRoot(arg...)
}