leeca_proxmox 0.2.0

A modern, safe, and async-first SDK for interacting with Proxmox Virtual Environment servers
Documentation

Leeca Proxmox VE SDK

Rust SDK for interacting with Proxmox Virtual Environment servers

CI Status Coverage Crates.io Downloads Docs Deps [License] MSRV Security

A modern, safe, and asyncโ€‘first SDK for interacting with Proxmox Virtual Environment servers.

๐Ÿ“‹ Table of Contents

โœจ Features

  • ๐Ÿ”’ Secure by default
    TLS 1.3, optional certificate validation, tokenโ€‘based authentication.

  • โš™๏ธ Configurable validation
    Password strength, DNS resolution, reserved usernames โ€“ all optโ€‘in, off by default.

  • ๐Ÿงฑ Clean architecture
    Domainโ€‘driven design with value objects, clear separation of concerns.

  • โšก Async/await
    Built on Tokio for high concurrency.

  • ๐Ÿงพ Error handling
    Detailed, typeโ€‘safe errors with backtraces.

๐Ÿš€ Getting Started

Prerequisites

  • Rust
  • Cargo
  • Tokio runtime

Installation

Add the dependency to your Cargo.toml:

cargo add leeca_proxmox

Or edit Cargo.toml manually:

[dependencies]
leeca_proxmox = "0.2"
tokio = { version = "1", features = ["full"] }

๐Ÿ“– Usage

Basic authentication example:

use leeca_proxmox::{ProxmoxClient, ProxmoxResult};

#[tokio::main]
async fn main() -> ProxmoxResult<()> {
    let mut client = ProxmoxClient::builder()
        .host("192.168.1.100")
        .port(8006)
        .credentials("apiuser", "strong-password", "pam")
        .secure(true)                     // HTTPS (default)
        .accept_invalid_certs(false)      // reject invalid certificates (default)
        .build()
        .await?;

    client.login().await?;
    println!("Authenticated! Ticket: {}", client.auth_token().unwrap().as_str());

    Ok(())
}

Enabling extra validation

By default, only basic format checks are performed. To enable additional checks:

let client = ProxmoxClient::builder()
    .host("...")
    .credentials("user", "pass", "pam")
    .enable_password_strength(3)          // require zxcvbn score โ‰ฅ 3
    .enable_dns_resolution()               // verify hostname resolves
    .block_reserved_usernames()            // reject root, admin, etc.
    .build()
    .await?;

See the examples directory for more.

๐Ÿ› ๏ธ Development

# 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

๐Ÿ“Š Project Status

See our CHANGELOG for version history and ROADMAP for future plans.

๐Ÿ“š Documentation

๐Ÿ›ก๏ธ Security

See our Security Policy for reporting vulnerabilities.

๐Ÿ“„ License

Licensed under Apache License 2.0 โ€“ see the LICENSE file for details.

๐Ÿค Contributing

We welcome contributions! Please see our Contributing Guide for details.

โš–๏ธ Code of Conduct

Please read and follow our Code of Conduct.

๐Ÿ‘ฅ Community

๐Ÿ“ˆ Versioning

This project follows Semantic Versioning. See our CHANGELOG for version history.

โš ๏ธ Note: APIs may change before 1.0.0.

๐Ÿ™ Acknowledgments

  • Proxmox VE team for their excellent API documentation.
  • Rust community for the tools and crates.
  • All contributors.

Built with โค๏ธ by 4rkh4m and the Rust community.

โญ Star ยท ๐Ÿ› Report Bug ยท โœจ Request Feature ยท ๐Ÿ›ก๏ธ Security Report