summaryrefslogtreecommitdiff
path: root/wrappers/python
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2024-02-07 13:43:52 +0100
committerJeroen Wijenbergh <46386452+jwijenbergh@users.noreply.github.com>2024-02-19 14:15:07 +0100
commitc8e7424f0b9ca963c7454e3297a8d001d67d729d (patch)
tree979341ca6b67badc451aa58d3790704b3bf04386 /wrappers/python
parenta912257ad6d4260fbea9c0e3e3fb9bbefa92bb6e (diff)
WireGuard: TCP support using proxyguard
Diffstat (limited to 'wrappers/python')
-rw-r--r--wrappers/python/eduvpn_common/loader.py6
-rw-r--r--wrappers/python/eduvpn_common/main.py10
2 files changed, 16 insertions, 0 deletions
diff --git a/wrappers/python/eduvpn_common/loader.py b/wrappers/python/eduvpn_common/loader.py
index 51286d2..38d0bb5 100644
--- a/wrappers/python/eduvpn_common/loader.py
+++ b/wrappers/python/eduvpn_common/loader.py
@@ -125,3 +125,9 @@ def initialize_functions(lib: CDLL) -> None:
c_int,
ReadRxBytes,
], BoolError
+ lib.StartProxyguard.argtypes, lib.StartProxyguard.restype = [
+ c_int,
+ c_char_p,
+ c_int,
+ c_char_p,
+ ], c_void_p
diff --git a/wrappers/python/eduvpn_common/main.py b/wrappers/python/eduvpn_common/main.py
index 0daf0b6..847819d 100644
--- a/wrappers/python/eduvpn_common/main.py
+++ b/wrappers/python/eduvpn_common/main.py
@@ -345,6 +345,16 @@ class EduVPN(object):
forwardError(dropped_err)
return dropped
+ def start_proxyguard(self, listen: str, source_port: int, peer: str):
+ proxy_err = self.go_cookie_function(
+ self.lib.StartProxyguard,
+ listen,
+ source_port,
+ peer,
+ )
+ if proxy_err:
+ forwardError(proxy_err)
+
def cancel(self):
self.jar.cancel()