feat: introduce a new robust approach to handle tproxy udp. (#389)

This commit is contained in:
Ovear
2023-02-17 16:31:15 +08:00
committed by GitHub
parent b2d1cea759
commit 8e4dfbd10d
10 changed files with 246 additions and 12 deletions

View File

@@ -337,9 +337,12 @@ func handleUDPConn(packet C.PacketAdapter) {
}
oAddr := metadata.DstIP
natTable.Set(key, pc)
packet.SetNatTable(natTable)
packet.SetUdpInChan(udpQueue)
go handleUDPToLocal(packet, pc, key, oAddr, fAddr)
natTable.Set(key, pc)
handle()
}()
}