summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/vpn
diff options
context:
space:
mode:
authorKali Kaneko (leap communications) <kali@leap.se>2017-02-01 17:29:22 +0100
committerKali Kaneko (leap communications) <kali@leap.se>2017-02-23 00:40:34 +0100
commit9551ff71ce976f04e98f1c19c667bc5f9f402ae9 (patch)
treefe0319627f3394f0d4da5f5a0cbc63b37ee539f4 /src/leap/bitmask/vpn
parentb509a5f353f706fab31189b352d6ffa24bd1c3e5 (diff)
[bug] fix parsing of vpn status
Diffstat (limited to 'src/leap/bitmask/vpn')
-rw-r--r--src/leap/bitmask/vpn/_management.py5
-rw-r--r--src/leap/bitmask/vpn/_observer.py2
-rw-r--r--src/leap/bitmask/vpn/launcher.py8
-rw-r--r--src/leap/bitmask/vpn/service.py6
4 files changed, 12 insertions, 9 deletions
diff --git a/src/leap/bitmask/vpn/_management.py b/src/leap/bitmask/vpn/_management.py
index 9ae90118..920bd9d1 100644
--- a/src/leap/bitmask/vpn/_management.py
+++ b/src/leap/bitmask/vpn/_management.py
@@ -241,7 +241,10 @@ class VPNManagement(object):
parts = stripped.split(",")
if len(parts) < 5:
continue
- ts, status_step, ok, ip, remote = parts
+ try:
+ ts, status_step, ok, ip, remote, port, _, _, _ = parts
+ except ValueError:
+ ts, status_step, ok, ip, remote, port, _, _ = parts
state = status_step
if state != self._last_state:
diff --git a/src/leap/bitmask/vpn/_observer.py b/src/leap/bitmask/vpn/_observer.py
index 1bb363d6..c50a50d9 100644
--- a/src/leap/bitmask/vpn/_observer.py
+++ b/src/leap/bitmask/vpn/_observer.py
@@ -1,3 +1,4 @@
+from itertools import chain, repeat
from twisted.logger import Logger
logger = Logger()
@@ -70,4 +71,3 @@ class VPNObserver(object):
"initialization_completed": sig.eip_connected
}
return signals.get(event.lower())
-
diff --git a/src/leap/bitmask/vpn/launcher.py b/src/leap/bitmask/vpn/launcher.py
index c0495968..b8691326 100644
--- a/src/leap/bitmask/vpn/launcher.py
+++ b/src/leap/bitmask/vpn/launcher.py
@@ -220,7 +220,7 @@ class VPNLauncher(object):
args += [
'--client',
- '--dev', 'tun',
+ '--dev', ' tun',
'--persist-key',
'--tls-client',
'--remote-cert-tls',
@@ -262,9 +262,9 @@ class VPNLauncher(object):
'--ca', providerconfig.get_ca_cert_path()
]
- args += [
- '--ping', '10',
- '--ping-restart', '30']
+ #args += [
+ # '--ping', '10',
+ # '--ping-restart', '30']
command_and_args = [openvpn_path] + args
return command_and_args
diff --git a/src/leap/bitmask/vpn/service.py b/src/leap/bitmask/vpn/service.py
index 59e251da..3550b4b7 100644
--- a/src/leap/bitmask/vpn/service.py
+++ b/src/leap/bitmask/vpn/service.py
@@ -103,11 +103,12 @@ class EIPService(HookableService):
:param provider: the provider to use, e.g. 'demo.bitmask.net'
:type provider: str"""
+
# FIXME
# XXX picked manually from eip-service.json
remotes = (
- ("198.252.153.84", "1194 "),
- ("46.165.242.169", "1194 "),
+ ("198.252.153.84", "1194"),
+ ("46.165.242.169", "1194"),
)
prefix = os.path.join(self._basepath,
@@ -122,7 +123,6 @@ class EIPService(HookableService):
"cipher": "AES-128-CBC",
"keepalive": "10 30",
"tls-cipher": "DHE-RSA-AES128-SHA",
- "tun-ipv6": "true",
}
self._eip = EIPManager(remotes, cert_path, key_path, ca_path,