summaryrefslogtreecommitdiff
path: root/wrappers/python
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2024-03-06 19:56:49 +0100
committerjwijenbergh <jeroenwijenbergh@protonmail.com>2024-03-06 19:57:18 +0100
commit2388cfa0b517e1ef3e05e278ffcd6d6db981381b (patch)
tree7c2ec316cbc64c701b707cee4d5ec45fa6dfe3d4 /wrappers/python
parenta2f9a000e635876126ab41a7969973a8f03a109a (diff)
Client + Exports + Wrappers: Add peer IPs argument to fd callback
And rename the callback to be closer to what it does
Diffstat (limited to 'wrappers/python')
-rw-r--r--wrappers/python/eduvpn_common/loader.py4
-rw-r--r--wrappers/python/eduvpn_common/main.py6
-rw-r--r--wrappers/python/eduvpn_common/types.py2
3 files changed, 6 insertions, 6 deletions
diff --git a/wrappers/python/eduvpn_common/loader.py b/wrappers/python/eduvpn_common/loader.py
index c7c2233..674c010 100644
--- a/wrappers/python/eduvpn_common/loader.py
+++ b/wrappers/python/eduvpn_common/loader.py
@@ -6,8 +6,8 @@ from ctypes import CDLL, c_char_p, c_int, c_void_p, cdll
from eduvpn_common import __version__
from eduvpn_common.types import (
BoolError,
- GotProxyFD,
ProxyReady,
+ ProxySetup,
DataError,
ReadRxBytes,
TokenGetter,
@@ -132,6 +132,6 @@ def initialize_functions(lib: CDLL) -> None:
c_char_p,
c_int,
c_char_p,
- GotProxyFD,
+ ProxySetup,
ProxyReady,
], c_void_p
diff --git a/wrappers/python/eduvpn_common/main.py b/wrappers/python/eduvpn_common/main.py
index ea0ebb3..e96f7e2 100644
--- a/wrappers/python/eduvpn_common/main.py
+++ b/wrappers/python/eduvpn_common/main.py
@@ -5,8 +5,8 @@ from typing import Any, Callable, Iterator, Optional
from eduvpn_common.loader import initialize_functions, load_lib
from eduvpn_common.types import (
- GotProxyFD,
ProxyReady,
+ ProxySetup,
ReadRxBytes,
TokenGetter,
TokenSetter,
@@ -347,13 +347,13 @@ class EduVPN(object):
forwardError(dropped_err)
return dropped
- def start_proxyguard(self, listen: str, source_port: int, peer: str, gotfd: GotProxyFD, ready: ProxyReady):
+ def start_proxyguard(self, listen: str, source_port: int, peer: str, setup: ProxySetup, ready: ProxyReady):
proxy_err = self.go_cookie_function(
self.lib.StartProxyguard,
listen,
source_port,
peer,
- gotfd,
+ setup,
ready,
)
if proxy_err:
diff --git a/wrappers/python/eduvpn_common/types.py b/wrappers/python/eduvpn_common/types.py
index e46522a..3375258 100644
--- a/wrappers/python/eduvpn_common/types.py
+++ b/wrappers/python/eduvpn_common/types.py
@@ -34,7 +34,7 @@ class BoolError(Structure):
# The type for a Go state change callback
VPNStateChange = CFUNCTYPE(c_int, c_int, c_int, c_char_p)
-GotProxyFD = CFUNCTYPE(c_void_p, c_int)
+ProxySetup = CFUNCTYPE(c_void_p, c_int, c_char_p)
ProxyReady = CFUNCTYPE(c_void_p)
ReadRxBytes = CFUNCTYPE(c_ulonglong)
TokenGetter = CFUNCTYPE(c_void_p, c_char_p, c_int, POINTER(c_char), c_size_t)