ソースを参照

Tune defaults

tags/v2.0.0-rc1
9seconds 5年前
コミット
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,6 +1,6 @@
1 1
 package antireplay
2 2
 
3 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,10 +137,10 @@ enabled = true
137 137
 # approximate we try hard to store data quite dense but it is possible
138 138
 # that we can go over this limit for 10-20% under some conditions and
139 139
 # architectures.
140
-max-size = "16mb"
140
+max-size = "1mib"
141 141
 # we use stable bloom filters for anti-replay cache. This helps
142 142
 # to maintain a desired error ratio.
143
-error-rate = 0.0001
143
+error-rate = 0.001
144 144
 
145 145
 # You can protect proxies by using different blocklists. If client has
146 146
 # ip from the given range, we do not try to do a proper handshake. We

+ 1
- 1
timeattack/init.go ファイルの表示

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

読み込み中…
キャンセル
保存