From 90abaa32e415d182540fd3bc398ca7f3da9cc7b9 Mon Sep 17 00:00:00 2001 From: fumiama Date: Wed, 29 Dec 2021 21:53:30 +0800 Subject: [PATCH] fix nil if name --- syscalls_windows.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/syscalls_windows.go b/syscalls_windows.go index 613fab7..46c013e 100644 --- a/syscalls_windows.go +++ b/syscalls_windows.go @@ -336,6 +336,9 @@ func openDev(config Config) (ifce *Interface, err error) { return openTap(config) } // TUN + if config.InterfaceName == "" { + config.InterfaceName = "Wintun" + } ad, err := wintun.OpenAdapter(config.InterfaceName) if err != nil { return nil, err