mirror of
https://github.com/XTLS/Xray-core.git
synced 2026-10-21 16:54:29 +00:00
revert tls.go
This commit is contained in:
@@ -147,11 +147,6 @@ func GeneraticUClient(c net.Conn, config *tls.Config) *utls.UConn {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func copyConfig(c *tls.Config) *utls.Config {
|
func copyConfig(c *tls.Config) *utls.Config {
|
||||||
curvePreferences := make([]utls.CurveID, 0, len(c.CurvePreferences))
|
|
||||||
for _, curve := range c.CurvePreferences {
|
|
||||||
curvePreferences = append(curvePreferences, utls.CurveID(curve))
|
|
||||||
}
|
|
||||||
|
|
||||||
config := &utls.Config{
|
config := &utls.Config{
|
||||||
Rand: c.Rand,
|
Rand: c.Rand,
|
||||||
RootCAs: c.RootCAs,
|
RootCAs: c.RootCAs,
|
||||||
@@ -161,10 +156,6 @@ func copyConfig(c *tls.Config) *utls.Config {
|
|||||||
KeyLogWriter: c.KeyLogWriter,
|
KeyLogWriter: c.KeyLogWriter,
|
||||||
EncryptedClientHelloConfigList: c.EncryptedClientHelloConfigList,
|
EncryptedClientHelloConfigList: c.EncryptedClientHelloConfigList,
|
||||||
NextProtos: c.NextProtos,
|
NextProtos: c.NextProtos,
|
||||||
CipherSuites: c.CipherSuites,
|
|
||||||
MinVersion: c.MinVersion,
|
|
||||||
MaxVersion: c.MaxVersion,
|
|
||||||
CurvePreferences: curvePreferences,
|
|
||||||
}
|
}
|
||||||
return config
|
return config
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user