export const DEFAULT_RELAY_LIMITS = { maxPlayers: 8, maxConcurrentHostedRoomsPerIpHash: 3, maxConcurrentRelayRoomsPerIpHash: 2, maxGlobalRelayBytesPerDay: 100 * 1024 * 1024 * 1024, maxGlobalRequestsPerDay: 250_000, maxGlobalWebSocketMessagesPerDay: 2_000_000, maxActiveRelaySockets: 200, maxRelayBytesPerRoom: 100 * 1024 * 1024, maxRelayBytesPerIpHashPerDay: 500 * 1024 * 1024, maxRelayRoomDurationMs: 2 * 60 * 60 * 1000, idleTimeoutMs: 120_000, hostHeartbeatTimeoutMs: 15_000, maxEnvelopeBytes: 16 * 1024, maxMessagesPerPeerPerSecond: 30, maxSignalingMessagesPerPeerPerMinute: 120, maxIceCandidatesPerPeerPerJoin: 64, } as const; export type RelayLimits = { readonly [K in keyof typeof DEFAULT_RELAY_LIMITS]: number; }; /** * Free relay bytes an account may spend per day on the managed lane. Same * 500 MiB shape as `maxRelayBytesPerIpHashPerDay`; overridable at deploy time * via `P2P_COLYSEUS_FREE_RELAY_BYTES_PER_ACCOUNT_PER_DAY`. */ export const DEFAULT_FREE_RELAY_BYTES_PER_ACCOUNT_PER_DAY = 500 * 1024 * 1024;