mirror of
https://github.com/xjasonlyu/tun2socks.git
synced 2025-10-05 16:56:54 +08:00
Refactor(dialer): use DefaultDialer
(#465)
This commit is contained in:
@@ -117,13 +117,13 @@ func general(k *Key) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
dialer.DefaultInterfaceName.Store(iface.Name)
|
||||
dialer.DefaultInterfaceIndex.Store(int32(iface.Index))
|
||||
dialer.DefaultDialer.InterfaceName.Store(iface.Name)
|
||||
dialer.DefaultDialer.InterfaceIndex.Store(int32(iface.Index))
|
||||
log.Infof("[DIALER] bind to interface: %s", k.Interface)
|
||||
}
|
||||
|
||||
if k.Mark != 0 {
|
||||
dialer.DefaultRoutingMark.Store(int32(k.Mark))
|
||||
dialer.DefaultDialer.RoutingMark.Store(int32(k.Mark))
|
||||
log.Infof("[DIALER] set fwmark: %#x", k.Mark)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user