Fix six README sentences (closes #565) #566
@@ -47,7 +47,7 @@ identifier of its own to the request, so make your targets tolerate a duplicate.
|
|||||||
|
|
||||||
## Getting Started
|
## Getting Started
|
||||||
|
|
||||||
You need the Go version named in `go.mod`, and Docker for the checks.
|
You need the Go version named in `go.mod`.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://git.eeqj.de/sneak/webhooker.git
|
git clone https://git.eeqj.de/sneak/webhooker.git
|
||||||
@@ -57,9 +57,8 @@ DATA_DIR=../webhooker-data make dev
|
|||||||
```
|
```
|
||||||
|
|
||||||
`DATA_DIR` is where webhooker keeps its databases. It defaults to
|
`DATA_DIR` is where webhooker keeps its databases. It defaults to
|
||||||
`/var/lib/webhooker`, so point it at a directory you can write to. On a host
|
`/var/lib/webhooker`, so point it at a directory you can write to. `make build`
|
||||||
without Docker, `make build` writes the program to `bin/webhooker`, and running
|
writes the program to `bin/webhooker`. Running that file starts webhooker.
|
||||||
that file starts webhooker.
|
|
||||||
|
|
||||||
The first start creates the `admin` account and prints its password once, in a
|
The first start creates the `admin` account and prints its password once, in a
|
||||||
ruled box on standard output:
|
ruled box on standard output:
|
||||||
@@ -107,9 +106,9 @@ sooner after 24 hours without use, unless `SESSION_IDLE_TIMEOUT` says otherwise.
|
|||||||
On the webhook list at `/hooks`, **New Webhook** asks for **Name**, an optional
|
On the webhook list at `/hooks`, **New Webhook** asks for **Name**, an optional
|
||||||
**Description** and **Retention (days)**. Events older than the retention period
|
**Description** and **Retention (days)**. Events older than the retention period
|
||||||
are deleted, along with their deliveries. The default is 30 days. `0` keeps
|
are deleted, along with their deliveries. The default is 30 days. `0` keeps
|
||||||
events forever. The form also has an **HTTP target URL** field and an
|
events forever. Filling in **HTTP target URL** creates an `http` target with the
|
||||||
**Archive** checkbox; each creates that target with the webhook. Every new
|
webhook. Ticking **Archive** creates an archive target. Every new webhook gets
|
||||||
webhook gets one entrypoint, described as `Default entrypoint`.
|
one entrypoint, described as `Default entrypoint`.
|
||||||
|
|
||||||
### Entrypoint URLs
|
### Entrypoint URLs
|
||||||
|
|
||||||
@@ -198,9 +197,9 @@ Read it with `docker logs` and the name upaas gave the container.
|
|||||||
webhooker speaks plain HTTP. It does not handle TLS, the encryption behind
|
webhooker speaks plain HTTP. It does not handle TLS, the encryption behind
|
||||||
HTTPS: it holds no certificate and accepts no HTTPS connections. The reverse
|
HTTPS: it holds no certificate and accepts no HTTPS connections. The reverse
|
||||||
proxy holds the certificate and reaches webhooker over a private address. A bare
|
proxy holds the certificate and reaches webhooker over a private address. A bare
|
||||||
host is a host without Docker. On a bare host that is loopback, the address only
|
host is a host without Docker. On a bare host the private address is loopback
|
||||||
this host can reach. For the image it is the Docker bridge, the private network
|
(`127.0.0.1`), which only this host can reach. For the image it is the Docker
|
||||||
Docker puts containers on.
|
bridge, the private network Docker puts containers on.
|
||||||
|
|
||||||
Four things must be right.
|
Four things must be right.
|
||||||
|
|
||||||
@@ -371,13 +370,13 @@ writes it. The reverse proxy's access log does hold it, in the request path.
|
|||||||
|
|
||||||
### Sign-in limits
|
### Sign-in limits
|
||||||
|
|
||||||
The password is checked first, and only a failed sign-in is counted. A correct
|
From the fifth failure within a minute, each failure is answered `429`. Only
|
||||||
password is never answered `429`. Failures are counted per client and submitted
|
failures are counted. A correct password is never answered `429`. Failures are
|
||||||
username. From the fifth failure within a minute, each failure is answered
|
counted per client and submitted username. At most two password checks run at
|
||||||
`429`. At most two password checks run at once; a request that gets no turn
|
once; a request that gets no turn within 5 seconds is answered `503`. So
|
||||||
within 5 seconds is answered `503`. So guessing speed is bounded by the limit of
|
guessing speed is bounded by the limit of two checks at a time, not by the
|
||||||
two checks at a time, not by the failure count. Choose a long random `admin`
|
failure count. Choose a long random `admin` password, or rate-limit
|
||||||
password, or rate-limit `POST /pages/login` at the reverse proxy.
|
`POST /pages/login` at the reverse proxy.
|
||||||
|
|
||||||
### Delivery destinations
|
### Delivery destinations
|
||||||
|
|
||||||
@@ -433,10 +432,11 @@ sends them on in the background, and SQLite holds everything in between.
|
|||||||
|
|
||||||
The receiver stores the event and one pending delivery per active target in one
|
The receiver stores the event and one pending delivery per active target in one
|
||||||
database write, then queues the deliveries. Background workers run them and
|
database write, then queues the deliveries. Background workers run them and
|
||||||
record each attempt. At start, a recovery routine queues again every delivery
|
record each attempt. At start, a recovery routine resumes every delivery left
|
||||||
left `pending` or `retrying`. It then runs every minute. Each run sends again a
|
`pending` or `retrying`. It then runs every minute. Each run resumes every
|
||||||
`retrying` delivery the engine is not working on, and a `pending` one that has
|
`retrying` delivery that the engine is not already handling. It also resumes a
|
||||||
sat untouched for 15 minutes. So a stop or a crash loses no delivery.
|
`pending` delivery that has sat untouched for 15 minutes. So a stop or a crash
|
||||||
|
loses no delivery.
|
||||||
|
|
||||||
The main database holds configuration. Each webhook has its own event database,
|
The main database holds configuration. Each webhook has its own event database,
|
||||||
so writes for one webhook never wait on another webhook's database. The program
|
so writes for one webhook never wait on another webhook's database. The program
|
||||||
|
|||||||
Reference in New Issue
Block a user