
A modern, safe, and async-first SDK for interacting with Proxmox Virtual Environment servers, following industry best practices and clean architecture principles.
- ✨ Features
- 🚀 Getting Started
- 📖 Usage
- 🛠️ Development
- 📊 Project Status
- 📚 Documentation
- 🛡️ Security
- 📄 License
- 🤝 Contributing
- ⚖️ Code of Conduct
- 👥 Community
- 📈 Versioning
- 🙏 Acknowledgments
-
🔒 Enterprise-Grade Security
- Token-based authentication
- Comprehensive input validation
- Secure default configurations
- Thread-safe operations
- Built-in SSL/TLS support
-
🚀 Modern Architecture
- Async-first design using Tokio
- Clean Architecture principles
- Domain-Driven Design
- SOLID principles
- Immutable Value Objects
-
💪 Robust Error Handling
- Type-safe error propagation
- Detailed error contexts
- Stack traces for debugging
- Custom error types
- Validation error handling
- Rust (nightly)
- Cargo
- Tokio runtime
cargo add leeca_proxmox
use leeca_proxmox::{ProxmoxClient, ProxmoxResult};
use std::time::UNIX_EPOCH;
#[tokio::main]
async fn main() -> ProxmoxResult<()> {
let mut client = ProxmoxClient::builder()
.host("192.168.1.182")?
.port(8006)?
.credentials("leeca", "Leeca_proxmox1!", "pam")?
.secure(false)
.build()
.await?;
println!("\n🔑 Authentication Status");
println!("------------------------");
println!(
"Initial state: {}",
if client.is_authenticated() {
"✅ Authenticated"
} else {
"❌ Not authenticated"
}
);
println!("\n📡 Connecting to Proxmox...");
client.login().await?;
println!(
"Connection state: {}",
if client.is_authenticated() {
"✅ Authenticated"
} else {
"❌ Failed"
}
);
if let Some(token) = client.auth_token() {
println!("\n🎟️ Session Token");
println!("------------------------");
println!("Value: {}", token.value().await);
let expires = token
.expires_at()
.await
.duration_since(UNIX_EPOCH)
.unwrap()
.as_secs();
println!("Expires at: {} (Unix timestamp)", expires);
}
if let Some(csrf) = client.csrf_token() {
println!("\n🛡️ CSRF Protection");
println!("------------------------");
println!("Token: {}", csrf.value().await);
let expires = csrf
.expires_at()
.await
.duration_since(UNIX_EPOCH)
.unwrap()
.as_secs();
println!("Expires at: {} (Unix timestamp)", expires);
}
println!("\n✨ Connection established successfully!\n");
Ok(())
}
# Install development dependencies
cargo install cargo-llvm-cov cargo-audit
# Run tests
cargo test --all-features
# Check code coverage
cargo llvm-cov --all-features --lcov --output-path lcov.info
# Run security audit
cargo audit
# Run linters
cargo clippy --all-targets --all-features
cargo fmt --all -- --check
See our CHANGELOG for version history and ROADMAP for future plans.
See our Security Policy for reporting vulnerabilities.
Licensed under Apache License 2.0 - see the LICENSE file for details.
We welcome contributions! Please see our Contributing Guide for details.
Please read and follow our Code of Conduct.
This project follows Semantic Versioning. See our CHANGELOG for version history.
- Proxmox VE team for their excellent API documentation
- Rust community for their tools and crates
- All contributors
Built with ❤️ by Leeca Team && Rust Community
⭐ Star · 🐛 Report Bug · ✨ Request Feature · 🛡️ Security Report