From 61a2f8dc5ccd11c644573f9cc5b1141f1f5ab4a7 Mon Sep 17 00:00:00 2001 From: jwijenbergh Date: Wed, 7 Feb 2024 15:24:50 +0100 Subject: Docs API: Re-run gen exports doc --- docs/src/api/functiondocs.md | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) (limited to 'docs/src') diff --git a/docs/src/api/functiondocs.md b/docs/src/api/functiondocs.md index b93baa8..9797927 100644 --- a/docs/src/api/functiondocs.md +++ b/docs/src/api/functiondocs.md @@ -27,6 +27,7 @@ This document was automatically generated from the exports/exports.go file * [SetSupportWireguard](#setsupportwireguard) * [SetTokenHandler](#settokenhandler) * [StartFailover](#startfailover) + * [StartProxyguard](#startproxyguard) # About the API package main implements the main exported API to be used by other languages @@ -701,7 +702,7 @@ Example Output: ## SetSecureLocation Signature: ```go -func SetSecureLocation(c C.uintptr_t, data *C.char) *C.char +func SetSecureLocation(orgID *C.char, cc *C.char) *C.char ``` SetSecureLocation sets the location for the secure internet server if it exists @@ -709,14 +710,11 @@ exists This MUST only be called if the user/client wishes to manually set a location instead of the common lib asking for one using a transition -Because this does network requests to initialize the location, there is a -cookie again :) - -`c` is the Cookie that needs to be passed. To create a cookie, first call -`CookieNew` `Data` is the location ID +`orgID` is the organisation ID for the secure internet server `cc` is the +location ID/country code It returns an error if unsuccessful. Example Input: -```SetSecureLocation("nl")``` +```SetSecureLocation("http://idp.geant.org/", "nl")``` Example Output: @@ -820,3 +818,20 @@ myRxBytesReader)``` Example Output: ```1, null``` +## StartProxyguard +Signature: + ```go +func StartProxyguard(c C.uintptr_t, listen *C.char, tcpsp C.int, peer *C.char) *C.char +``` +StartProxyguard starts the 'proxyguard' procedure in eduvpn-common. This +proxies WireGuard UDP connections over TCP. These input variables can be +gotten from the configuration that is retrieved using the `proxy` json key + + - `c` is the cookie + - `listen` is the ip:port of the local udp connection, this is what is set + to the WireGuard endpoint + - `tcpsp` is the TCP source port + - `peer` is the ip:port of the remote server + +If the proxy cannot be started it returns an error + -- cgit v1.2.3