diff options
author | Mikael Magnusson <mikma@users.sourceforge.net> | 2022-12-29 00:23:17 +0100 |
---|---|---|
committer | Mikael Magnusson <mikma@users.sourceforge.net> | 2023-10-19 22:53:24 +0200 |
commit | f22dd9c79b865eb1ae970b75f892f412c8ec0070 (patch) | |
tree | 30ce0dc9ab6d1ad2d4dd2713e75b1d81e5fa94e0 /tunnel/tools/libwg-go/api-android.go | |
parent | 60ddb646699462de96258a61680985b765f16ea1 (diff) |
ui,tunnel: auto-detect IPv6/IPv4 preference
Detect IP address change.
Request non-VPN network.
Update endpoint when needed.
Unregister network on wgTurnOff and use IPv4 if network is not known.
Diffstat (limited to 'tunnel/tools/libwg-go/api-android.go')
-rw-r--r-- | tunnel/tools/libwg-go/api-android.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tunnel/tools/libwg-go/api-android.go b/tunnel/tools/libwg-go/api-android.go index d47c5d76..d4e36480 100644 --- a/tunnel/tools/libwg-go/api-android.go +++ b/tunnel/tools/libwg-go/api-android.go @@ -224,4 +224,17 @@ func wgVersion() *C.char { return C.CString("unknown") } +//export wgSetConfig +func wgSetConfig(tunnelHandle int32, settings string) int32 { + handle, ok := tunnelHandles[tunnelHandle] + if !ok { + return -1 + } + err := handle.device.IpcSet(settings) + if err != nil { + return -1 + } + return 0 +} + func main() {} |