diff options
author | Kali Kaneko <kali@leap.se> | 2017-06-08 15:36:37 -0700 |
---|---|---|
committer | Kali Kaneko (leap communications) <kali@leap.se> | 2017-06-09 00:48:40 +0200 |
commit | a003e13cec2c44160b46047d0fee8d52dfc6253f (patch) | |
tree | 6322f118707e5ce5da435873744024eee9afb3d6 /src/leap/bitmask/vpn/launcher.py | |
parent | 6f961fc09dd633d0bcf5397787139c0032e0661e (diff) |
[bug] make openvpn and firewall able to launch
with these fixes, I'm able to finally launch openvpn and firewall on
osx. :)
all that's left for a minimum vpn release is packaging and installing
all the helpers in the proper place.
Diffstat (limited to 'src/leap/bitmask/vpn/launcher.py')
-rw-r--r-- | src/leap/bitmask/vpn/launcher.py | 27 |
1 files changed, 7 insertions, 20 deletions
diff --git a/src/leap/bitmask/vpn/launcher.py b/src/leap/bitmask/vpn/launcher.py index f412ace..8ce2660 100644 --- a/src/leap/bitmask/vpn/launcher.py +++ b/src/leap/bitmask/vpn/launcher.py @@ -29,7 +29,7 @@ from twisted.logger import Logger from abc import ABCMeta, abstractmethod from functools import partial -from leap.bitmask.vpn.constants import IS_LINUX +from leap.bitmask.vpn.constants import IS_LINUX, IS_MAC from leap.bitmask.vpn.utils import force_eval @@ -186,16 +186,6 @@ class VPNLauncher(object): :return: A VPN command ready to be launched. :rtype: list """ - # leap_assert_type(vpnconfig, VPNConfig) - # leap_assert_type(providerconfig, ProviderConfig) - - # XXX this still has to be changed on osx and windows accordingly - # kwargs = {} - # openvpn_possibilities = which(kls.OPENVPN_BIN, **kwargs) - # if not openvpn_possibilities: - # raise OpenVPNNotFoundException() - # openvpn = first(openvpn_possibilities) - # ----------------------------------------- openvpn_path = force_eval(kls.OPENVPN_BIN_PATH) if not os.path.isfile(openvpn_path): @@ -215,7 +205,6 @@ class VPNLauncher(object): if openvpn_verb is not None: args += ['--verb', '%d' % (openvpn_verb,)] - # gateways = kls.get_gateways(vpnconfig, providerconfig) gateways = remotes for ip, port in gateways: @@ -224,7 +213,6 @@ class VPNLauncher(object): args += [ '--client', '--dev', ' tun', - '--persist-key', '--tls-client', '--remote-cert-tls', 'server' @@ -269,13 +257,12 @@ class VPNLauncher(object): '--ca', providerconfig.get_ca_cert_path() ] - args += [ - '--ping', '5', - '--ping-restart', '10'] - - args += [ - '--persist-key', - '--persist-local-ip', '--persist-remote-ip'] + if not IS_MAC: + args += [ + '--ping', '5', + '--ping-restart', '10', + '--persist-key', + '--persist-local-ip', '--persist-remote-ip'] command_and_args = [openvpn_path] + args return command_and_args |