chore: update to go1.19
This commit is contained in:
parent
40d2421db9
commit
45453b20fa
61 changed files with 519 additions and 493 deletions
|
@ -22,7 +22,7 @@ type Options struct {
|
|||
CurvePreferences []string `json:"curvePreferences,omitempty" toml:"curvePreferences,omitempty" yaml:"curvePreferences,omitempty" export:"true"`
|
||||
ClientAuth ClientAuth `json:"clientAuth,omitempty" toml:"clientAuth,omitempty" yaml:"clientAuth,omitempty"`
|
||||
SniStrict bool `json:"sniStrict,omitempty" toml:"sniStrict,omitempty" yaml:"sniStrict,omitempty" export:"true"`
|
||||
PreferServerCipherSuites bool `json:"preferServerCipherSuites,omitempty" toml:"preferServerCipherSuites,omitempty" yaml:"preferServerCipherSuites,omitempty" export:"true"`
|
||||
PreferServerCipherSuites bool `json:"preferServerCipherSuites,omitempty" toml:"preferServerCipherSuites,omitempty" yaml:"preferServerCipherSuites,omitempty" export:"true"` // Deprecated: https://github.com/golang/go/issues/45430
|
||||
ALPNProtocols []string `json:"alpnProtocols,omitempty" toml:"alpnProtocols,omitempty" yaml:"alpnProtocols,omitempty" export:"true"`
|
||||
}
|
||||
|
||||
|
|
|
@ -299,18 +299,13 @@ func buildTLSConfig(tlsOption Options) (*tls.Config, error) {
|
|||
}
|
||||
}
|
||||
|
||||
// Set PreferServerCipherSuites.
|
||||
conf.PreferServerCipherSuites = tlsOption.PreferServerCipherSuites
|
||||
|
||||
// Set the minimum TLS version if set in the config
|
||||
if minConst, exists := MinVersion[tlsOption.MinVersion]; exists {
|
||||
conf.PreferServerCipherSuites = true
|
||||
conf.MinVersion = minConst
|
||||
}
|
||||
|
||||
// Set the maximum TLS version if set in the config TOML
|
||||
if maxConst, exists := MaxVersion[tlsOption.MaxVersion]; exists {
|
||||
conf.PreferServerCipherSuites = true
|
||||
conf.MaxVersion = maxConst
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue