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