summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/vpn/process.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/bitmask/vpn/process.py')
-rw-r--r--src/leap/bitmask/vpn/process.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/leap/bitmask/vpn/process.py b/src/leap/bitmask/vpn/process.py
index 844cd0ff..d6e6129b 100644
--- a/src/leap/bitmask/vpn/process.py
+++ b/src/leap/bitmask/vpn/process.py
@@ -76,13 +76,12 @@ class _VPNProcess(protocol.ProcessProtocol, _management.VPNManagement):
openvpn invocation
:type openvpn_verb: int
"""
+ # TODO handle management as a component
_management.VPNManagement.__init__(self)
+ self.set_connection(socket_host, socket_port)
self._vpnconfig = vpnconfig
self._providerconfig = providerconfig
- self._socket_host = socket_host
- self._socket_port = socket_port
-
self._launcher = get_vpn_launcher()
self._last_state = None
@@ -107,6 +106,10 @@ class _VPNProcess(protocol.ProcessProtocol, _management.VPNManagement):
def traffic_status(self):
return self._status.get_traffic_status()
+ @traffic_status.setter
+ def traffic_status(self, value):
+ self._status.set_traffic_status(value)
+
# processProtocol methods
def connectionMade(self):
@@ -203,8 +206,8 @@ class _VPNProcess(protocol.ProcessProtocol, _management.VPNManagement):
command = self._launcher.get_vpn_command(
vpnconfig=self._vpnconfig,
providerconfig=self._providerconfig,
- socket_host=self._socket_host,
- socket_port=self._socket_port,
+ socket_host=self._host,
+ socket_port=self._port,
openvpn_verb=self._openvpn_verb,
remotes=self._remotes)