diff options
Diffstat (limited to 'app/tools/libwg-go/src')
-rw-r--r-- | app/tools/libwg-go/src/api-android.go | 6 | ||||
-rw-r--r-- | app/tools/libwg-go/src/queueconstants.go | 10 | ||||
-rw-r--r-- | app/tools/libwg-go/src/tun/api-android.go | 4 |
3 files changed, 10 insertions, 10 deletions
diff --git a/app/tools/libwg-go/src/api-android.go b/app/tools/libwg-go/src/api-android.go index 2c28fc76..ddf175ab 100644 --- a/app/tools/libwg-go/src/api-android.go +++ b/app/tools/libwg-go/src/api-android.go @@ -11,8 +11,8 @@ import "C" import ( "bufio" - "git.zx2c4.com/wireguard-go/tun" "golang.org/x/sys/unix" + "golang.zx2c4.com/wireguard/tun" "log" "math" "net" @@ -52,7 +52,7 @@ func init() { case <-signals: n := runtime.Stack(buf, true) buf[n] = 0 - C.__android_log_write(C.ANDROID_LOG_ERROR, C.CString("WireGuard/GoBackend/Stacktrace"), (*_Ctype_char)(unsafe.Pointer(&buf[0]))) + C.__android_log_write(C.ANDROID_LOG_ERROR, C.CString("WireGuard/GoBackend/Stacktrace"), (*C.char)(unsafe.Pointer(&buf[0]))) } } }() @@ -89,7 +89,7 @@ func wgTurnOn(ifnameRef string, tunFd int32, settings string) int32 { return -1 } - var uapi net.Listener; + var uapi net.Listener uapiFile, err := UAPIOpen(name) if err != nil { diff --git a/app/tools/libwg-go/src/queueconstants.go b/app/tools/libwg-go/src/queueconstants.go index 59dec481..dd11bf10 100644 --- a/app/tools/libwg-go/src/queueconstants.go +++ b/app/tools/libwg-go/src/queueconstants.go @@ -8,9 +8,9 @@ package main /* Reduce memory consumption for Android */ const ( - QueueOutboundSize = 1024 - QueueInboundSize = 1024 - QueueHandshakeSize = 1024 - MaxSegmentSize = 2200 - PreallocatedBuffersPerPool = 4096 + QueueOutboundSize = 1024 + QueueInboundSize = 1024 + QueueHandshakeSize = 1024 + MaxSegmentSize = 2200 + PreallocatedBuffersPerPool = 4096 ) diff --git a/app/tools/libwg-go/src/tun/api-android.go b/app/tools/libwg-go/src/tun/api-android.go index a5d6b092..75e80c5a 100644 --- a/app/tools/libwg-go/src/tun/api-android.go +++ b/app/tools/libwg-go/src/tun/api-android.go @@ -6,7 +6,7 @@ package tun import ( - "git.zx2c4.com/wireguard-go/rwcancel" + "golang.zx2c4.com/wireguard/rwcancel" "os" ) @@ -20,7 +20,7 @@ func CreateTUNFromFD(tunFd int) (TUNDevice, string, error) { nopi: true, } var err error - tun.fdCancel, err = rwcancel.NewRWCancel(tunFd) + tun.fdCancel, err = rwcancel.NewRWCancel(int(tun.fd)) if err != nil { return nil, "", err } |