From f51602654002c11b896ca570aad0bb9ba3c49377 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Sun, 19 Feb 2023 12:01:46 +0800 Subject: [PATCH] Fix shadowtls in go versiojns below 1.20 --- transport/shadowtls/tls_go119/handshake_client.go | 1 + 1 file changed, 1 insertion(+) diff --git a/transport/shadowtls/tls_go119/handshake_client.go b/transport/shadowtls/tls_go119/handshake_client.go index f2deb822..0cae1ee6 100644 --- a/transport/shadowtls/tls_go119/handshake_client.go +++ b/transport/shadowtls/tls_go119/handshake_client.go @@ -145,6 +145,7 @@ func (c *Conn) makeClientHello() (*clientHelloMsg, ecdheParameters, error) { if err := config.SessionIDGenerator(hello.marshal(), hello.sessionId); err != nil { return nil, nil, errors.New("tls: generate session id failed: " + err.Error()) } + hello.raw = nil } else { if _, err := io.ReadFull(config.rand(), hello.sessionId); err != nil { return nil, nil, errors.New("tls: short read from Rand: " + err.Error())