ratelimit: Increase ratelimit to avoid failing handshakes
authorAndrey Petrov <andrey.petrov@shazow.net>
Thu, 4 Aug 2016 00:01:07 +0000 (20:01 -0400)
committerAndrey Petrov <andrey.petrov@shazow.net>
Thu, 4 Aug 2016 00:01:07 +0000 (20:01 -0400)
Regarding #171

sshd/ratelimit.go

index c76dc46d3b567c3fcdf0d939b5a89e0730b71d3f..16eef95337f6bba35870860fa756336845f0628e 100644 (file)
@@ -44,8 +44,8 @@ type inputLimiter struct {
 func NewInputLimiter() rateio.Limiter {
        grace := time.Second * 3
        return &inputLimiter{
-               Amount:    200 * 4 * 2, // Assume fairly high typing rate + margin for copypasta of links.
-               Frequency: time.Minute * 2,
+               Amount:    200 * 4 * 5, // Assume fairly high typing rate + margin for copypasta of links + large key handshakes
+               Frequency: time.Minute * 1,
                readCap:   128,          // Allow up to 128 bytes per read (anecdotally, 1 character = 52 bytes over ssh)
                numRead:   -1024 * 1024, // Start with a 1mb grace
                timeRead:  time.Now().Add(grace),