1
0
mirror of https://github.com/fumiama/water.git synced 2026-06-06 18:50:29 +08:00

fix nil if name

This commit is contained in:
fumiama
2021-12-29 21:53:30 +08:00
parent 67285c9b67
commit 90abaa32e4

View File

@@ -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