Adjust ProtoBuf of TLS & XTLS

This commit is contained in:
RPRX 2020-12-16 08:50:18 +00:00 committed by GitHub
parent dab978749c
commit ed0e9b12dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 114 additions and 115 deletions

View file

@ -1,7 +1,6 @@
package xtls
import (
"crypto/tls"
"crypto/x509"
"sync"
"time"
@ -205,13 +204,13 @@ func (c *Config) GetXTLSConfig(opts ...Option) *xtls.Config {
switch c.MinVersion {
case "1.0":
config.MinVersion = tls.VersionTLS10
config.MinVersion = xtls.VersionTLS10
case "1.1":
config.MinVersion = tls.VersionTLS11
config.MinVersion = xtls.VersionTLS11
case "1.2":
config.MinVersion = tls.VersionTLS12
config.MinVersion = xtls.VersionTLS12
case "1.3":
config.MinVersion = tls.VersionTLS13
config.MinVersion = xtls.VersionTLS13
}
return config
}