Handle PROXY protocol with UDP
mainThe PROXY protocol for UDP requires a header in every datagram. Because net.Listener and net.Conn are designed for continuous streams, they cannot be used for UDP. Instead, use proxyproto.ParseUDPDatagram to read headers and Header.FormatUDPDatagram to prepare outgoing packets.
Note: ParseUDPDatagram does not have a built-in trusted-source policy. You must manually verify the sender's address from net.PacketConn.ReadFrom before trusting the address returned by the header.