Skip to content

Decrypt Web Push notifications received from Misskey servers and forward them via Firebase Cloud Messaging or Apple Push Notification service.

License

Notifications You must be signed in to change notification settings

poppingmoon/misskey-web-push-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Misskey Web Push Proxy

Decrypt Web Push notifications received from Misskey servers and forward them via Firebase Cloud Messaging or Apple Push Notification service.

Setup

Using FCM

  1. Create and set up your Firebase project.
  2. Obtain a private key from Firebase Console.
    1. Open "Project settings" -> "Service Accounts".
    2. Click "Generate new private key".
  3. Set the following environment variables with the corresponding values in the generated JSON file.
    • FIREBASE_PROJECT_ID: private_key_id
    • FIREBASE_PRIVATE_KEY: private_key
    • FIREBASE_CLIENT_EMAIL: client_email

Using APNs

  1. Obtain a key from Apple Developer.
  2. Set the following environment variables.
    • APPLE_BUNDLE_ID: Bundle Identifier of your app
    • APPLE_ENCRYPTION_KEY: Contents of the generated key file
    • APPLE_ENCRYPTION_KEY_ID: Key ID of the key
    • APPLE_TEAM_ID: Your Team ID

Sequence diagram

sequenceDiagram
    participant C as Client
    participant F as FCM / APNs
    participant P as Proxy
    participant M as Misskey

    rect rgba(0, 255, 255, 0.1)
    Note right of C: Create Subscription
    C ->>+ P: POST subscriptions
    P -->>- C: Subscription
    C ->>+ M: POST sw/register
    M -->>- C: Registration
    end

    rect rgba(0, 255, 255, 0.1)
    Note right of C: Send Notification
    M ->>+ P: POST subscriptions/:id
    Note over P: decrypt message
    P ->>- F: send message
    activate F
    F ->>- C: send message
    end

    rect rgba(0, 255, 255, 0.1)
    Note right of C: Remove Subscription
    C ->>+ P: DELETE subscriptions/:id
    P -->>- C: OK
    C ->>+ M: POST sw/unregister
    M -->>- C: OK
    end
Loading

About

Decrypt Web Push notifications received from Misskey servers and forward them via Firebase Cloud Messaging or Apple Push Notification service.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published