{"id":15450393,"url":"https://github.com/buckket/go-mastopush","last_synced_at":"2026-05-02T09:31:49.783Z","repository":{"id":57609305,"uuid":"187498480","full_name":"buckket/go-mastopush","owner":"buckket","description":"Decrypt and parse Web Push Notifications sent by Mastodon","archived":false,"fork":false,"pushed_at":"2019-08-18T23:01:37.000Z","size":40,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-13T14:04:53.327Z","etag":null,"topics":["fediverse","golang","golang-library","mastodon","webpush","webpush-notifications"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/buckket.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":"buckket","issuehunt":null,"otechie":null,"custom":null}},"created_at":"2019-05-19T16:02:26.000Z","updated_at":"2020-09-21T04:03:46.000Z","dependencies_parsed_at":"2022-08-27T11:12:12.012Z","dependency_job_id":null,"html_url":"https://github.com/buckket/go-mastopush","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buckket%2Fgo-mastopush","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buckket%2Fgo-mastopush/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buckket%2Fgo-mastopush/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buckket%2Fgo-mastopush/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/buckket","download_url":"https://codeload.github.com/buckket/go-mastopush/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245598317,"owners_count":20641884,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fediverse","golang","golang-library","mastodon","webpush","webpush-notifications"],"created_at":"2024-10-01T21:05:01.377Z","updated_at":"2026-05-02T09:31:49.741Z","avatar_url":"https://github.com/buckket.png","language":"Go","funding_links":["https://liberapay.com/buckket"],"categories":[],"sub_categories":[],"readme":"# go-mastopush [![Build Status](https://travis-ci.org/buckket/go-mastopush.svg)](https://travis-ci.org/buckket/go-mastopush) [![Go Report Card](https://goreportcard.com/badge/github.com/buckket/go-mastopush)](https://goreportcard.com/report/github.com/buckket/go-mastopush) [![codecov](https://codecov.io/gh/buckket/go-mastopush/branch/master/graph/badge.svg)](https://codecov.io/gh/buckket/go-mastopush) [![GoDoc](https://godoc.org/github.com/buckket/go-mastopush?status.svg)](https://godoc.org/github.com/buckket/go-mastopush)\n\n**go-mastopush** implements the decryption portion of the [Web Push standard](https://developers.google.com/web/fundamentals/push-notifications/) ([RFC8030](https://tools.ietf.org/html/rfc8030), [RFC8291](https://tools.ietf.org/html/rfc8291)),\nas well as additional helper functions, which allow for easy decryption and parsing of Push Notifications sent by [Mastodon](https://github.com/tootsuite/mastodon).\n\nHere’s the output of the included example project:\n```sh\n[buckket@uncloaked go-mastopush]$ ./go-mastopush \n2019/05/19 16:52:33 Added new push subscription (ID: 1, Endpoint: https://example.org/go-mastopush/)\n2019/05/19 16:52:33 Mastodon ServerKey: \"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX=\"\n2019/05/19 16:52:46 Incoming request from [::1]:39306\n2019/05/19 16:52:46 JWT Header: \u0026{Algorithm:ES256 KeyID: Type:JWT ContentType:}\n2019/05/19 16:52:46 JWT Payload: \u0026{Issuer: Subject:mailto:no-reply@example.org Audience:[https://example.org] ExpirationTime:1558363966 NotBefore:0 IssuedAt:0 JWTID:}\n2019/05/19 16:52:46 New push notification: \n{\n\t\"access_token\": \"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\",\n\t\"preferred_locale\": \"en\",\n\t\"notification_id\": \"701\",\n\t\"notification_type\": \"mention\",\n\t\"icon\": \"https://social.buckket.org/avatars/original/missing.png\",\n\t\"title\": \"You were mentioned by mirror\",\n\t\"body\": \"@buckket Hello. Testing 123\"\n}\n```\n\n## Installation\n\n### From source\n\n    go get -u github.com/buckket/go-mastopush\n\n## Usage\n\n[Here’s](https://github.com/buckket/go-mastopush/tree/master/example) a simple example project. Check [GoDoc](https://godoc.org/github.com/buckket/go-mastopush) for the full documentation.\n\n## Limitations\n\n- Only supports `aesgcm` and not `aes128gcm`. Which is fine, because Mastodon only uses the former.\n  But implementing the later should be straight forward as well, as parsing the HTTP request headers is no\n  longer necessary.\n- Documentation is still lacking.\n\n## Notes\n\n- A remotely similar project which forwards notifications (to APN in this case) instead of decrypting them can be found here:\n[https://github.com/DagAgren/toot-relay](https://github.com/DagAgren/toot-relay)\n- Your HTTP handler should resepct [Section 6.2](https://tools.ietf.org/html/rfc8030#section-6.2) when it comes to returning HTTP status codes.\n\n## License\n\n GNU GPLv3+\n ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuckket%2Fgo-mastopush","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbuckket%2Fgo-mastopush","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuckket%2Fgo-mastopush/lists"}