Success path for fake tls is implemented

This commit is contained in:
9seconds
2019-11-07 13:04:38 +03:00
parent fd8506c82a
commit 038b2b200d
21 changed files with 777 additions and 111 deletions
+13 -2
View File
@@ -14,7 +14,17 @@ var (
func Init() {
initOnce.Do(func() {
c, err := bigcache.NewBigCache(bigcache.Config{
c1, err := bigcache.NewBigCache(bigcache.Config{
Shards: 1024,
LifeWindow: config.C.AntiReplayEvictionTime,
Hasher: hasher{},
HardMaxCacheSize: config.C.AntiReplayMaxSize,
})
if err != nil {
panic(err)
}
c2, err := bigcache.NewBigCache(bigcache.Config{
Shards: 1024,
LifeWindow: config.C.AntiReplayEvictionTime,
Hasher: hasher{},
@@ -25,7 +35,8 @@ func Init() {
}
Cache = &cache{
cache: c,
obfuscated2: c1,
tls: c2,
}
})
}