Fix processing domain address in packet

This commit is contained in:
世界 committed 2023-04-14 20:59:57 +08:00
1 parent 34cc7f176e
commit 11c50c7558
6 files changed
+27 -6

No files matched your search

+5 -1
View File
@@ -131,7 +131,11 @@ func (c *ClientPacketConn) ReadFrom(p []byte) (n int, addr net.Addr, err error)
return
}
n = buffer.Len()
addr = destination.UDPAddr()
if destination.IsFqdn() {
addr = destination
} else {
addr = destination.UDPAddr()
}
return
}