diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2024-02-07 13:43:52 +0100 |
|---|---|---|
| committer | Jeroen Wijenbergh <46386452+jwijenbergh@users.noreply.github.com> | 2024-02-19 14:15:07 +0100 |
| commit | c8e7424f0b9ca963c7454e3297a8d001d67d729d (patch) | |
| tree | 979341ca6b67badc451aa58d3790704b3bf04386 /exports | |
| parent | a912257ad6d4260fbea9c0e3e3fb9bbefa92bb6e (diff) | |
WireGuard: TCP support using proxyguard
Diffstat (limited to 'exports')
| -rw-r--r-- | exports/exports.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/exports/exports.go b/exports/exports.go index c7d4b8c..9ae85c8 100644 --- a/exports/exports.go +++ b/exports/exports.go @@ -879,6 +879,23 @@ func StartFailover(c C.uintptr_t, gateway *C.char, mtu C.int, readRxBytes C.Read return droppedC, nil } +// StartProxyguard starts the 'proxyguard' procedure in eduvpn-common +// +//export StartProxyguard +func StartProxyguard(c C.uintptr_t, listen *C.char, tcpsp C.int, peer *C.char) *C.char { + state, stateErr := getVPNState() + if stateErr != nil { + return getCError(stateErr) + } + ck, err := getCookie(c) + if err != nil { + return getCError(err) + } + + proxyErr := state.StartProxyguard(ck, C.GoString(listen), int(tcpsp), C.GoString(peer)) + return getCError(proxyErr) +} + // SetState sets the state of the statemachine // // Note: this transitions the FSM into the new state without passing any data to it. |
