summaryrefslogtreecommitdiff
path: root/wrappers
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2024-11-14 14:59:20 +0100
committerjwijenbergh <jeroenwijenbergh@protonmail.com>2024-12-19 10:50:36 +0100
commit4de4d76ad1ef1dc52b6e2e03c4fc81d4ea8d467e (patch)
treef09aadb416c61c94eb703d950b1689645aad4c4c /wrappers
parent2f3a9d0c1687e6f591ccdb7d44a36cdc09359321 (diff)
ProxyGuard: Add a restart function
Diffstat (limited to 'wrappers')
-rw-r--r--wrappers/python/eduvpn_common/loader.py6
-rw-r--r--wrappers/python/eduvpn_common/main.py5
2 files changed, 11 insertions, 0 deletions
diff --git a/wrappers/python/eduvpn_common/loader.py b/wrappers/python/eduvpn_common/loader.py
index 8ac6372..11307ef 100644
--- a/wrappers/python/eduvpn_common/loader.py
+++ b/wrappers/python/eduvpn_common/loader.py
@@ -144,6 +144,12 @@ def initialize_functions(lib: CDLL) -> None:
],
HandlerError,
)
+ lib.ProxyguardRestart.argtypes, lib.ProxyguardRestart.restype = (
+ [
+ c_int,
+ ],
+ c_char_p,
+ )
lib.ProxyguardTunnel.argtypes, lib.ProxyguardTunnel.restype = (
[
c_int,
diff --git a/wrappers/python/eduvpn_common/main.py b/wrappers/python/eduvpn_common/main.py
index 04a2302..8d78afd 100644
--- a/wrappers/python/eduvpn_common/main.py
+++ b/wrappers/python/eduvpn_common/main.py
@@ -37,6 +37,11 @@ class Proxyguard(object):
forwardError(peer_ips_err)
return json.loads(peer_ips)
+ def restart(self):
+ restart_err = self.parent.go_function(self.parent.lib.ProxyguardRestart, self.handler)
+ if restart_err:
+ forwardError(restart_err)
+
class WrappedError(Exception):
def __init__(self, translations, language, misc):