fix: udp panic when server return a domain name

This commit is contained in:
wwqgtxx
2023-05-27 13:43:41 +08:00
parent 4971b9d804
commit 73140ab826
3 changed files with 25 additions and 19 deletions

View File

@ -383,10 +383,10 @@ func handleUDPConn(packet C.PacketAdapter) {
log.Infoln("[UDP] %s --> %s doesn't match any rule using DIRECT", metadata.SourceDetail(), metadata.RemoteAddress())
}
oAddr := metadata.DstIP
oAddrPort := metadata.AddrPort()
natTable.Set(key, pc)
go handleUDPToLocal(packet, pc, key, oAddr, fAddr)
go handleUDPToLocal(packet, pc, key, oAddrPort, fAddr)
handle()
}()