Fix: should flush interface cache by switch network

This commit is contained in:
yaling888 2022-05-18 04:45:19 +08:00
parent 7a406b991e
commit 5642d9c98e

View File

@ -7,6 +7,7 @@ import (
"time"
"github.com/Dreamacro/clash/component/dialer"
"github.com/Dreamacro/clash/component/iface"
"github.com/Dreamacro/clash/log"
)
@ -61,6 +62,8 @@ func StartDefaultInterfaceChangeMonitor() {
dialer.DefaultInterface.Store(interfaceName)
iface.FlushCache()
log.Warnln("[TUN] default interface changed by monitor, %s => %s", old, interfaceName)
case <-monitorStop:
break