Browse Source

Added TODO for makeFrontedHTTPClient TLS cache

Amir Khan 1 year ago
parent
commit
40ae494113
1 changed files with 6 additions and 1 deletions
  1. 6 1
      psiphon/net.go

+ 6 - 1
psiphon/net.go

@@ -530,7 +530,12 @@ func makeFrontedHTTPClient(
 		TransformedHostName:      meekTransformedHostName,
 		ClientTunnelProtocol:     effectiveTunnelProtocol,
 		NetworkLatencyMultiplier: networkLatencyMultiplier,
-		TLSClientSessionCache:    common.WrapUtlsClientSessionCache(utls.NewLRUClientSessionCache(0), meekDialAddress),
+		// TODO: Change hard-coded session key be something like FrontingProviderID + BrokerID.
+		// This is necessary once longer-term TLS caches are added.
+		// meekDialAddress, based on meekFrontingDialAddress has couple of issues. For some providers there's
+		// only a couple or even just one possible value, in other cases there are millions of possible values
+		// and cached values wont' be used as often as they ought to be.
+		TLSClientSessionCache: common.WrapUtlsClientSessionCache(utls.NewLRUClientSessionCache(0), meekDialAddress),
 	}
 
 	if !skipVerify {