]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/initializers/constants.ts
Update i18n source
[github/Chocobozzz/PeerTube.git] / server / initializers / constants.ts
index 53902071ce378bd5c8a0b12f117fb69e00f723d3..4e1c8dda7fb3706d6576af32de29737096c958cb 100644 (file)
@@ -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,