Wintun: use new swdevice-based API for upcoming Wintun 0.14

This commit is contained in:
yaling888
2021-11-03 15:10:31 +08:00
parent 78cef7df59
commit c824ace2d7
37 changed files with 632 additions and 5770 deletions

View File

@ -191,9 +191,8 @@ func updateGeneral(general *config.General, force bool) {
if err == nil {
if autoDetectInterfaceName != "" && autoDetectInterfaceName != "<nil>" {
general.Interface = autoDetectInterfaceName
log.Infoln("Use auto detect interface: %s", general.Interface)
} else {
log.Debugln("Auto detect interface is empty.")
log.Debugln("Auto detect interface name is empty.")
}
} else {
log.Debugln("Can not find auto detect interface. %s", err.Error())
@ -202,6 +201,7 @@ func updateGeneral(general *config.General, force bool) {
if general.Interface != "" {
dialer.DefaultOptions = []dialer.Option{dialer.WithInterface(general.Interface)}
log.Infoln("Use interface name: %s", general.Interface)
} else {
dialer.DefaultOptions = nil
}