mirror of
https://github.com/refraction-networking/utls.git
synced 2025-04-03 03:57:36 +03:00
fix: fix tls versions for non-ech connections
This commit is contained in:
parent
3e541b6b3e
commit
bea2f33a11
1 changed files with 4 additions and 1 deletions
|
@ -576,7 +576,6 @@ func (uconn *UConn) MarshalClientHello() error {
|
|||
inner.supportedSignatureAlgorithms = uconn.HandshakeState.Hello.SupportedSignatureAlgorithms
|
||||
inner.sessionId = uconn.HandshakeState.Hello.SessionId
|
||||
inner.supportedCurves = uconn.HandshakeState.Hello.SupportedCurves
|
||||
inner.supportedVersions = []uint16{VersionTLS13} // hardcode tls 1.3 as it is the only supported version currently
|
||||
|
||||
ech.innerHello = inner
|
||||
|
||||
|
@ -761,6 +760,10 @@ func (uconn *UConn) SetTLSVers(minTLSVers, maxTLSVers uint16, specExtensions []T
|
|||
}
|
||||
|
||||
uconn.HandshakeState.Hello.SupportedVersions = makeSupportedVersions(minTLSVers, maxTLSVers)
|
||||
if uconn.config.EncryptedClientHelloConfigList == nil {
|
||||
uconn.config.MinVersion = minTLSVers
|
||||
uconn.config.MaxVersion = maxTLSVers
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue