使用gotify作为消息转发服务,实现备用手机消息推送其他设备。
gotify
a simple server for sending and receiving messages
install guide
-
1docker pull notify/server1docker run -d -e TZ="Asia/Shanghai" -e GOTIFY_SERVER_PORT=10005 -p 10005:10005 -v /root/gotify/data:/app/data gotify/serverGOTIFY_SERVER_PORT 指定gotify服务运行在
10005端口 -
使用caddy转发
1 2 3 4gotify.yourhost { reverse_proxy 127.0.0.1:10005 tls internal } -
通过浏览器访问
gotify前端并重置密码默认账号/密码为:admin/admin
-
创建客户端并获取token,消息推送将使用生成的token作为凭证
消息推送测试
- 使用
curl推送消息给客户端
|
|
priority指定了消息的优先级,在使用gotify所提供的安卓程序时,所推送消息的提示方式将会不同
- 使用caddy反向代理时,客户端请使用https否则将连接失败