1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-22 10:08:15 -05:00

Merge pull request #1 from liberal-boy/master

enable TLS 1.3 by default(WIP)
This commit is contained in:
Xiaokang Wang 2019-04-16 19:21:41 +08:00 committed by GitHub
commit 20f05b5373
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,6 +4,7 @@ package tls
import (
"crypto/tls"
"os"
"v2ray.com/core/common/buf"
"v2ray.com/core/common/net"
@ -65,3 +66,9 @@ func Server(c net.Conn, config *tls.Config) net.Conn {
tlsConn := tls.Server(c, config)
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")
}