summaryrefslogtreecommitdiff
path: root/docs/md
diff options
context:
space:
mode:
authorJeroen Wijenbergh <jeroen.wijenbergh@geant.org>2025-09-03 10:13:46 +0200
committerJeroen Wijenbergh <jeroen.wijenbergh@geant.org>2025-09-03 10:53:42 +0200
commitc3318fb386096170282e831eb3b616a5a7e9dda8 (patch)
tree0367fdad43a02da49b278f38db9b8e15d3de908a /docs/md
parent5e05784cab953b0e24609398106dd33da7738d21 (diff)
Revert "All: Remove ProxyGuard integration"
This partially reverts commit 6b939462fb1064abd42e8cb8316700ec844172ea. It keeps the proxyguard functions but leaves GetConfig alone. E.g. no WireGuard config replacing and querying is happening for ProxyGuard. Needed for the Linux client as I have not found a good way to have a daemon with NetworkManager integration
Diffstat (limited to 'docs/md')
-rw-r--r--docs/md/apidocs.md57
1 files changed, 57 insertions, 0 deletions
diff --git a/docs/md/apidocs.md b/docs/md/apidocs.md
index 71713e6..2769a27 100644
--- a/docs/md/apidocs.md
+++ b/docs/md/apidocs.md
@@ -605,6 +605,63 @@ Example Input: ```InState(5)```
Example Output: ```1, null```
+## NewProxyguard
+Signature:
+
+```go
+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. 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).
+
+These input variables can be gotten from the configuration that is retrieved
+using the `proxy` JSON key
+
+ - `c` is the cookie. Note that if you cancel/delete the cookie,
+ ProxyGuard gets cleaned up. Common automatically cleans up ProxyGuard
+ when `Cleanup` is called, but it is good to cleanup yourself too.
+ - `lp` is the `port` of the local udp ProxyGuard connection, this is what
+ is set to the WireGuard endpoint
+ - `tcpsp` is the TCP source port. Pass 0 if you do not route based on
+ source port, so far only the Linux client has to pass non-zero.
+ - `peer` is the `ip:port` of the remote server
+ - `proxySetup` is a callback which is called when the socket is setting
+ up, this can be used for configuring routing in the client. It takes
+ two arguments: the file descriptor (integer) and a JSON list of IPs the
+ client connects to
+
+Example Input: ```NewProxyguard(myCookie, 1337, 0, "5.5.5.5:51820",
+proxySetupCB)```
+
+Example Output: ```null```
+
+## ProxyguardPeerIPs
+Signature:
+
+```go
+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:
+
+```go
+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: