在 okHttp 中,基于 IP 的 uri 中看不到 SNI,而 SNI 用于基于 FQDN 的 uri

In okHttp, SNI is not seen in IP based uri whereas SNI is coming for FQDN based uri

默认情况下,okHttp 支持 SNI,但对于基于 IP 的 uri,我们无法在 pcap 中看到 SNI,它无法正常工作。

需要帮助解决。

SNI 仅用于 DNS 主机名。它不存在作为 IP 地址的可能性。

https://en.wikipedia.org/wiki/Server_Name_Indication

https://www.rfc-editor.org/rfc/rfc3546#section-3.1

"HostName" contains the fully qualified DNS hostname of the server, as understood by the client. The hostname is represented as a byte string using UTF-8 encoding [UTF8], without a trailing dot.