Merge from remote branch

This commit is contained in:
yaling888
2021-09-08 04:42:56 +08:00
33 changed files with 857 additions and 320 deletions

View File

@ -14,6 +14,7 @@ import (
"github.com/Dreamacro/clash/adapter/outboundgroup"
"github.com/Dreamacro/clash/component/auth"
"github.com/Dreamacro/clash/component/dialer"
"github.com/Dreamacro/clash/component/iface"
"github.com/Dreamacro/clash/component/profile"
"github.com/Dreamacro/clash/component/profile/cachefile"
"github.com/Dreamacro/clash/component/resolver"
@ -195,13 +196,13 @@ func updateGeneral(general *config.General, force bool) {
}
if general.Interface != "" {
dialer.DialHook = dialer.DialerWithInterface(general.Interface)
dialer.ListenPacketHook = dialer.ListenPacketWithInterface(general.Interface)
dialer.DefaultOptions = []dialer.Option{dialer.WithInterface(general.Interface)}
} else {
dialer.DialHook = nil
dialer.ListenPacketHook = nil
dialer.DefaultOptions = nil
}
iface.FlushCache()
if !force {
log.SetLevel(general.LogLevel)
return