桌面上的 Web 推送和 Phone

Web Push on Desktop and Phone

我正在测试 WebPushDemo(如何使用 web-push-csharp 的示例) 图书馆:https://github.com/web-push-libs/web-push-csharp/ 演示:https://github.com/coryjthompson/WebPushDemo

在我的本地 IIS 上部署项目后,我可以使用 https://192.168.2.106:8081 and also with http://192.168.2.106:8080 访问该站点 - 一切都适用于我的桌面浏览器(chrome、edge、firefox)

我可以注册设备并向它们发送消息,现在看起来不错,我正在填充以下字段:PushEndpoint、PushP256DH、PushAuth

Chrome:版本 87.0.4280.66 边缘:版本 87.0.664.41 Firefox:版本 83.0

但是,如果我从我的 android phone 或 iPhone 访问该站点并且我想注册该设备,这些字段将保持为空:PushEndpoint、PushP256DH、PushAuth .

Chrome: 83.1.0 边缘:45.10.4.508 火狐浏览器:83.1.0

我是不是忽略了一个设置,还是根本不可能?

哦,我需要从 phone 到服务器的 https 连接,我使用以下工具只是为了测试:https://ngrok.com/