diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-10-24 14:05:45 +0200 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-10-24 14:05:45 +0200 |
| commit | 01cbb80b300f92c3456d3b2965630c0783607905 (patch) | |
| tree | ad162c4bc4bf5ebafac0d4ba44147437604c82d3 /exports/exports.go | |
| parent | 56f084389a3eb6b34df86af347ce60acdeb6106b (diff) | |
Client + Server + Exports: Implement optional WireGuard support
Diffstat (limited to 'exports/exports.go')
| -rw-r--r-- | exports/exports.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/exports/exports.go b/exports/exports.go index 6407da4..05f2462 100644 --- a/exports/exports.go +++ b/exports/exports.go @@ -407,6 +407,17 @@ func InFSMState(name *C.char, checkState C.int) C.int { return C.int(0) } +//export SetSupportWireguard +func SetSupportWireguard(name *C.char, support C.int) *C.error { + nameStr := C.GoString(name) + state, stateErr := GetVPNState(nameStr) + if stateErr != nil { + return getError(stateErr) + } + state.SupportsWireguard = support == 1 + return nil +} + //export FreeString func FreeString(addr *C.char) { C.free(unsafe.Pointer(addr)) |
