Do not copy hostname to socket options servername (server name indication)
urbanhusky opened this issue · comments
urbanhusky commented
RFC 6066 specifies that the Server Name Indication must not be an IP address.
Unfortunately amqplib blindly copies the hostname from the url to this field, which causes DEP0123 warnings when connecting to an IP address.
Besides, the hostname is not necessarily identical to the server name indication, so it should be configurable e.g. via the socketOptions
provided to connect(…)
Source:
https://github.com/amqp-node/amqplib/blob/main/lib/connect.js#L109
https://datatracker.ietf.org/doc/html/rfc6066#section-3
Stephen Cresswell commented
Hi @urbanhusky,
Thanks for reporting. I agree.
Stephen Cresswell commented
Published as amqplib@0.10.1