nats-io / nats.c

A C client for NATS
Apache License 2.0
390 stars 137 forks source link

Add SNI extension when connecting with TLS #786

Closed thierryba closed 2 months ago

thierryba commented 2 months ago

Proposed change

It would be nice (and consistent with nats-py and the nats-server to set the SNI extension when connecting via TLS. That allows for load balancing to work properly in the cloud.

Use case

We hae nats instances for each of our customers. We are on the cloud. Today we have to use 1 load balancer per client. With the Fix to issue 780 and the addition of handshake_first, the last issue is that the Client Hello is missing the SNI extension. That can be done with 1 simple call to OpenSSL

Contribution

definitely.