🌟 Major New Features
🚀 Server Manager
Infrarust now supports on-demand server provisioning and automatic shutdown:
- Automatic Server Startup: Servers start when players try to connect
- Intelligent Shutdown: Servers stop after configurable idle periods
- Status-Aware Messages: Dynamic MOTDs based on server state
In server configuration (Preto)
server_manager:
provider_name: Pterodactyl
server_id: "de0d8f2d"
empty_shutdown_time: 75 # Seconds(Local)
server_manager:
provider_name: Local
server_id: "local_server"
empty_shutdown_time: 75 # Seconds
local_provider:
executable: "java"
working_dir: "/path/to/server"
args:
- "-jar"
- "server.jar"
- "--nogui"Proxy Configuration
managers_config:
pterodactyl:
enabled: true
base_url: "https://pterodactyl.example.com"
api_key: "ptlc_..."🔄 Provider System
Two server management providers available out of the box:
- Pterodactyl Integration:
- Partial API integration with Pterodactyl Panel
- Support for status requesting
- Server power actions
- Next : Live console feed + interaction
- Local Process Provider:
- Direct management of server processes
- Cross-platform support (Windows/Linux)
- Real-time console interaction
🏭 Dynamic Management
The server management system offers:
- Thread-safe server state tracking
- Event-driven management via tokio tasks
- Customizable startup and shutdown behaviors
- Crash detection with recovery options
🔨 Architecture Improvements
📦 Modular Crate Structure
I've reorganized the codebase into specialized crates:
- infrarust_server_manager: Server lifecycle and process control
- infrarust_ban_system: Ban management and enforcement
- infrarust_motd: Dynamic message handling
There is still more works todo.
📚 Dependency Management
- Unified dependency versioning at workspace level
- Categorized dependencies for better organization:
- Async & Runtime
- Networking & Protocol
- Serialization & Data Formats
- And more
📋 Logging Improvements
- Standardized on
tracingecosystem - Removed older
env_loggerdependency - Modern static variable implementation with
once_cell
📈 Technical Enhancements
🧰 API Abstraction
#[async_trait]
pub trait ApiProvider: Send + Sync + 'static {
async fn get_server_status(&self, server_id: &str) -> Result<ApiServerStatus>;
async fn start_server(&self, server_id: &str) -> Result<()>;
// Additional methods...
}- Trait-based design for flexibility
- Easy extension with custom providers
- Mock implementations for testing
💪 Process Management
- Bidirectional communication with server processes
- Broadcasting system for console output
- Cross-platform command execution
- Graceful process termination
🔮 What's Next?
This is the last major feature release before my 2.x refactoring! The upcoming 2.0 refactor will enable more advanced features and improved architecture.
I'll still provide fixes, maintenance, and small features between now and 2.0:
- More configuration providers
- Additional process/API providers for server management
- Performance optimizations
This release completes my feature roadmap for the 1.x series while setting the foundation for Infrarust's future growth!