Feature: dial different NIC for all proxies (#1714)

This commit is contained in:
Dreamacro
2021-11-07 16:48:51 +08:00
committed by GitHub
parent bcb301b730
commit 1a7830f18e
21 changed files with 206 additions and 139 deletions

View File

@ -168,11 +168,7 @@ func updateGeneral(general *config.General, force bool) {
tunnel.SetMode(general.Mode)
resolver.DisableIPv6 = !general.IPv6
if general.Interface != "" {
dialer.DefaultOptions = []dialer.Option{dialer.WithInterface(general.Interface)}
} else {
dialer.DefaultOptions = nil
}
dialer.DefaultInterface.Store(general.Interface)
iface.FlushCache()