Fix: should flush interface cache by switch network
This commit is contained in:
parent
7a406b991e
commit
5642d9c98e
@ -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
|
||||
|
Reference in New Issue
Block a user