1
0
Fork 0
forked from External/ergo
Includes a partially backwards-incompatible config change
This commit is contained in:
Shivaram Lingamneni 2019-11-18 01:42:48 -05:00
parent 5cce365092
commit 4050b6571a
8 changed files with 332 additions and 319 deletions

View file

@ -4,16 +4,10 @@
package connection_limits
import (
"errors"
"sync"
"time"
)
var (
ErrLimitExceeded = errors.New("too many concurrent connections")
ErrThrottleExceeded = errors.New("too many recent connection attempts")
)
// TorLimiter is a combined limiter and throttler for use on connections
// proxied from a Tor hidden service (so we don't have meaningful IPs,
// a notion of CIDR width, etc.)