diff options
Diffstat (limited to 'docs/md')
| -rw-r--r-- | docs/md/apidocs.md | 73 |
1 files changed, 2 insertions, 71 deletions
diff --git a/docs/md/apidocs.md b/docs/md/apidocs.md index 9fb7808..71713e6 100644 --- a/docs/md/apidocs.md +++ b/docs/md/apidocs.md @@ -110,8 +110,7 @@ Signature: func Cleanup(c C.uintptr_t) *C.char ``` -Cleanup sends a `/disconnect` to cleanup the connection. Additionally, -if ProxyGuard is active it cancels the running process +Cleanup sends a `/disconnect` to cleanup the connection. This MUST be called when disconnecting, see [the eduVPN docs](https://docs.eduvpn.org/server/v3/api.html#application-flow). `c` is @@ -483,8 +482,7 @@ Signature: func GetConfig(c C.uintptr_t, _type C.int, id *C.char, pTCP C.int, startup C.int) (*C.char, *C.char) ``` -GetConfig gets a configuration for the server. It returns additional -information in case WireGuard over Proxyguard is used (see the last example) +GetConfig gets a configuration for the server. `c` is the cookie that is used for cancellation. Create a cookie first with CookieNew, this same cookie is also used for replying to state transitions @@ -594,16 +592,6 @@ Example Output (2=WireGuard): "should_failover": true, <- whether or not the failover procedure should happen } -Example Output (3=WireGuard + Proxyguard): - - { - "config":"[Interface]\nMTU = ...\nAddress = ...\nDNS = ...\nPrivateKey = ...\n[Peer]\nPublicKey = ...\nAllowedIPs = ...\nEndpoint = 127.0.0.1:x\n", - "protocol":3, - "default_gateway":true, - "should_failover":true, - "proxy":{"source_port":38683,"listen":"127.0.0.1:59812","peer":"https://..."} - } - ## InState Signature: @@ -617,63 +605,6 @@ 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: |
