Skip to content

chatmail/notifiers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chatmail Notification Proxy

The Chatmail notification proxy is deployed as a central service on https://notifications.delta.chat

The notification proxy is a small Rust program that forwards "device tokens" to Apple and Google "Push Services" that in turn wake up the clients using Chatmail core on user's devices.

Usage

OpenPGP key

The OpenPGP key can be generated using rsop:

$ rsop generate-key --profile rfc9580 > openpgp.privkey
$ rsop extract-cert < privkey > openpgp.pubkey

APNS Certificates

The certificate file provided must be a .p12 file. Instructions for how to create can be found here.

FCM token

The FCM token can be retrieved in the Firebase console.

VAPID key

The VAPID key can be generated with openssl. The VAPID public key will be printed during startup:

$ openssl ecparam -name prime256v1 -genkey -noout -out vapid.privkey
$ openssl pkcs8 -topk8 -in vapid.privkey -nocrypt -out vapid.pk8

Running

$ cargo build --release
$ ./target/release/notifiers --certificate-file <file.p12> --password <password> --fcm-key-path <fcm.private> --openpgp-keyring-path <openpgp.privkey> --vapid-key-path <vapid.pk8>
  • file.p12 is APNS certificate
  • password is file.p12 password
  • fcm.private is the FCM token
  • openpgp.privkey is the generated OpenPGP key

Registering devices

$ curl -X POST -d '{ "token": "<device token>" }' http://localhost:9000/register

Enabling metrics

To enable OpenMetrics (Prometheus) metrics endpoint, run with --metrics argument, e.g. --metrics 127.0.0.1:9001. Metrics can then be retrieved with curl http://127.0.0.1:9001/metrics.

About

Notify devices

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

 
 
 

Contributors

Languages