From e3ad6b1c0e5a48f1c7d28b29889a2198feb86c17 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Tue, 10 Apr 2018 00:36:55 +0200 Subject: [PATCH] Actually use a cache if tlsDisableSessionTickets is not set --- dnscrypt-proxy/xtransport.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dnscrypt-proxy/xtransport.go b/dnscrypt-proxy/xtransport.go index f72071b8..b0c434c1 100644 --- a/dnscrypt-proxy/xtransport.go +++ b/dnscrypt-proxy/xtransport.go @@ -101,6 +101,9 @@ func (xTransport *XTransport) rebuildTransport() { tlsClientConfig := tls.Config{ SessionTicketsDisabled: xTransport.tlsDisableSessionTickets, } + if !xTransport.tlsDisableSessionTickets { + tlsClientConfig.ClientSessionCache = tls.NewLRUClientSessionCache(10) + } if xTransport.tlsCipherSuite != nil { tlsClientConfig.PreferServerCipherSuites = false tlsClientConfig.CipherSuites = xTransport.tlsCipherSuite