chore: cleanup natTable's api
This commit is contained in:
@ -82,6 +82,11 @@ func UDPIn() chan<- C.PacketAdapter {
|
||||
return udpQueue
|
||||
}
|
||||
|
||||
// NatTable return nat table
|
||||
func NatTable() C.NatTable {
|
||||
return natTable
|
||||
}
|
||||
|
||||
// Rules return all rules
|
||||
func Rules() []C.Rule {
|
||||
return rules
|
||||
@ -338,8 +343,6 @@ 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)
|
||||
|
||||
|
Reference in New Issue
Block a user