7 stable releases
Uses new Rust 2024
new 1.2.0 | Apr 9, 2025 |
---|---|
1.1.2 | Mar 27, 2025 |
1.1.1 | Feb 27, 2025 |
1.1.0 | Jan 29, 2025 |
#1424 in Network programming
254 downloads per month
560KB
14K
SLoC
Infrarust
High-Performance Minecraft Reverse Proxy in Rust
Compatible with almost all vanilla, plugin, and modded Minecraft servers
Warning
Infrarust is currently in active development. This project is a Rust implementation inspired by Infrared, focusing on performance and enhanced features.
A blazing fast Minecraft reverse proxy that allows you to expose multiple Minecraft servers through a single port. It uses domain/subdomain-based routing to direct clients to specific Minecraft servers.
Key Features
- Efficient Reverse Proxy
- Wildcard Domain Support
- Multi-Domain Routing
- Direct IP Connection Support
- Authentication Modes
- ClientOnly Mode (only works with vanilla < 1.20)
- Passthrough Mode
- Offline Mode
- ServerOnly Mode
- Performance Optimizations
- Connection Pooling
- Zero-copy packet forwarding
- Status Caching
- Security Features
- Rate Limiting
- Basic DDoS Protection
- Advanced Ban System (IP, UUID, Username)
- Container Integration
- Docker Auto-Discovery
- Real-time Container Monitoring
- Command Line Interface
- Player Management
- Ban Management
- Status Monitoring
- Basic Telemetry and Monitoring
Quick Start
Prerequisites
- Rust 1.84+ and Cargo
Installation
# From source
git clone https://github.com/shadowner/infrarust
cd infrarust
cargo build --release
# Or via cargo
cargo install infrarust
Basic Configuration
Create a config.yaml
file:
bind: "0.0.0.0:25565"
file_provider:
proxies_path: ["./proxies"]
watch: true # Enable hot-reload
And create your server configurations in the proxies
directory:
# proxies/my-server.yml
domains:
- "hub.minecraft.example.com"
addresses:
- "localhost:25566"
proxyMode: "passthrough" # Options: passthrough, client_only, offline, server_only
Documentation
Visit infrarust.dev for complete documentation:
Docker Integration
Infrarust can automatically detect and proxy Minecraft servers running in Docker containers:
docker_provider:
docker_host: "unix:///var/run/docker.sock"
label_prefix: "infrarust"
watch: true
Container configuration is done through Docker labels:
infrarust.enable=true
infrarust.domains=mc.example.com
Telemetry & Monitoring
Infrarust provides comprehensive telemetry through OpenTelemetry integration, including metrics, traces, and logs. The project includes a ready-to-use monitoring stack in the docker/monitoring directory.
Quick Start Monitoring
cd docker/monitoring
docker compose up -d
This will start:
- Grafana (http://localhost:3000)
- Prometheus (http://localhost:9090)
- Tempo (Traces)
- OpenTelemetry Collector
Available Metrics
- Connection metrics (active connections, errors, latency)
- Backend metrics (server status, response times)
- System metrics (CPU, memory, threads)
- Minecraft-specific metrics (protocol errors, player count)
Performance
Infrarust leverages Rust's performance capabilities:
- Minimal memory footprint (~10MB base)
- Low CPU utilization
- Efficient async I/O handling
- Zero-copy packet forwarding when possible
Note
This project was initiated as a learning experience in advanced Rust programming, with continuous improvements and optimizations expected as development progresses.
Contributing
Contributions are welcome! Check out our Contributing Guidelines to get started.
Feel free to join our Discord if you have any questions!
Similar Projects
License
Infrarust is licensed under the GNU Affero General Public License v3.0 - see the LICENSE file for details.
Dependencies
~28–43MB
~667K SLoC