mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2024-11-16 19:56:51 +08:00
Fix: try to unmap lAddr on tproxy udp listener
This commit is contained in:
parent
59e618e971
commit
19441f5e4d
|
@ -72,6 +72,11 @@ func NewUDP(addr string, in chan<- *inbound.PacketAdapter) (*UDPListener, error)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if rAddr.Addr().Is4() {
|
||||||
|
// try to unmap 4in6 address
|
||||||
|
lAddr = netip.AddrPortFrom(lAddr.Addr().Unmap(), lAddr.Port())
|
||||||
|
}
|
||||||
handlePacketConn(in, buf[:n], lAddr, rAddr)
|
handlePacketConn(in, buf[:n], lAddr, rAddr)
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user