Isolated Linux virtual LANs for CLI & AI agent testing

ghostlan spins up 1..N isolated virtual PCs (“ghosts”) on a named Linux virtual LAN using network namespaces, a bridge, tc netem, headless Xvfb displays, isolated PipeWire audio, and host-side pcap capture—exposed over both a single static Go binary and an MCP server.

Quick Install

Install the static Linux binary (amd64 / arm64) and configure Linux capabilities once:

curl -fsSL https://raw.githubusercontent.com/saifmukhtar/ghostlan/main/install.sh | sh
ghostlan doctor

Or install via Go 1.26+:

go install github.com/saifmukhtar/ghostlan/cmd/ghostlan@latest
sudo ghostlan setup

Core Capabilities

Network Isolation & Netem

Per-ghost Linux network namespaces connected over a dedicated bridge with tc netem latency, packet loss, jitter, and link up/down control.

Headless X11 & GUI Control

Per-ghost Xvfb displays with xauth and window manager support, screenshots, clicks, typing, MP4 screen recording, and motion detection.

Isolated PipeWire Audio

Per-ghost PipeWire + WirePlumber null sinks (ghostlan_sink, ghostlan_mic) with zero host bleed and volumedetect silence checks.

Packet Capture & Diagnostics

Host-side veth packet capture into .pcap files, BPF-filtered tcpdump inspection, and ghostlan doctor pre-flight checks.

MCP Server for AI Agents

Run ghostlan mcp (stdio) or ghostlan mcp --http 127.0.0.1:7331 to expose 24 tools—including lifecycle, process execution, log waiting, network shaping, packet capture, GUI screenshots/input, and audio checks—plus embedded documentation at ghostlan://readme.

ghostlan up demo --ghosts alice,bob --gui --audio-null
ghostlan capture start demo alice /tmp/demo.pcap --duration 5
ghostlan capture inspect /tmp/demo.pcap
ghostlan down demo