aboutsummaryrefslogtreecommitdiffstats
path: root/wireguard-go-bridge
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-01-22 13:09:38 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2019-01-22 13:11:28 +0100
commit668c4a475c2154aa14574b10c3c938877a8ae7d8 (patch)
tree0aad72577e0431cde213db49b1c0735ab0659711 /wireguard-go-bridge
parentMacOS: StatusMenu: Properly localize menu title (diff)
downloadwireguard-apple-668c4a475c2154aa14574b10c3c938877a8ae7d8.tar.xz
wireguard-apple-668c4a475c2154aa14574b10c3c938877a8ae7d8.zip
macOS: remove mobile network tweeks
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'wireguard-go-bridge')
-rw-r--r--wireguard-go-bridge/src/api-ios.go5
-rw-r--r--wireguard-go-bridge/wireguard.h2
2 files changed, 7 insertions, 0 deletions
diff --git a/wireguard-go-bridge/src/api-ios.go b/wireguard-go-bridge/src/api-ios.go
index 94a2cd03..ace83d9b 100644
--- a/wireguard-go-bridge/src/api-ios.go
+++ b/wireguard-go-bridge/src/api-ios.go
@@ -68,6 +68,11 @@ func init() {
}()
}
+//export wgEnableRoaming
+func wgEnableRoaming(enabled bool) {
+ roamingDisabled = !enabled
+}
+
//export wgSetLogger
func wgSetLogger(loggerFn uintptr) {
loggerFunc = unsafe.Pointer(loggerFn)
diff --git a/wireguard-go-bridge/wireguard.h b/wireguard-go-bridge/wireguard.h
index 500f1381..b264a2ef 100644
--- a/wireguard-go-bridge/wireguard.h
+++ b/wireguard-go-bridge/wireguard.h
@@ -8,9 +8,11 @@
#include <sys/types.h>
#include <stdint.h>
+#include <stdbool.h>
typedef struct { const char *p; size_t n; } gostring_t;
typedef void(*logger_fn_t)(int level, const char *msg);
+extern void wgEnableRoaming(bool enabled);
extern void wgSetLogger(logger_fn_t logger_fn);
extern int wgTurnOn(gostring_t settings, int32_t tun_fd);
extern void wgTurnOff(int handle);