3 ms·
In studies I have done, most websites on the internet do not require SNI. Thus with most websites there is no problem of domain names in plaintext being sent in
by 1vuio0pswjnm7 6y ago
In studies I have done, most websites on the internet do not require SNI. Thus with most websites there is no problem of domain names in plaintext being sent in ClientHello packets, and no need for ESNI.
There are not many ESNI-enabled websites on the web, but Cloudflare's CDN offers ESNI service. Thus, one can use ESNI for websites that use Cloudflare.
I have been testing ESNI for a while now. I use it for reading websites text-only with no ads or tracking. I use links; I am not a fan of "modern" browsers. IMHO, Cloudflare's ESNI is very fast. It seems even faster than normal TLSv1.2 or TLSv1.3.
https://defo.ie https://defo.ie is one source for ESNI info, including links to source code on Github for ESNI-enabled openssl, curl, lighttpd, etc. If you compile the ESNI-enabled openssl from Github, below is a one-liner and a small script to try ESNI out.
First you must fetch an ESNI key in a TXT RR from Cloudflare DNS. Then you use the key to submit HTTP requests for about an hour, until it expires. Then you must get a new key.
# one-liner to fetch a key
# if you run your own DNS you could then put this into a TXT RR in your own zone file
#!/bin/sh
curl "https://cloudflare-dns.com/dns-query?name=_esni.www.cloudflare.com&type=TXT&ct=application/dns-json"|grep -o [/][^\\]* > esnirr
It seems that connecting to cloudflare-dns.com to fetch the initial key via DoH requires SNI. Why not have a bootstrap server that is not on a shared IP and hence does not require SNI.
# try out ESNI using the key
# usage: echo https://some.cloudflare.website.com|$0
# usage: $0 HEAD < file-of-urls-with-same-domainname -- (http/1.1 pipelining)
#!/bin/sh
read k < esnirr
exec 2>/dev/null
(while read uri;do case $uri in http://*)uri=${uri#*http://};;https://*)uri=${uri#*https://};esac;
export host=${uri%%/*};path=/${uri#*/};test ! ${#path} -gt ${#url}||path=/;
printf ${1-GET}' '$path' HTTP/1.1\r\nHost: '$host'\r\nConnection: keep-alive\r\n\r\n';
done|sed 'N;$!P;$!D;$d';printf 'Connection: close\r\n\r\n') > .http;
host=$(sed -n '/^Host: /{s/.*Host: //;p;q;}' .http|tr -d '\r');
# Any Cloudflare IP should work - 104.16.249.249 is just one example
# https://www.cloudflare.com/ips-v4
openssl s_client -4 -tls1_3 -noservername -ign_eof -verify 9 -connect 104.16.249.249:443 -esni $host -esnirr $k < .http
rm .http
"Modern" browsers are stupid. They are sending domain names in the clear even when the website is not using SNI.
https://github.com/kontaxis/snidump https://github.com/kontaxis/snidump