1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-21 09:36:34 -05:00

feat: copy some certificate related options for uTLS (#3240)

This commit is contained in:
秋野かえで 2024-12-09 05:44:37 +08:00 committed by GitHub
parent a72c4d2644
commit 9ccb080dcc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -106,11 +106,15 @@ func (u uTLSClientConnection) GetConnectionApplicationProtocol() (string, error)
func uTLSConfigFromTLSConfig(config *systls.Config) (*utls.Config, error) { // nolint: unparam
uconfig := &utls.Config{
Rand: config.Rand,
Time: config.Time,
RootCAs: config.RootCAs,
NextProtos: config.NextProtos,
ServerName: config.ServerName,
Rand: config.Rand,
Time: config.Time,
RootCAs: config.RootCAs,
NextProtos: config.NextProtos,
ServerName: config.ServerName,
VerifyPeerCertificate: config.VerifyPeerCertificate,
InsecureSkipVerify: config.InsecureSkipVerify,
ClientAuth: utls.ClientAuthType(config.ClientAuth),
ClientCAs: config.ClientCAs,
}
return uconfig, nil
}