a small WebPush server
- Go 99%
- Dockerfile 1%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
|
||
| internal | ||
| .dockerignore | ||
| .gitignore | ||
| .woodpecker.yml | ||
| compose.yml | ||
| Dockerfile | ||
| go.mod | ||
| go.sum | ||
| main.go | ||
| README.md | ||
rawrpush
a small WebPush server speaking the autopush protocol, meant for sunup and other unifiedpush distributors
endpoints
| route | purpose |
|---|---|
GET / |
ws(s) for the user agent (hello, register, unregister, ack, ping, urgency) |
POST /wpush/{v1|v2}/{token} |
subs updates from application servers |
DELETE /m/{message_id} |
cancel an undelivered message |
GET/DELETE /v1/{type}/{app_id}/registration/{uaid}[/subscription/{chid}] |
bridge api subset |
GET /health |
healthcheck |
conf
everything comes from the environment.
| variable | default | notes |
|---|---|---|
RAWRPUSH_CRYPTO_KEYS |
- | required, comma separated base64 fernet keys, newest first. head -c32 /dev/urandom | base64 |
RAWRPUSH_ENDPOINT_URL |
- | public base url, e.g. https://push.domain.tld |
RAWRPUSH_ENDPOINT_SCHEME / _HOSTNAME / _PORT |
https / - / listen port |
alternative to RAWRPUSH_ENDPOINT_URL, mirrors autopush's settings |
RAWRPUSH_HOST |
0.0.0.0 |
|
RAWRPUSH_PORT |
8080 |
|
RAWRPUSH_DB_DSN |
- | postgres connection string, empty keeps everything in memory |
RAWRPUSH_MAX_DATA_BYTES |
4096 |
payload limit |
RAWRPUSH_LOG_LEVEL |
info |
debug, info, warn, error |
Unlike autopush there is no split between the connection and the endpoint server, so a single hostname carries both the websocket and the endpoints.
not implemented!!
vapid assertions are accepted but never verified, and a v2 endpoint is not rebound to the key hash it was minted with. no broadcast/megaphone, no multi-node routing, no fcm/apns bridges