[Libwebsockets] Use server IP address instead of server name

andy at warmcat.com andy at warmcat.com
Tue Aug 18 13:09:23 CEST 2020



On August 18, 2020 11:05:24 AM UTC, Alessandro Longobardi <alessandro.longobardi at vrmedia.it> wrote:
>Hi,
>i need to connect to the a server using the server ip address instead
>of server name.
>Is there a way using this
>https://libwebsockets.org/lws-api-doc-master/html/structlws__client__connect__info.html
>?

Just give it, eg, "123.123.123.123".

If it's tls, the certs are validated against the hostname you gave for the connection.  A cert for 'xyz.com' will fail to validate if it claims to be for 'xyz.com' but you got there from the specific ip address.

-Andy

>Thanks,
>Alessandro


More information about the Libwebsockets mailing list