mirror of
https://github.com/MetaCubeX/Clash.Meta.git
synced 2025-04-11 04:50:56 +00:00
Update udp.go
This commit is contained in:
parent
f63df4bdce
commit
3a773d9b87
1 changed files with 2 additions and 1 deletions
|
@ -81,12 +81,13 @@ func NewUDP(addr string, tunnel C.Tunnel, additions ...inbound.Addition) (*UDPLi
|
|||
}
|
||||
|
||||
dscp, _ := getDSCP(oob[:oobn])
|
||||
additions := append(additions, inbound.WithDSCP(dscp)) // don't change outside additions
|
||||
|
||||
if rAddr.Addr().Is4() {
|
||||
// try to unmap 4in6 address
|
||||
lAddr = netip.AddrPortFrom(lAddr.Addr().Unmap(), lAddr.Port())
|
||||
}
|
||||
handlePacketConn(l, tunnel, buf[:n], lAddr, rAddr, append(additions, inbound.WithDSCP(dscp))...)
|
||||
handlePacketConn(l, tunnel, buf[:n], lAddr, rAddr, additions...)
|
||||
}
|
||||
}()
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue