Update xtransport.go

Follow overrideCipherSuite commit
This commit is contained in:
ACE 2025-01-27 01:22:22 +02:00 committed by GitHub
parent b20b59e9ee
commit 78e6dc6b90
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -226,7 +226,8 @@ func (xTransport *XTransport) rebuildTransport() {
} else { } else {
tlsClientConfig.ClientSessionCache = tls.NewLRUClientSessionCache(10) tlsClientConfig.ClientSessionCache = tls.NewLRUClientSessionCache(10)
} }
if xTransport.tlsCipherSuite != nil { overrideCipherSuite := xTransport.tlsCipherSuite != nil && len(xTransport.tlsCipherSuite) > 0
if overrideCipherSuite != nil {
tlsClientConfig.PreferServerCipherSuites = false tlsClientConfig.PreferServerCipherSuites = false
tlsClientConfig.MaxVersion = tls.VersionTLS13 tlsClientConfig.MaxVersion = tls.VersionTLS13
var tls13 = "198 199 4865 4866 4867 4868 4869 49332 49333" var tls13 = "198 199 4865 4866 4867 4868 4869 49332 49333"