mirror of
https://github.com/sol1/rustguac.git
synced 2026-09-10 17:47:13 +00:00
66bc3722fc
Contributed by @vk2amv (Lindsay). Adds two related operator features to the Docker VDI driver: 1. Bounded host port range via [vdi] port_range_start / port_range_end. Currently Docker picks an arbitrary high port for the container's RDP listener; this lets operators constrain it which matters for firewalls, reverse proxies, and identity-aware gates that need to know in advance which ports rustguac will use. Port selection inside the range is deterministic-from-username (FNV-1a hash), so reconnects from the same user get the same port. Falls through to the next port on collision. 2. Container lifecycle hook script via [vdi] container_hook_script. Called as 'up <port> <container_id> <container_name>' after Docker assigns the port, again as 'down ...' before removal. Lets deployments wire external preparation/cleanup (firewall opens, service mesh registration, identity-aware gates) without baking the logic into rustguac itself. Bounded timeout (default 10s). Script is invoked via Command::new (no shell), so no injection risk from container metadata. 3 new tests covering port-candidate behaviour. Docs in docs/configuration.md and docs/vdi.md. Thanks Lindsay.