From f0a40443e1f2466db00f4a32273afa28e54d9dbb Mon Sep 17 00:00:00 2001 From: "Kali Kaneko (leap communications)" Date: Wed, 22 Feb 2017 01:30:33 +0100 Subject: [bug] rename one of the managers to TunnelManager otherwise there's a name collision with the former EIPManager --- src/leap/bitmask/vpn/manager.py | 3 ++- src/leap/bitmask/vpn/service.py | 3 +++ src/leap/bitmask/vpn/vpn.py | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) (limited to 'src/leap/bitmask/vpn') diff --git a/src/leap/bitmask/vpn/manager.py b/src/leap/bitmask/vpn/manager.py index ba1ae7c1..88d10bb7 100644 --- a/src/leap/bitmask/vpn/manager.py +++ b/src/leap/bitmask/vpn/manager.py @@ -30,7 +30,7 @@ from .constants import IS_WIN # TODO this is very badly named. There is another class that is called # manager. This -class VPNManager(object): +class TunnelManager(object): def __init__(self, remotes, cert_path, key_path, ca_path, extra_flags): """ @@ -40,6 +40,7 @@ class VPNManager(object): ((ip1, portA), (ip2, portB), ...) :type remotes: tuple of tuple(str, int) """ + print "INIT", remotes # TODO we can set all the needed ports, gateways and paths in here # TODO need gateways here # sorting them doesn't belong in here diff --git a/src/leap/bitmask/vpn/service.py b/src/leap/bitmask/vpn/service.py index 10818ed7..e56546ea 100644 --- a/src/leap/bitmask/vpn/service.py +++ b/src/leap/bitmask/vpn/service.py @@ -72,6 +72,9 @@ class VPNService(HookableService): return {'result': 'started'} def stop_vpn(self): + # TODO ----------------------------- + # when shutting down the main bitmaskd daemon, this should be called. + if self._started: self._vpn.stop() self._started = False diff --git a/src/leap/bitmask/vpn/vpn.py b/src/leap/bitmask/vpn/vpn.py index 94fee8b5..e19f6629 100644 --- a/src/leap/bitmask/vpn/vpn.py +++ b/src/leap/bitmask/vpn/vpn.py @@ -18,7 +18,7 @@ from colorama import Fore -from leap.bitmask.vpn.manager import VPNManager +from leap.bitmask.vpn.manager import TunnelManager from leap.bitmask.vpn.fw.firewall import FirewallManager @@ -26,7 +26,7 @@ class VPNManager(object): def __init__(self, remotes, cert, key, ca, flags): - self._vpn = VPNManager( + self._vpn = TunnelManager( remotes, cert, key, ca, flags) self._firewall = FirewallManager(remotes) -- cgit v1.2.3