Skip to content

Installation

exitfleet is pure Bash - a CLI (exitfleet), a convergence daemon (exitfleetd), and a shared library - plus two systemd units. It runs on the gateway (a trusted VPS you control) and, in a minimal form, on each operator station. The exit nodes themselves run no exitfleet code; they are stateless kernel forwarders installed from fleet-nix.

Runtime dependencies

The gateway needs these on PATH (all present on a stock NixOS or a typical Linux server): bash (5+), iproute2 (ip), wireguard-tools (wg), whois, curl, grep, sed, gawk, coreutils, util-linux (flock, logger), procps (sysctl), kmod (modprobe). The operator station only needs WireGuard plus curl for exitfleet test.

exitfleet ships a flake with a package and a NixOS module. The gateway config in fleet-nix imports the module; to run it directly:

# flake.nix
{
  inputs.exitfleet.url = "github:StrongWind1/exitfleet";

  outputs = { self, nixpkgs, exitfleet, ... }: {
    nixosConfigurations.gateway = nixpkgs.lib.nixosSystem {
      system = "x86_64-linux";
      modules = [
        exitfleet.nixosModules.default
        { services.exitfleet.enable = true; }
        # ... your WireGuard wg-operator / wg-nodes config ...
      ];
    };
  };
}

The module installs the package, loads the ipip module, sets the forwarding + ECMP sysctls, and schedules exitfleetd on a 30-second timer.

Run the package ad hoc without installing it:

nix run github:StrongWind1/exitfleet -- version
nix run github:StrongWind1/exitfleet -- status

From a clone (any Linux)

git clone https://github.com/StrongWind1/exitfleet
cd exitfleet

# Run in place
./bin/exitfleet version

# Or install system-wide (scripts + library + systemd units)
sudo make install            # PREFIX defaults to /usr
sudo systemctl enable --now exitfleet.timer

make install places exitfleet and exitfleetd in $(PREFIX)/bin, the library in $(PREFIX)/lib/exitfleet/exitfleet.sh, and the units in $(PREFIX)/lib/systemd/system. The scripts locate the library across the dev checkout, a make install, and the Nix package automatically.

Development

make check        # fmt-check + shellcheck (--enable=all) + tests + docs-check
make fmt          # shfmt -w on all scripts
make lint         # shellcheck at --enable=all --severity=style
make test         # the shell test suite (tests/run.sh)
make hooks        # install the pre-commit hooks

nix flake check   # the same gate under Nix (shfmt, shellcheck, tests, package build)
nix develop       # a shell with shfmt, shellcheck, uv

Verify

exitfleet version
# exitfleet 0.1.0