docs/AGENT.md
Firezone is a zero-trust access platform built on top of WireGuard.
The data plane components are built in Rust and reside in rust/.
The control plane components are built in Elixir and reside in elixir/.
At the core of the data plane resides a shared library called connlib.
It combines ICE (using the str0m library) and WireGuard (using the boringtun library) to establish on-the-fly tunnels between Clients and Gateways.
The entry-point for the data plane is Tunnel which acts as a big event-loop combining three components:
Packets from IO sources (TUN device and UDP socket) are passed to the state component, resulting in a UDP or IP packet.
The state component also manages ICE through the snownet library, so some UDP traffic is handled internally and does not yield an IP packet.
These three components are split into multiple threads and connected via bounded channels:
For guidelines on generating or reviewing specific parts of the codebase, check for an AGENT.md file in the corresponding sub-directory.
For example, for Rust code, check rust/AGENT.md; for Elixir code, check elixir/AGENT.md, etc.