Use retrossl's session resumption; take its new ciphers

retrossl now has session resumption, renegotiation, IDEA and RC2. Old
clients through CONNECT resume their sessions, which spares slow
machines an RSA decryption per connection.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRH4kntyPfrY1bFWC3
This commit is contained in:
Claude committed 2026-11-11 13:26:13 +00:00
1 parent 0dbeb5c081
commit 86afe907d9
4 files changed
+11 -6

No files matched your search

+4 -2
View File
@@ -165,8 +165,10 @@ and TLS 1.0 server. The proxy looks at each client's first bytes:
SSL 3.0 and TLS 1.0 to 1.3 are on, and SSL 2.0 is off. `SslCipherSuites`
also accepts retrossl's suite names, such as `TLS_RSA_EXPORT_WITH_RC4_40_MD5`.
retrossl offers AES, 3DES, RC4 and DES, and the 40- and 56-bit export suites
for export builds of old browsers. Site certificates must have RSA keys,
retrossl offers AES, 3DES, RC4, IDEA, RC2 and DES, and the 40- and 56-bit
export suites for export builds of old browsers. Sessions resume, which
saves slow machines an RSA operation on every connection, and clients that
support secure renegotiation may renegotiate. Site certificates must have RSA keys,
which the proxy's do. These protocols are easy to break, so the traffic
between an old browser and the proxy should be treated as readable. Clients
that use the plain HTTP proxy instead are not affected: the browser asks for
+1 -1
View File
@@ -7,4 +7,4 @@ require (
golang.org/x/text v0.44.0
)
require github.com/D-Modem/retrossl v0.0.0-20261111130219-1b844ee3e801
require github.com/D-Modem/retrossl v0.0.0-20261111132527-5c74d8027d9e
+2 -2
View File
@@ -1,5 +1,5 @@
github.com/D-Modem/retrossl v0.0.0-20261111130219-1b844ee3e801 h1:QsbvUo6CAawdQTChTwd5wFMS7g2bYMoVL6d1OxnLFdI=
github.com/D-Modem/retrossl v0.0.0-20261111130219-1b844ee3e801/go.mod h1:+/qpHsaYk4DslA351ZMumscq9/Iwl/K5vS4PhUVLOR8=
github.com/D-Modem/retrossl v0.0.0-20261111132527-5c74d8027d9e h1:4v6nEr6aSiE8H/RmTpg29q+P/RFvjzUlnTFRCdvu8XQ=
github.com/D-Modem/retrossl v0.0.0-20261111132527-5c74d8027d9e/go.mod h1:+/qpHsaYk4DslA351ZMumscq9/Iwl/K5vS4PhUVLOR8=
github.com/dlclark/regexp2 v1.12.0 h1:0j4c5qQmnC6XOWNjP3PIXURXN2gWx76rd3KvgdPkCz8=
github.com/dlclark/regexp2 v1.12.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
golang.org/x/text v0.44.0 h1:YItdp/mQNGnsmrgpcdA5yQ3bnRxCfo/Tj/iByGW9GGo=
+4 -1
View File
@@ -28,7 +28,10 @@ func (s *Server) makeClientRetro() *retrossl.Config {
if len(on) == 0 {
return nil
}
rc := &retrossl.Config{MinVersion: on[0], MaxVersion: on[len(on)-1]}
// One session cache for every site: a session only resumes with the
// certificate it was made with.
rc := &retrossl.Config{MinVersion: on[0], MaxVersion: on[len(on)-1],
SessionCache: retrossl.NewSessionCache(0, 0)}
if len(s.cfg.SslCipherSuites) > 0 {
rc.CipherSuites = []uint16{}
for _, cs := range retrossl.CipherSuites() {