summaryrefslogtreecommitdiff
path: root/exports
diff options
context:
space:
mode:
Diffstat (limited to 'exports')
-rw-r--r--exports/exports.go13
1 files changed, 11 insertions, 2 deletions
diff --git a/exports/exports.go b/exports/exports.go
index 552025f..f2fa75e 100644
--- a/exports/exports.go
+++ b/exports/exports.go
@@ -878,7 +878,6 @@ func StartFailover(c C.uintptr_t, gateway *C.char, mtu C.int, readRxBytes C.Read
}
// 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.
//
// This function proxies WireGuard UDP connections over HTTP: [ProxyGuard on Codeberg](https://codeberg.org/eduvpn/proxyguard).
@@ -891,7 +890,7 @@ func StartFailover(c C.uintptr_t, gateway *C.char, mtu C.int, readRxBytes C.Read
// - `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: ```StartProxyGuard(myCookie, 1337, 0, "5.5.5.5:51820", proxySetupCB)```
+// Example Input: ```NewProxyguard(myCookie, 1337, 0, "5.5.5.5:51820", proxySetupCB)```
//
// Example Output: ```null```
//
@@ -922,6 +921,11 @@ func getProxy(proxyH C.uintptr_t) (*proxy.Proxy, error) {
return v, nil
}
+// ProxyguardTunnel starts the tunneling for ProxyGuard
+// `c` is the cookie
+// `proxyH` is the proxy handle
+// `wglisten` is the port WireGuard is listening on
+//
//export ProxyguardTunnel
func ProxyguardTunnel(c C.uintptr_t, proxyH C.uintptr_t, wglisten C.int) *C.char {
ck, err := getCookie(c)
@@ -939,6 +943,11 @@ func ProxyguardTunnel(c C.uintptr_t, proxyH C.uintptr_t, wglisten C.int) *C.char
return getCError(tunnelErr)
}
+// ProxyguardPeerIPs gets the Peer IPs configured by ProxyGuard
+// Example Input: ```ProxyguardPeerIPs(handle)```
+//
+// Example Output: ```["1.1.1.1"], null```
+//
//export ProxyguardPeerIPs
func ProxyguardPeerIPs(proxyH C.uintptr_t) (*C.char, *C.char) {
pr, err := getProxy(proxyH)