diff options
Diffstat (limited to 'src/leap/bitmask/core')
-rw-r--r-- | src/leap/bitmask/core/dispatcher.py | 14 | ||||
-rw-r--r-- | src/leap/bitmask/core/service.py | 3 |
2 files changed, 16 insertions, 1 deletions
diff --git a/src/leap/bitmask/core/dispatcher.py b/src/leap/bitmask/core/dispatcher.py index 508a925d..363594ca 100644 --- a/src/leap/bitmask/core/dispatcher.py +++ b/src/leap/bitmask/core/dispatcher.py @@ -237,6 +237,20 @@ class VPNCmd(SubCommand): d = vpn.do_list() return d + @register_method('list') + def do_LOCATIONS(self, vpn, *parts): + if len(parts) > 2: + return vpn.do_set_locations(parts[2:]) + + return vpn.do_get_locations() + + @register_method('list') + def do_COUNTRIES(self, vpn, *parts): + if len(parts) > 2: + return vpn.do_set_countries(parts[2:]) + + return vpn.do_get_countries() + class MailCmd(SubCommand): diff --git a/src/leap/bitmask/core/service.py b/src/leap/bitmask/core/service.py index e823d829..026e51d9 100644 --- a/src/leap/bitmask/core/service.py +++ b/src/leap/bitmask/core/service.py @@ -208,7 +208,8 @@ class BitmaskBackend(configurable.ConfigurableService): def _init_vpn(self): if HAS_VPN: - self._maybe_init_service('vpn', VPNService) + cfg = self.get_config_section('vpn') + self._maybe_init_service('vpn', VPNService, cfg) def _init_zmq(self): zs = _zmq.ZMQServerService(self) |