1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-06-10 09:50:43 +00:00

sync fly, enable tls 1.3

This commit is contained in:
Kslr 2019-05-17 17:54:04 +08:00
parent 11dddd9864
commit c5635f9507
2 changed files with 20 additions and 0 deletions

View File

@ -188,6 +188,10 @@ func (c *Config) GetTLSConfig(opts ...Option) *tls.Config {
if !c.AllowInsecureCiphers && len(config.CipherSuites) == 0 {
config.CipherSuites = []uint16{
tls.TLS_AES_128_GCM_SHA256,
tls.TLS_AES_256_GCM_SHA384,
tls.TLS_CHACHA20_POLY1305_SHA256,
tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,
tls.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,
tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,

View File

@ -0,0 +1,16 @@
// +build !confonly
package tls
import (
"os"
"strings"
)
func init() {
// opt-in TLS 1.3 for Go1.12
// TODO: remove this line when Go1.13 is released.
if !strings.Contains(os.Getenv("GODEBUG"), "tls13") {
_ = os.Setenv("GODEBUG", os.Getenv("GODEBUG")+",tls13=1")
}
}