This repo contains the application source for https://probe.sh, a web service for testing WireGuard® connectivity built by the team behind Firezone.
- When the Probe application boots, it starts an Elixir
gen_udp
server for each WireGuard listen port defined inconfig.exs
to listen for incoming UDP payloads on that port. - When a user visits the app, Probe starts a Phoenix LiveView process and generates a unique cryptographic token to use for the test.
- When the user runs the script shown, it first sends a request to start the test, followed by a series of UDP payloads, and finally either a
complete
orcancel
request to end the test. - The
gen_udp
receives these payloads, and if they match one of the four WireGuard message types, it broadcasts test updates to the LiveView process for that test. - The user is immediately shown the results of the test.
apps/probe
: Phoenix application for the Probe servicepriv/static/scripts
: OS-specific scripts for running the Probe tests, designed to be launched from the web app UI.config
: Configuration settings for various environments. You can add and remove more ports for testing in theconfig.exs
file.docker-compose.yml
: Docker Compose file to start required services for local development.fly.toml
: Fly.io configuration file for deploying the Probe app.Dockerfile
: Dockerfile for building the Probe app image to run on Fly.io.
We welcome any and all contributions to Probe. Before you invest a lot of time into a pull request, however, we recommend opening an issue to discuss the proposed changes. For small fixes, feel free to open a pull request directly.
You'll need the following pre-requisites to run Probe locally:
- Docker + Docker Compose for your platform. Docker Desktop should work just fine.
- We use asdf to manage runtime versions for this repository. You can install asdf with
brew install asdf
on macOS. - Install required asdf plugins with
asdf plugin add erlang elixir nodejs
. - Install the required versions of Erlang, Elixir, and Node.js with
asdf install
in the root of this repository. - Install frontend dependencies with
pnpm i --prefix assets
. - Setup remaining dependencies with
mix setup
.
You're now ready to start a local development environment:
docker compose up -d
to start the required services (PostgreSQL)- Start Phoenix endpoint with
mix phx.server
or inside IEx withiex -S mix phx.server
Now you can visit localhost:4000
from your browser to see the Probe service running locally.
To add or remove ports to use for testing, see config/config.exs
.
Note that you'll need to start the probe service with a privileged user (or with CAP_NET_BIND_SERVICE
capabilities on Linux) to bind to ports below 1024.
The Firezone team deploys Probe to Fly.io using the Fly.io CLI.
You're welcome to deploy Probe to your own infrastructure for non-commercial purposes.
See SECURITY.md
See LICENSE
WireGuard is a registered trademark of Jason A. Donenfeld.