diff options
author | Tomás Touceda <chiiph@leap.se> | 2013-08-30 17:02:11 -0300 |
---|---|---|
committer | Tomás Touceda <chiiph@leap.se> | 2013-08-30 17:02:11 -0300 |
commit | ce72a0596d0e2f49037747c0c19988874e0801c9 (patch) | |
tree | 706965282ef392cad5e824bfb77b87154be4ef2d /src/leap/bitmask/services/eip/vpnlaunchers.py | |
parent | 56275cfa83a69925fdb13fba84ce05be0de6ba57 (diff) | |
parent | 294e70f80ac8feb7ecac14691051037bf0c84afa (diff) |
Merge remote-tracking branch 'ivan/feature/3505_preferences-select-gateway-manually' into develop
Diffstat (limited to 'src/leap/bitmask/services/eip/vpnlaunchers.py')
-rw-r--r-- | src/leap/bitmask/services/eip/vpnlaunchers.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/leap/bitmask/services/eip/vpnlaunchers.py b/src/leap/bitmask/services/eip/vpnlaunchers.py index f8c51ad8..15221c48 100644 --- a/src/leap/bitmask/services/eip/vpnlaunchers.py +++ b/src/leap/bitmask/services/eip/vpnlaunchers.py @@ -33,6 +33,7 @@ except ImportError: from abc import ABCMeta, abstractmethod from functools import partial +from leap.bitmask.config.leapsettings import LeapSettings from leap.bitmask.config.providerconfig import ProviderConfig from leap.bitmask.services.eip.eipconfig import EIPConfig, VPNGatewaySelector from leap.bitmask.util import first @@ -414,8 +415,15 @@ class LinuxVPNLauncher(VPNLauncher): if openvpn_verb is not None: args += ['--verb', '%d' % (openvpn_verb,)] - gateway_selector = VPNGatewaySelector(eipconfig) - gateways = gateway_selector.get_gateways() + gateways = [] + leap_settings = LeapSettings(ProviderConfig.standalone) + gateway_conf = leap_settings.get_selected_gateway() + + if gateway_conf == leap_settings.GATEWAY_AUTOMATIC: + gateway_selector = VPNGatewaySelector(eipconfig) + gateways = gateway_selector.get_gateways() + else: + gateways = [gateway_conf] if not gateways: logger.error('No gateway was found!') |