1

I'm using Retrofit2 (that uses OkHttpClient) to make REST requests to the server. I'm using TLSv1.3 protocol.

How can I enable and configure SNI (Server Name Indication) for my client?

Igor_M
  • 142
  • 1
  • 7

1 Answers1

1

It's enabled automatically using the hostname in the URL.

Jesse Wilson
  • 36,548
  • 7
  • 116
  • 123
  • Do we have any control on it? Let's assume that tomorrow I'll need to disable it, test it, overwrite something,.... Where is entry point? In ConnectionSpec? SslContext? – Igor_M Jan 11 '22 at 21:16
  • It's all internal. If you want to do domain fronting, you can change the URL no you're connecting to but set something else in the `Host` HTTP header. – Jesse Wilson Jan 14 '22 at 12:04