1
0
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:
lucus
2017-01-09 18:55:36 +09:00
parent cde943e7d7
commit 933e95c058
3 changed files with 81 additions and 27 deletions

12
if_windows.go Normal file
View 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)
}