From 5d5b77d73bf02bea05f3d6308383d6859cbaa187 Mon Sep 17 00:00:00 2001 From: 9seconds Date: Fri, 2 Apr 2021 21:52:04 +0300 Subject: [PATCH] Tune defaults --- antireplay/init.go | 4 ++-- example.config.toml | 4 ++-- timeattack/init.go | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/antireplay/init.go b/antireplay/init.go index 4585a65..84fd82e 100644 --- a/antireplay/init.go +++ b/antireplay/init.go @@ -1,6 +1,6 @@ package antireplay const ( - DefaultMaxSize = 10 * 1024 * 1024 // 10mib - DefaultErrorRate = 0.0001 + DefaultMaxSize = 1024 * 1024 // 1MiB + DefaultErrorRate = 0.001 ) diff --git a/example.config.toml b/example.config.toml index 7402a57..fe3c883 100644 --- a/example.config.toml +++ b/example.config.toml @@ -137,10 +137,10 @@ enabled = true # approximate we try hard to store data quite dense but it is possible # that we can go over this limit for 10-20% under some conditions and # architectures. -max-size = "16mb" +max-size = "1mib" # we use stable bloom filters for anti-replay cache. This helps # to maintain a desired error ratio. -error-rate = 0.0001 +error-rate = 0.001 # You can protect proxies by using different blocklists. If client has # ip from the given range, we do not try to do a proper handshake. We diff --git a/timeattack/init.go b/timeattack/init.go index 385b9d7..5bf3ab4 100644 --- a/timeattack/init.go +++ b/timeattack/init.go @@ -3,5 +3,5 @@ package timeattack import "time" const ( - DefaultDuration = time.Second + DefaultDuration = 5 * time.Second )