From 15e14a08724d315b02a94dcce3948150deaf1d77 Mon Sep 17 00:00:00 2001 From: Andrey Petrov Date: Wed, 3 Aug 2016 20:01:07 -0400 Subject: [PATCH] ratelimit: Increase ratelimit to avoid failing handshakes Regarding #171 --- sshd/ratelimit.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sshd/ratelimit.go b/sshd/ratelimit.go index c76dc46..16eef95 100644 --- a/sshd/ratelimit.go +++ b/sshd/ratelimit.go @@ -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),