Comments (5)
旧版本不兼容加密,打算加个提示使用加密之前升级app。
第一种方案只需app修改就行,改动的代码也不多
from bark-server.
十分期望能参与贡献
from bark-server.
我最近正在尝试加上加密
第一种就是用户端自行加密发送的内容,服务端转发给app,app使用用户设置的秘钥解密
第二种对用户透明,服务端将数据加密后发送到app,app解密
目前倾向于实现第一种,因为没有兼容性问题。第二种无法判断接受用户的app版本是否支持加密
第一种的缺点就是发送端可能会复杂一点,类似
#!/usr/bin/env bash
set -e
# bark key
deviceKey='your key'
# push payload
json='{"body": "test"}'
# must be 16 bytes long
key='1234567890123456'
iv='1234567890123456'
# openssl requires Hex encoding of manual keys and IVs, not ASCII encoding.
key=$(printf $key | xxd -ps -c 200)
iv=$(printf $iv | xxd -ps -c 200)
ciphertext=$(echo -n $json | openssl enc -aes-128-cbc -K $key -iv $iv | base64)
echo $ciphertext
# curl --data-urlencode "ciphertext=$ciphertext" https://api.day.app/$deviceKey
from bark-server.
我最近正在尝试加上加密
第一种就是用户端自行加密发送的内容,服务端转发给app,app使用用户设置的秘钥解密
第二种对用户透明,服务端将数据加密后发送到app,app解密目前倾向于实现第一种,因为没有兼容性问题。第二种无法判断接受用户的app版本是否支持加密
第一种的缺点就是发送端可能会复杂一点
太棒了🥳
第一种正是端到端加密。
发送复杂是可以理解的,但因为可以通过 ciphertext
之类的扩展字段以及其它方式保持兼容,所以对这个特性没有需求的用户是可以无感的。
不过不熟悉 iOS 开发,不清楚那边保持兼容的代价如何。
from bark-server.
1.3.0 版本已经加上了推送加密
from bark-server.
Related Issues (20)
- SIGQUIT: exit signal does not handle properly HOT 2
- APNS 真实设备 Token 如果泄露了,会有什么后果? HOT 1
- 【如何限制未知设备连接到服务器】 HOT 3
- windows部署
- 转义问题 HOT 2
- official freebsd release ? HOT 1
- failed device token from database HOT 3
- 如何更换p8证书 HOT 4
- 4Kb最终实际剩余文本推送大小是多少?
- 哪里可以判断空内容不进行推送 HOT 1
- Cloudflare Worker Version
- 私有部署服务每次调用都会触发两次 HOT 2
- Feature Request: Add Support for Scheduled Messaging
- bark-server 返回 408 ,但是代码中没有找到返回 408 的地方
- 自建dockerserver推送失败报错苹果服务器EOF
- docker 安装后直接提示404 HOT 1
- 请问是否支持多客户端?
- Bark能不能设置白名单 HOT 14
- 推送服务器网址不支持带子路径的吗?必须是网站根目录? HOT 2
- 关于多设备消息推送
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bark-server.