Skip to content

Commit 15e14a0

Browse files
committed
ratelimit: Increase ratelimit to avoid failing handshakes
Regarding #171
1 parent c8661e6 commit 15e14a0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sshd/ratelimit.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ type inputLimiter struct {
4444
func NewInputLimiter() rateio.Limiter {
4545
grace := time.Second * 3
4646
return &inputLimiter{
47-
Amount: 200 * 4 * 2, // Assume fairly high typing rate + margin for copypasta of links.
48-
Frequency: time.Minute * 2,
47+
Amount: 200 * 4 * 5, // Assume fairly high typing rate + margin for copypasta of links + large key handshakes
48+
Frequency: time.Minute * 1,
4949
readCap: 128, // Allow up to 128 bytes per read (anecdotally, 1 character = 52 bytes over ssh)
5050
numRead: -1024 * 1024, // Start with a 1mb grace
5151
timeRead: time.Now().Add(grace),

0 commit comments

Comments
 (0)