Add windows support and update wireguard-go deps

This commit is contained in:
mlsmaycon
2021-06-06 00:40:44 +02:00
parent 3520b6471b
commit 59360519d6
7 changed files with 152 additions and 63 deletions

17
iface/iface_unix.go Normal file
View File

@ -0,0 +1,17 @@
// +build linux darwin
package iface
import (
"golang.zx2c4.com/wireguard/ipc"
"net"
)
// getUAPI returns a Listener
func getUAPI(iface string) (net.Listener, error) {
tunSock, err := ipc.UAPIOpen(iface)
if err != nil {
return nil, err
}
return ipc.UAPIListen(iface, tunSock)
}