diff --git a/netclient/local/local.go b/netclient/local/local.go index 40f7fdfd..4eccb524 100644 --- a/netclient/local/local.go +++ b/netclient/local/local.go @@ -7,7 +7,7 @@ import ( "net" "runtime" "strings" - + "os/exec" "github.com/gravitl/netmaker/netclient/ncutils" ) @@ -54,7 +54,9 @@ func SetIPForwardingMac() error { func IsWGInstalled() bool { out, err := ncutils.RunCmd("wg help", true) if err != nil { - return false + _, err1 := exec.LookPath("wireguard-go") + _, err2 := exec.LookPath("boringtun") + return err1 == nil || err2 == nil } return strings.Contains(out, "Available subcommand") } diff --git a/netclient/main.go b/netclient/main.go index e8d91483..5c69679b 100644 --- a/netclient/main.go +++ b/netclient/main.go @@ -342,8 +342,12 @@ func main() { _, err = exec.LookPath("wg") if err != nil { - log.Println(err) - log.Fatal("WireGuard not installed. Please install WireGuard (wireguard-tools) and try again.") + userspace := os.Getenv("WG_QUICK_USERSPACE_IMPLEMENTATION") + if userspace == "" { + log.Println(err) + log.Fatal("WireGuard not installed. Please install WireGuard (wireguard-tools) and try again.") + } + ncutils.PrintLog("Running with userspace wireguard: "+userspace, 0) } } if !ncutils.IsKernel() {