3 ms·
How do you tell if a site requires SNI before connecting?
by pabs3 4y ago
How do you tell if a site requires SNI before connecting?
- 1vuio0pswjnm7 4y agoGenerally, you don't. With CDNs and other hosting providers, sometimes one can use heuristics. For example, all AWS sites require SNI and do not support TLS1.3. As such, before connecting, I can match the IP against a list of AWS IP ranges. If the site is using AWS then the page is retrieved from archive.org instead of Amazon. Internet Archive does not require SNI and supports TLS1.3. How do "tech" company-sponsored browsers tell if a site requires SNI before connecting. They don't. What so-called "modern" browsers do is they _assume_ all sites require SNI. That solution favours "tech" companies over user privacy. Same story with QUIC. I take a different approach. I assume no SNI is required and I train the proxy to recognise the sites I have accessed. I assume TLS TLS1.3 will be supported. No user-agent header. And so on. This is why I know there are many, many TLS sites that do not require SNI. As I learn about sites that require SNI or do not support TLS1.3, or have some other requirement, they are added to lists. These lists are "map" files that are loaded into the proxy's memory. Considering the two approaches, each involves a "guess" as to whether SNI is required before connecting. The first approach, i.e., assuming all sites require SNI, is, for me, wrong most of the time. I am not only accessing sites that require SNI. The second approach, i.e., "machine learning", uses stored information to educate the decision of whether to send SNI, use TLS1.3, etc. The second approach is, for me, right most of the time. And on a return visit to a site, the proxy is almost never wrong (unless perhaps the site has changed hosting providers); the proxy "knows" whether the site requires SNI.
- 1vuio0pswjnm7 4y agoCorrection: AWS does support TLS1.3