Skip to content

Commit

Permalink
feat: copy some certificate related options for uTLS (#3240)
Browse files Browse the repository at this point in the history
  • Loading branch information
AkinoKaede authored Dec 8, 2024
1 parent a72c4d2 commit 9ccb080
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions transport/internet/tls/utls/utls.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 9ccb080

Please sign in to comment.