1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101
|
# KUnifiedPush
[UnifiedPush](https://unifiedpush.org) client library and distributor daemon.
## Client Library
### Getting Started
How to register for push notifications:
- Register on D-Bus with a service name
- Make your application D-Bus activatable
- Create an instance of KUnifiedPush::Connector.
- Communicate the endpoint URL provided by this to the corresponding server-side application.
- Connect to its `messageReceived` signal.
There's also support for the following security capabilities, in case your application server
supports any of those:
- Message Encryption for Web Push ([RFC 8291](https://datatracker.ietf.org/doc/rfc8291/)).
- Voluntary Application Server Identification (VAPID) ([RFC 8292](https://datatracker.ietf.org/doc/rfc8292/)).
### Supported Distributors
For the basic functionality any standard compliant D-Bus distributor should work.
The graphical status and configuration user interface however only works with
the `kunifiedpush-distributor`, as that needs a lot more access to distributor
internal details than the standard interfaces provide.
## D-Bus Distributor
UnifiedPush only specifies the protocol between distributor and client as well as
between the server-side application and the push provider, but not the one between
the push provider and the distributor. Supporting different push providers therefore
requires provider specific code and configuration.
### Configuration
There is a configuration KCM, alternatively this can be configured via
the `~/.config/KDE/kunifiedpush-distributor.conf` configuration file.
```
[PushProvider]
Type=[Gotify|NextPush|Ntfy]
```
### Supported push providers
#### Gotify
https://gotify.net/
Configuration:
```
[Gotify]
ClientToken=xxx
Url=https://my.server.org
```
#### Mozilla WebPush
https://github.com/mozilla-services/autopush-rs
Configuration:
```
[Autopush]
Url=https://push.services.mozilla.com
````
#### NextPush
https://github.com/UP-NextPush/server-app
Configuration:
```
[NextPush]
AppPassword=xxx
Url=https://my.server.org
Username=user
```
#### Ntfy
https://ntfy.sh/
Configuration:
```
[Ntfy]
Url=https://ntfy.sh
```
Ntfy can be self-hosted, but also provides a hosted instance at `https://ntfy.sh` that
works without requiring an account.
## Push Notification KCM
In combination with our own distributor this allows configuring the push provider to use
in System Settings, check the distributor status, and see all apps currently using push
notifications.
|