mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-05-01 01:44:15 +00:00
Add minVersion setting for TLS & XTLS (#77)
This commit is contained in:
parent
45f44c401a
commit
dab978749c
7 changed files with 150 additions and 96 deletions
|
@ -196,6 +196,17 @@ func (c *Config) GetTLSConfig(opts ...Option) *tls.Config {
|
|||
opt(config)
|
||||
}
|
||||
|
||||
switch c.MinVersion {
|
||||
case "1.0":
|
||||
config.MinVersion = tls.VersionTLS10
|
||||
case "1.1":
|
||||
config.MinVersion = tls.VersionTLS11
|
||||
case "1.2":
|
||||
config.MinVersion = tls.VersionTLS12
|
||||
case "1.3":
|
||||
config.MinVersion = tls.VersionTLS13
|
||||
}
|
||||
|
||||
config.Certificates = c.BuildCertificates()
|
||||
config.BuildNameToCertificate()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue