Fix processing domain address in packet

This commit is contained in:
世界
2023-04-12 20:44:17 +08:00
parent 34cc7f176e
commit 11c50c7558
6 changed files with 27 additions and 6 deletions

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
}