* @license MIT */ return [ /* |-------------------------------------------------------------------------- | Addon Meta |-------------------------------------------------------------------------- */ 'version' => '1.0.0', 'author' => 'Ball Studios', 'repo' => 'https://git.balls.studio/BallStudios/pterodactyl_addon', /* |-------------------------------------------------------------------------- | Network Traffic Dashboard |-------------------------------------------------------------------------- */ 'network' => [ // Enable/disable the module entirely 'enabled' => env('ADDON_NETWORK_ENABLED', true), // How often (seconds) to collect Docker stats metrics 'collection_interval_seconds' => env('ADDON_NETWORK_INTERVAL', 10), // Enable iptables/nftables port-level collection (requires host access) 'iptables_enabled' => env('ADDON_NETWORK_IPTABLES', false), // Retention periods (days) per resolution tier 'retention' => [ 'raw' => env('ADDON_NETWORK_RETENTION_RAW', 1), // 1 day raw '5m' => env('ADDON_NETWORK_RETENTION_5M', 7), // 7 days 5-min '1h' => env('ADDON_NETWORK_RETENTION_1H', 30), // 30 days hourly '1d' => env('ADDON_NETWORK_RETENTION_1D', 365), // 365 days daily ], // Max live-poll rate (requests per minute per user per server) 'rate_limit_per_minute' => env('ADDON_NETWORK_RATE_LIMIT', 12), // Wings REST stats endpoint path (relative to node FQDN:port) 'wings_stats_path' => '/api/servers/{uuid}/resources', ], /* |-------------------------------------------------------------------------- | Role-Based Server Permissions |-------------------------------------------------------------------------- */ 'roles' => [ 'enabled' => env('ADDON_ROLES_ENABLED', true), // Maximum roles per server (0 = unlimited) 'max_roles_per_server' => env('ADDON_ROLES_MAX', 0), // Warn before deleting a role that has active assignments 'warn_on_delete_in_use' => true, // Known dangerous permissions to flag in UI 'dangerous_permissions' => [ 'file.delete', 'allocation.*', 'startup.*', 'database.*', 'backup.delete', 'user.update', 'control.console', ], // Rate limit for role write operations (per minute per admin) 'write_rate_limit' => env('ADDON_ROLES_WRITE_RATE_LIMIT', 30), ], /* |-------------------------------------------------------------------------- | File Revision History |-------------------------------------------------------------------------- */ 'revisions' => [ 'enabled' => env('ADDON_REVISIONS_ENABLED', true), // Where to store revision files (relative to storage/app/) 'storage_path' => env('ADDON_REVISIONS_PATH', 'addons/revisions'), // Max file size to track (bytes). Files larger are skipped. 'max_file_size' => env('ADDON_REVISIONS_MAX_FILE_SIZE', 10 * 1024 * 1024), // 10 MB // Max revisions kept per file 'max_revisions_per_file' => env('ADDON_REVISIONS_MAX_PER_FILE', 50), // Max total storage per server (bytes) 'max_storage_per_server' => env('ADDON_REVISIONS_MAX_STORAGE', 500 * 1024 * 1024), // 500 MB // Revision retention in days (0 = keep forever up to max_revisions_per_file) 'retention_days' => env('ADDON_REVISIONS_RETENTION_DAYS', 90), // Glob patterns to EXCLUDE from tracking (never store these) 'excluded_patterns' => [ '.env', '*.env', '*.key', '*.pem', '*.p12', '*.pfx', '*.crt', '*.cer', '*.jks', 'secrets.yml', 'secrets.yaml', '*secret*', '*password*', '*token*', '*.sql', '*.sql.gz', '*.bak', '*.backup', '*.dump', '*.zip', '*.tar', '*.tar.gz', '*.tar.bz2', '*.7z', '*.rar', ], // Use xdiff PHP extension for delta storage if available 'prefer_delta_storage' => env('ADDON_REVISIONS_DELTA', true), // Rate limit for restore operations (per minute per user) 'restore_rate_limit' => env('ADDON_REVISIONS_RESTORE_RATE_LIMIT', 10), ], /* |-------------------------------------------------------------------------- | Console Command Autocomplete |-------------------------------------------------------------------------- */ 'console' => [ 'enabled' => env('ADDON_CONSOLE_ENABLED', true), // Path to bundled command definition JSON files 'definitions_path' => base_path('config/addon-commands'), // Debounce (ms) applied on frontend — informational only 'frontend_debounce_ms' => 150, // Rate limit for autocomplete endpoint (per minute per user per server) 'autocomplete_rate_limit' => env('ADDON_CONSOLE_RATE_LIMIT', 60), // Stale player cache expiry (minutes) 'player_cache_ttl_minutes' => env('ADDON_CONSOLE_PLAYER_TTL', 30), // Max suggestions returned per query 'max_suggestions' => env('ADDON_CONSOLE_MAX_SUGGESTIONS', 10), // Console output patterns for join/leave detection per software type 'patterns' => [ 'join' => [ 'paper' => '/\[[\d:]+\] \[Server thread\/INFO\]: (\w+) joined the game/', 'spigot' => '/\[[\d:]+\] \[Server thread\/INFO\]: (\w+) joined the game/', 'purpur' => '/\[[\d:]+\] \[Server thread\/INFO\]: (\w+) joined the game/', 'fabric' => '/\[[\d:]+\] \[Server thread\/INFO\]: (\w+) joined the game/', 'forge' => '/\[[\d:]+\] \[Server thread\/INFO\]: (\w+) joined the game/', 'velocity' => '/\[[\d:]+\] \[INFO\]: (\w[\w\d_]{0,15}) \[.+\] has connected/', 'bungeecord' => '/\[[\d:]+\] \[INFO\]: (\w[\w\d_]{0,15}) \[.+\] connected/', ], 'leave' => [ 'paper' => '/\[[\d:]+\] \[Server thread\/INFO\]: (\w+) left the game/', 'spigot' => '/\[[\d:]+\] \[Server thread\/INFO\]: (\w+) left the game/', 'purpur' => '/\[[\d:]+\] \[Server thread\/INFO\]: (\w+) left the game/', 'fabric' => '/\[[\d:]+\] \[Server thread\/INFO\]: (\w+) left the game/', 'forge' => '/\[[\d:]+\] \[Server thread\/INFO\]: (\w+) left the game/', 'velocity' => '/\[[\d:]+\] \[INFO\]: (\w[\w\d_]{0,15}) \[.+\] has disconnected/', 'bungeecord' => '/\[[\d:]+\] \[INFO\]: (\w[\w\d_]{0,15}) \[.+\] disconnected/', ], ], // Commands that trigger a danger warning in the UI 'dangerous_commands' => [ 'stop', 'restart', 'ban', 'ban-ip', 'pardon', 'pardon-ip', 'op', 'deop', 'whitelist off', 'save-off', 'kill @e', 'kill @a', 'forceload', 'execute', 'function', ], ], ];