From f1a4d3b88ad737ff6d0224c73eb3bf81aa47f8a5 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Wed, 20 Dec 2023 17:01:05 +0200 Subject: [PATCH] Update readme --- README.md | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 83a7b10..e052f74 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,18 @@ -# Validation Relay +# registration-relay +A relay that helps the [iMessage bridge] fetch data from registration providers ([Mac], [iOS]). -## Build +[iMessage bridge]: https://github.com/beeper/imessage +[Mac]: https://github.com/beeper/mac-registration-provider +[iOS]: https://github.com/beeper/phone-registration-provider -Local binary: +## Usage +Build the binary (clone + `go build`) or use a Docker image from GHCR (`ghcr.io/beeper/registration-relay`), +then just run it with some environment variables for configuration. -```sh -go build ./cmd/registration_relay -``` +* `REGISTRATION_RELAY_SECRET` (required) - 32 byte secret key as base64, used to authenticate providers when reconnecting. + * A secret can be generated with `openssl rand -base64 32` +* `REGISTRATION_RELAY_LISTEN` (defaults to :8000) - IP and port to listen on. +* `REGISTRATION_RELAY_METRICS_LISTEN` (defaults to :5000) - IP and port to listen on for Prometheus metrics. -Docker image: - -```sh -docker build . -``` +A reverse proxy configured to allow websockets should be pointed at the RELAY_LISTEN port to enable TLS. +The bridge and registration providers can then be pointed at the public address of the reverse proxy.