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

This commit is contained in:
yaling888
2021-11-03 15:02:40 +08:00
parent b515a4e270
commit ac9e5c6913
36 changed files with 628 additions and 5767 deletions

View File

@ -183,9 +183,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())
@ -194,6 +193,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
}