lab_ops_natmap/lib.rs
1//! `natmap` — iptables NAT rule management for static VMs and Docker containers.
2//!
3//! This crate provides a daemon that acts as the central authority for all
4//! iptables NAT rules. It handles:
5//!
6//! - **Static DNAT/SNAT/hairpin rules** for VMs with persistent configuration
7//! - **Dynamic Docker port mappings** that auto-discover published ports at
8//! container start and allow host-port remapping without restarting containers
9//! - **Crash recovery** by persisting state to disk and flushing stale rules on
10//! restart
11//! - **Port conflict prevention** via a TCP pre-bind allocator
12//!
13//! The daemon exposes an HTTP API over a Unix socket. CLI commands in the
14//! parent crate communicate with it through [`cli::run_cli`].
15
16pub mod api;
17pub mod cli;
18pub mod command;
19pub mod completions;
20pub mod consts;
21pub mod daemon;
22pub mod docker;
23pub mod install;
24pub mod iptables;
25pub mod models;
26pub mod utils;