enable TLS 1.3 by default

pull/2531/head
liberal-boy 6 years ago committed by Nicholas Wang
parent 9f8a865772
commit dc8af28d56
No known key found for this signature in database
GPG Key ID: F20CA399C9BD9100

@ -4,6 +4,7 @@ package tls
import ( import (
"crypto/tls" "crypto/tls"
"os"
"v2ray.com/core/common/buf" "v2ray.com/core/common/buf"
"v2ray.com/core/common/net" "v2ray.com/core/common/net"
@ -65,3 +66,9 @@ func Server(c net.Conn, config *tls.Config) net.Conn {
tlsConn := tls.Server(c, config) tlsConn := tls.Server(c, config)
return &conn{Conn: tlsConn} return &conn{Conn: tlsConn}
} }
func init() {
// opt-in TLS 1.3 for Go1.12
// TODO: remove this line when Go1.13 is released.
_ = os.Setenv("GODEBUG", os.Getenv("GODEBUG")+",tls13=1")
}

Loading…
Cancel
Save