web-push 0.1.1

Web push notification client with support for http-ece encryption.
Documentation

Rust Web Push

Travis Build Status

Web push notification sender.

Documentation

To send a web push from command line, first subscribe to receive push notifications with your browser and store the subscription info into a json file. It should have the following content:

{
  "endpoint": "https://updates.push.services.mozilla.com/wpush/v1/TOKEN",
  "keys": {
    "auth": "####secret####",
    "p256dh": "####public_key####"
  }
}

Google has good instructions for building a frontend to receive notifications.

Store the subscription info to examples/test.json and send a notification with cargo run --example simple_send -- -f examples/test.json -p "It works!". If using Google Chrome, you need to register yourself into Firebase and provide a GCM API Key with parameter -k GCM_API_KEY.

Overview

Currently implements HTTP-ECE Draft-3 content encryption for notification payloads. The client requires Tokio for asynchronious requests. The modular design allows an easy extension for the upcoming aes128gcm when the browsers are getting support for it.

Tested with Google's and Mozilla's push notification services.