From 2f3a9d0c1687e6f591ccdb7d44a36cdc09359321 Mon Sep 17 00:00:00 2001 From: jwijenbergh Date: Wed, 18 Dec 2024 15:21:56 +0100 Subject: Exports: Document ProxyGuard functions --- docs/md/apidocs.md | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'docs') diff --git a/docs/md/apidocs.md b/docs/md/apidocs.md index a6f8b16..9fb7808 100644 --- a/docs/md/apidocs.md +++ b/docs/md/apidocs.md @@ -624,9 +624,8 @@ Signature: func NewProxyguard(c C.uintptr_t, lp C.int, tcpsp C.int, peer *C.char, proxySetup C.ProxySetup) (C.uintptr_t, *C.char) ``` -NewProxyguard creates the 'proxyguard' procedure in eduvpn-common. -eduvpn-common currently also cleans up the running ProxyGuard process in -`cleanup`. If the proxy cannot be created it returns an error. +NewProxyguard creates the 'proxyguard' procedure in eduvpn-common. If the +proxy cannot be created it returns an error. This function proxies WireGuard UDP connections over HTTP: [ProxyGuard on Codeberg](https://codeberg.org/eduvpn/proxyguard). @@ -647,7 +646,7 @@ using the `proxy` JSON key two arguments: the file descriptor (integer) and a JSON list of IPs the client connects to -Example Input: ```StartProxyGuard(myCookie, 1337, 0, "5.5.5.5:51820", +Example Input: ```NewProxyguard(myCookie, 1337, 0, "5.5.5.5:51820", proxySetupCB)``` Example Output: ```null``` @@ -659,6 +658,10 @@ Signature: func ProxyguardPeerIPs(proxyH C.uintptr_t) (*C.char, *C.char) ``` +ProxyguardPeerIPs gets the Peer IPs configured by ProxyGuard Example Input: +```ProxyguardPeerIPs(handle)``` + +Example Output: ```["1.1.1.1"], null``` ## ProxyguardTunnel Signature: @@ -667,6 +670,9 @@ Signature: func ProxyguardTunnel(c C.uintptr_t, proxyH C.uintptr_t, wglisten C.int) *C.char ``` +ProxyguardTunnel starts the tunneling for ProxyGuard `c` is the cookie +`proxyH` is the proxy handle `wglisten` is the port WireGuard is listening +on ## Register Signature: -- cgit v1.2.3