mirror of
https://github.com/fumiama/water.git
synced 2026-06-28 07:50:25 +08:00
Support new config method.
Refined code.
This commit is contained in:
12
if_windows.go
Normal file
12
if_windows.go
Normal file
@@ -0,0 +1,12 @@
|
||||
// +build windows
|
||||
|
||||
package water
|
||||
|
||||
import "errors"
|
||||
|
||||
func newDev(config Config) (ifce *Interface, err error) {
|
||||
if config.DeviceType != TAP && config.DeviceType != TUN {
|
||||
return nil, errors.New("unknown device type")
|
||||
}
|
||||
return openDev(config)
|
||||
}
|
||||
Reference in New Issue
Block a user