From fa20ecfcc0f42cd1545367a35f0cb21399b2add5 Mon Sep 17 00:00:00 2001 From: Mingye Chen Date: Thu, 27 Mar 2025 16:33:53 -0600 Subject: [PATCH] fix: do not change outer sni back to real sni --- u_conn.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/u_conn.go b/u_conn.go index 8668533..cc1f12d 100644 --- a/u_conn.go +++ b/u_conn.go @@ -587,14 +587,12 @@ func (uconn *UConn) MarshalClientHello() error { return fmt.Errorf("sni extension missing while attempting ECH") } - oldSNI := uconn.Extensions[sniExtIdex] uconn.Extensions[sniExtIdex] = &SNIExtension{ ServerName: string(ech.config.PublicName), } uconn.computeAndUpdateOuterECHExtension(inner, ech, true) - uconn.Extensions[sniExtIdex] = oldSNI uconn.echCtx = ech return nil }