summaryrefslogtreecommitdiff
path: root/wrappers/python/src/main.py
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2022-05-09 14:18:23 +0200
committerjwijenbergh <jeroenwijenbergh@protonmail.com>2022-05-09 14:18:23 +0200
commit1ef27cc47ad56a2c66aaa40e398a0063be2573d4 (patch)
treefff365577d82274f2b05878e702238b8a575c5c8 /wrappers/python/src/main.py
parentfd0753c5463b4c54d09712336301e174f05e05ab (diff)
FSM/State: Profile correctness and connect name change
Also add a force tcp flag
Diffstat (limited to 'wrappers/python/src/main.py')
-rw-r--r--wrappers/python/src/main.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/wrappers/python/src/main.py b/wrappers/python/src/main.py
index 9c2fb41..2b346e3 100644
--- a/wrappers/python/src/main.py
+++ b/wrappers/python/src/main.py
@@ -36,11 +36,10 @@ def GetDiscoServers(name):
organizations, organizationsErr = GetDataError(lib.GetOrganizationsList(name_bytes))
return servers, serversErr, organizations, organizationsErr
-
-def Connect(name, url):
+def GetConnectConfig(name, url, is_secure_internet, force_tcp):
name_bytes = name.encode("utf-8")
url_bytes = url.encode("utf-8")
- data_error = lib.Connect(name_bytes, url_bytes)
+ data_error = lib.GetConnectConfig(name_bytes, url_bytes, is_secure_internet, force_tcp)
return GetDataError(data_error)
def SetConnected(name):
@@ -95,8 +94,12 @@ class EduVPN(object):
def get_disco(self):
return GetDiscoServers(self.name)
- def connect(self, url):
- return Connect(self.name, url)
+ def get_config_institute_access(self, url, force_tcp=False):
+ return GetConnectConfig(self.name, url, False, force_tcp)
+
+ def get_config_secure_internet(self, url, force_tcp=False):
+ return GetConnectConfig(self.name, url, True, force_tcp)
+
def set_disconnected(self):
return SetDisconnected(self.name)