mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 19:42:24 +02:00
Add tracker rate limiter
This commit is contained in:
parent
11fa7d392a
commit
9b67da3d9b
4 changed files with 107 additions and 33 deletions
|
@ -450,6 +450,14 @@ const FEEDS = {
|
|||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
const TRACKER_RATE_LIMITS = {
|
||||
INTERVAL: 60000 * 5, // 5 minutes
|
||||
ANNOUNCES_PER_IP_PER_INFOHASH: 10, // maximum announces per torrent in the interval
|
||||
ANNOUNCES_PER_IP: 30 // maximum announces for all our torrents in the interval
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
// Special constants for a test instance
|
||||
if (isTestInstance() === true) {
|
||||
ACTOR_FOLLOW_SCORE.BASE = 20
|
||||
|
@ -482,6 +490,7 @@ export {
|
|||
AVATARS_SIZE,
|
||||
ACCEPT_HEADERS,
|
||||
BCRYPT_SALT_SIZE,
|
||||
TRACKER_RATE_LIMITS,
|
||||
CACHE,
|
||||
CONFIG,
|
||||
CONSTRAINTS_FIELDS,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue