iroh icon indicating copy to clipboard operation
iroh copied to clipboard

Connection to relay servers should resume TLS sessions on re-connect

Open flub opened this issue 1 year ago • 4 comments

The relay client in the MagicSock sometimes wants to reconnect to be sure the connection is good. When doing so however it does not use the RLS session resumption, here the relevant rustls logs:

rustls::client::hs: 83: No cached session for IpAddress(V4(Ipv4Addr([127, 0, 0, 1])))
rustls::client::hs: 141: Not resuming any session
rustls::client::hs: 532: Sending ClientHello Message
...

This despite the server issuing tickets after the connection is established:

rustls::server::tls13: 1342: sending new ticket HandshakeMessagePayload 

It would be good if we could re-use this ticket and setup the subsequent connections faster.

flub avatar Dec 31 '24 13:12 flub