mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-02-01 14:17:59 -05:00
global session cache
This commit is contained in:
parent
9e997a5be7
commit
f03c86f468
@ -27,6 +27,10 @@ const (
|
||||
StreamSecurityTypeTLS StreamSecurityType = 1
|
||||
)
|
||||
|
||||
var (
|
||||
globalSessionCache = tls.NewLRUClientSessionCache(128)
|
||||
)
|
||||
|
||||
type TLSSettings struct {
|
||||
AllowInsecure bool
|
||||
Certs []tls.Certificate
|
||||
@ -35,6 +39,7 @@ type TLSSettings struct {
|
||||
func (this *TLSSettings) GetTLSConfig() *tls.Config {
|
||||
config := &tls.Config{
|
||||
InsecureSkipVerify: this.AllowInsecure,
|
||||
ClientSessionCache: globalSessionCache,
|
||||
}
|
||||
|
||||
config.Certificates = this.Certs
|
||||
|
Loading…
Reference in New Issue
Block a user