Use ristretto instead of bigcache

This commit is contained in:
9seconds
2019-11-11 14:59:09 +03:00
parent 22905b2a25
commit 34ad883559
9 changed files with 55 additions and 72 deletions
+3 -9
View File
@@ -104,15 +104,10 @@ var (
Default("443").
Uint16()
runAntiReplayMaxSize = runCommand.Flag("anti-replay-max-size",
"Max size of antireplay cache in megabytes.").
"Max size of antireplay cache.").
Envar("MTG_ANTIREPLAY_MAXSIZE").
Default("128").
Int()
runAntiReplayEvictionTime = runCommand.Flag("anti-replay-eviction-time",
"Eviction time period for obfuscated2 handshakes").
Envar("MTG_ANTIREPLAY_EVICTIONTIME").
Default("168h").
Duration()
Default("128MB").
Bytes()
runSecret = runCommand.Arg("secret", "Secret of this proxy.").Required().HexBytes()
runAdtag = runCommand.Arg("adtag", "ADTag of the proxy.").HexBytes()
)
@@ -146,7 +141,6 @@ func main() {
config.Opt{Option: config.OptionTypeReadBufferSize, Value: *runReadBufferSize},
config.Opt{Option: config.OptionTypeCloakPort, Value: *runTLSCloakPort},
config.Opt{Option: config.OptionTypeAntiReplayMaxSize, Value: *runAntiReplayMaxSize},
config.Opt{Option: config.OptionTypeAntiReplayEvictionTime, Value: *runAntiReplayEvictionTime},
config.Opt{Option: config.OptionTypeSecret, Value: *runSecret},
config.Opt{Option: config.OptionTypeAdtag, Value: *runAdtag},
)