1
0
mirror of https://github.com/fumiama/terasu.git synced 2026-06-05 01:00:23 +08:00

feat: limit tls minversion to 1.2

This commit is contained in:
源文雨
2025-10-06 10:51:44 +08:00
parent 2732915dda
commit 2e34cdfed3
4 changed files with 12 additions and 2 deletions

View File

@@ -60,6 +60,7 @@ var DefaultClient = http.Client{
}
tlsConn = tls.Client(conn, &tls.Config{
ServerName: host,
MinVersion: tls.VersionTLS12,
})
if terasu.DefaultFirstFragmentLen > 0 {
err = terasu.Use(tlsConn).HandshakeContext(ctx, terasu.DefaultFirstFragmentLen)
@@ -77,6 +78,7 @@ var DefaultClient = http.Client{
}
tlsConn = tls.Client(conn, &tls.Config{
ServerName: host,
MinVersion: tls.VersionTLS12,
})
err = tlsConn.HandshakeContext(ctx)
if err == nil {