9seconds 5 лет назад
Родитель
Сommit
5d5b77d73b
3 измененных файлов: 5 добавлений и 5 удалений
  1. 2
    2
      antireplay/init.go
  2. 2
    2
      example.config.toml
  3. 1
    1
      timeattack/init.go

+ 2
- 2
antireplay/init.go Просмотреть файл

1
 package antireplay
1
 package antireplay
2
 
2
 
3
 const (
3
 const (
4
-	DefaultMaxSize   = 10 * 1024 * 1024 // 10mib
5
-	DefaultErrorRate = 0.0001
4
+	DefaultMaxSize   = 1024 * 1024 // 1MiB
5
+	DefaultErrorRate = 0.001
6
 )
6
 )

+ 2
- 2
example.config.toml Просмотреть файл

137
 # approximate we try hard to store data quite dense but it is possible
137
 # approximate we try hard to store data quite dense but it is possible
138
 # that we can go over this limit for 10-20% under some conditions and
138
 # that we can go over this limit for 10-20% under some conditions and
139
 # architectures.
139
 # architectures.
140
-max-size = "16mb"
140
+max-size = "1mib"
141
 # we use stable bloom filters for anti-replay cache. This helps
141
 # we use stable bloom filters for anti-replay cache. This helps
142
 # to maintain a desired error ratio.
142
 # to maintain a desired error ratio.
143
-error-rate = 0.0001
143
+error-rate = 0.001
144
 
144
 
145
 # You can protect proxies by using different blocklists. If client has
145
 # You can protect proxies by using different blocklists. If client has
146
 # ip from the given range, we do not try to do a proper handshake. We
146
 # ip from the given range, we do not try to do a proper handshake. We

+ 1
- 1
timeattack/init.go Просмотреть файл

3
 import "time"
3
 import "time"
4
 
4
 
5
 const (
5
 const (
6
-	DefaultDuration = time.Second
6
+	DefaultDuration = 5 * time.Second
7
 )
7
 )

Загрузка…
Отмена
Сохранить