- Notifications
You must be signed in to change notification settings - Fork1
Probe for WireGuard® connectivity
License
firezone/probe
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This repo contains the application source for Probe, a web application for testing WireGuard® connectivity built by the team behindFirezone.
Thehttps://probe.sh service has been wound down. If you're looking to self-host Probe, seeour fly.toml for inspiration.
- 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 fourWireGuard 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 recommendopening 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 useasdf 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 visitlocalhost:4000
from your browser to see the Probe service running locally.
To add or remove ports to use for testing, seeconfig/config.exs
.Note that you'll need to start the probe service with a privileged user (or withCAP_NET_BIND_SERVICE
capabilities on Linux) to bind to ports below 1024.
The Firezone team deploys Probe toFly.io using theFly.io CLI.
You're welcome to deploy Probe to your own infrastructure for non-commercial purposes.
SeeSECURITY.md
SeeLICENSE
WireGuard is a registered trademark of Jason A. Donenfeld.