summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2018-03-02 01:04:09 +0100
committerKali Kaneko <kali@leap.se>2018-03-02 03:54:27 +0100
commit1ddaa515195a69d11f1a76229bda321800dee6ab (patch)
treeea299b829fea0b9ed4cfb3a3b7514b1b1bb19a4b
parent12e68eab9de5fceeaa22f25cfeb21da56069e931 (diff)
[bug] do not use tcp4 version for snaps
-rw-r--r--src/leap/bitmask/vpn/launcher.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/leap/bitmask/vpn/launcher.py b/src/leap/bitmask/vpn/launcher.py
index 48146453..890e1862 100644
--- a/src/leap/bitmask/vpn/launcher.py
+++ b/src/leap/bitmask/vpn/launcher.py
@@ -33,8 +33,7 @@ from leap.bitmask.vpn.utils import force_eval
log = Logger()
-
-flags_STANDALONE = False
+IS_SNAP = os.environ.get('SNAP')
class VPNLauncherException(Exception):
@@ -153,8 +152,12 @@ class VPNLauncher(object):
gateways = remotes
for ip, port in gateways:
- # we're hardcoding tcpv4 for now
- args += ['--remote', ip, port, 'tcp4']
+ # we're hardcoding tcpv4 for now, but that seems to break in
+ # the version of openvpn shipped with the snaps.
+ if IS_SNAP:
+ args += ['--remote', ip, port, 'tcp']
+ else:
+ args += ['--remote', ip, port, 'tcp4']
args += [
'--client',