Push Notification daemon for unix systems

18a27a1 Add README.md

3 months ago

be7bf23 Make register nicer (also adapt to shoved-register format change)

3 months ago


When push comes to shove... it spawns a process.

shoved is a push notification daemon for Linux systems using the Web Push API and the Mozilla Push Service. These notifications are encrypted by the source and decrypted locally, so the push service cannot read their content.

#How to Use

This repository includes source code for two executables: shoved and shoved-register. shoved must be running to receive push notifications and register new handlers. It is recommended to set this up to automatically start on login, for example in your desktop environment or as a systemd user service. (a system-wide mode is also supported but personally I've had trouble getting desktop notifications to show with that setup)

To set up a service for push notifications, you probably want one of these:

If you want to write your own handler, see the following section.

#Handler Interface

To register a new handler, run the shoved-register command with the filepath of your handler executable. If successful, the command will print a JSON object with subscription information in this structure:

    "endpoint": "https://updates.push.services.mozilla.com/wpush/v1/SOMETHING_GOES_HERE",
    "keys": {
        "auth": "SomethingGoesHere",
        "p256dh": "SomethingMuchLongerGoesHere"

These values should then be sent to the service so it can begin sending pushes.

When a push is received, shoved will run the specified handler executable and pass the contents of the received message as stdin.