cloudflare / tls-tris

crypto/tls, now with 100% more 1.3. THE API IS NOT STABLE AND DOCUMENTATION IS NOT GUARANTEED.
Other
292 stars 50 forks source link

Support ESNI #138

Open kriskwiatkowski opened 6 years ago

kriskwiatkowski commented 6 years ago

The point of this ticket is to support E-SNI:

https://blog.cloudflare.com/encrypted-sni https://tools.ietf.org/html/draft-ietf-tls-esni-01

f4nff commented 6 years ago

good~

CetinSert commented 5 years ago

@henrydcase @f4nff @agl @henrydcase @FiloSottile Is there a version of this library or any other Go TLS 1.3 library with E-SNI support available for testing? I would like to setup a censorship circumvention tool for Korea.

f4nff commented 5 years ago

There are currently no golang libraries that can be tested for e-sni.

Lekensteyn commented 5 years ago

Status of the ecosystem:

Todo:

My initial thought is to include an array of ESNIKeys items. For TLS clients, the first item will be used. For TLS servers, a matching entry will be used. The DNS query should be handled outside crypto/tls, but we could provide some example code in a test (or maybe a separate package).

Alternatively, two functions fields could be created, ClientESNIKeys: ESNIKeys (which would be a single item) and GetServerESNIKeys: func(record_digest []byte). The return values are TBD, but as the server can also provide ESNIKeys in its response for use with future connections, this must somehow be exposed as well.

I'll investigate this later.