mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2026-02-26 16:57:08 +00:00
fix: destination should unmap before find interface
This commit is contained in:
@@ -73,7 +73,7 @@ func ListenPacket(ctx context.Context, network, address string, rAddrPort netip.
|
||||
}
|
||||
if opt.interfaceName == "" {
|
||||
if finder := DefaultInterfaceFinder.Load(); finder != nil {
|
||||
opt.interfaceName = finder.FindInterfaceName(rAddrPort.Addr())
|
||||
opt.interfaceName = finder.FindInterfaceName(rAddrPort.Addr().Unmap())
|
||||
}
|
||||
}
|
||||
if rAddrPort.Addr().Unmap().IsLoopback() {
|
||||
|
||||
@@ -408,7 +408,7 @@ func Dial(network, address string) (*TCPConn, error) {
|
||||
ifaceName := dialer.DefaultInterface.Load()
|
||||
if ifaceName == "" {
|
||||
if finder := dialer.DefaultInterfaceFinder.Load(); finder != nil {
|
||||
ifaceName = finder.FindInterfaceName(rAddrPort.Addr())
|
||||
ifaceName = finder.FindInterfaceName(rAddrPort.Addr().Unmap())
|
||||
}
|
||||
}
|
||||
if len(ifaceName) > 0 {
|
||||
|
||||
Reference in New Issue
Block a user