mirror of
https://github.com/Finb/Bark.git
synced 2025-12-08 21:36:01 +00:00
Update Readme
This commit is contained in:
parent
d042efc474
commit
79c0535aad
146
README.en.md
146
README.en.md
@ -1,146 +0,0 @@
|
||||
# Bark
|
||||
|
||||

|
||||
|
||||
[Bark](https://github.com/Finb/Bark) is an open-source push notifications app that respects your privacy. You can host your own server, or use the free public service, to send real-time alerts to your iPhone. Everything stays between you and your server (plus Apple). Bark supports webhooks and a simple HTTP API.
|
||||
|
||||
This repository contains the source code for the iOS app. For the backend, [bark-server](https://github.com/Finb/bark-server) is written in Go, and supports Docker and serverless functions.
|
||||
|
||||
## Send a Push Notification
|
||||
|
||||
### API v2
|
||||
|
||||
**Bark is switching to to API v2, which supports webhooks. See [API_V2.md](https://github.com/Finb/bark-server/blob/master/docs/API_V2.md).**
|
||||
|
||||
### API v1
|
||||
|
||||
The Bark app supports both API v1 and v2, but the UI currently only showcases v1. API v1 supports both HTTP GET or POST requests with the following format.
|
||||
|
||||
```
|
||||
https://{server}/{key}/{body}
|
||||
https://{server}/{key}/{title}/{body}
|
||||
```
|
||||
|
||||
API v1 also supports optional query strings.
|
||||
|
||||
`automaticallyCopy` (boolean)
|
||||
|
||||
```
|
||||
//Automatically copy the body text of a notification (iOS 14.4 and below)
|
||||
https://api.day.app/key/body?automaticallyCopy=1
|
||||
```
|
||||
|
||||
`badge` (integer)
|
||||
|
||||
```
|
||||
//Specify the badge count on the app icon
|
||||
https://api.day.app/key/body?badge=3
|
||||
```
|
||||
|
||||
`copy` (string)
|
||||
|
||||
```
|
||||
//Specify clipboard content when copying
|
||||
https://api.day.app/key/body?copy=1234
|
||||
```
|
||||
|
||||
`group` (string)
|
||||
|
||||
```
|
||||
//Let iOS sort notifications by groups
|
||||
https://api.day.app/key/body?group=groupName
|
||||
```
|
||||
|
||||
`icon` (string)
|
||||
|
||||
```
|
||||
//Display a custom icon on a notification (iOS 15 and above)
|
||||
https://api.day.app/key/body?icon=http://day.app/assets/images/avatar.jpg
|
||||
```
|
||||
|
||||
`isArchive` (boolean)
|
||||
|
||||
```
|
||||
//Archive a notification if 1, prevent archiving if 0, default settings will apply if unset
|
||||
https://api.day.app/key/body?isArchive=1
|
||||
```
|
||||
|
||||
`level` (boolean)
|
||||
|
||||
```
|
||||
//Set importance and delivery timing of a notification
|
||||
//active (default): presents the notification immediately, lights up the screen, and can play a sound
|
||||
//timeSensitive: similar to active, but can break through system controls such as Notification Summary and Focus
|
||||
//passive: adds the notification to the notification list without lighting up the screen or playing a sound
|
||||
https://api.day.app/key/body?level=timeSensitive
|
||||
```
|
||||
|
||||
`sound` (string)
|
||||
|
||||
```
|
||||
//Select an alert sound for a notification
|
||||
//Available sounds are located in the 'Sounds' folder and can be previewed in the app
|
||||
https://api.day.app/key/body?sound=alarm
|
||||
```
|
||||
|
||||
`url` (string)
|
||||
|
||||
```
|
||||
//Open an URL by clicking on a notification
|
||||
https://api.day.app/key/body?automaticallyCopy=1
|
||||
```
|
||||
|
||||
## FAQ
|
||||
|
||||
* Time Sensitive notifications don’t work.
|
||||
|
||||
Try restarting your device.
|
||||
* I can’t archive or copy my notifications.
|
||||
|
||||
Try restarting your device. Sometimes Apple’s notification extension ([UNNotificationServiceExtension](https://developer.apple.com/documentation/usernotifications/unnotificationserviceextension)) fails to run. Consequently Bark can’t excute the code to do so.
|
||||
* The auto copy function doesn’t work.
|
||||
|
||||
Since iOS 14.5, Apple has tightened clipboard security, and copying is no longer possible without user intervention. You can pull down, long press or open the notification to trigger the auto copy function, or use the system popup button to copy.
|
||||
* Are there any limits on the number of notifications I can receive?
|
||||
|
||||
There aren’t any limitations. However, if you make a massive amount (> 100,000) of bad requests (e.g., 500 or 404 resulted from bad formatting), your IP will be banned.
|
||||
* How do I open the Message History tab on startup?
|
||||
|
||||
Bark will open on the same tab it was closed on. Close Bark on the Message History tab.
|
||||
* Does Bark support POST requests?
|
||||
|
||||
Bark supports GET and POST requests with the same set of parameters. If you want to use webhooks with JSON, you must use API v2. See [API_V2.md](https://github.com/Finb/bark-server/blob/master/docs/API_V2.md).
|
||||
* My notifications failed to push/got messed up when there are special characters.
|
||||
|
||||
You need to use URL encoding to convert the special chracters, or the Bark server might not be able to properly interprete the request. Production-level libraries usually handle special characters automatically.
|
||||
* How can I make sure my notifications stay private?
|
||||
|
||||
This is how your notification reaches you with Bark:
|
||||
Sender → Bark Server → Apple Push Notification Service → Your iPhone → Bark Client
|
||||
The Bark server and client are the two attack surfaces that we control. You can mitigate the risks by:
|
||||
1. Deploy your own Bark server with [the open-source backend](https://github.com/Finb/bark-server).
|
||||
2. Make sure the Bark app has not been tampered.
|
||||
|
||||
Bark uses GitHub Actions to build and publish itself to the App Store. You can verify whether the ‘run_id’ in the app matches the one on GitHub to ensure the app was built from its original codebase.
|
||||
|
||||
You can also find build configurations, version and build numbers in the run log. The version and build numbers must be unique to be accepted by the App Store. Therefore you can verify whether the version and build numbers of your app match the ones in the run log.
|
||||
|
||||
## Community Ports
|
||||
|
||||
Push from Chrome Extension: [Bark-Chrome-Extension](https://github.com/xlvecle/Bark-Chrome-Extension)
|
||||
|
||||
Push from Web with scheduled tasks: [Bark Assisatant](https://api.ihint.me/bark.html)
|
||||
|
||||
Push from Windows: [BarkHelper](https://github.com/HsuDan/BarkHelper)
|
||||
|
||||
Push from CLI: [bark-cli](https://github.com/JasonkayZK/bark-cli)
|
||||
|
||||
Quicker Action: https://getquicker.net/Sharedaction?code=e927d844-d212-4428-758d-08d69de12a3b
|
||||
|
||||
Bark for Wox: [Wox.Plugin.Bark](https://github.com/Zeroto521/Wox.Plugin.Bark)
|
||||
|
||||
java-bark-server: [https://gitee.com/hotlcc/java-bark-server](https://gitee.com/hotlcc/java-bark-server)
|
||||
|
||||
Python for Bark: [barknotificator
|
||||
](https://github.com/funny-cat-happy/barknotificator)
|
||||
|
||||
160
README.md
160
README.md
@ -1,123 +1,91 @@
|
||||
## 使用文档
|
||||
[https://bark.day.app](https://bark.day.app)
|
||||
English | **[中文](README.zh.md)**
|
||||
## Bark
|
||||
Bark is a push notification tool app. It's free, simple, and secure, leveraging APNs without draining device battery.<br/>
|
||||
Bark supports many advanced features of iOS notifications, including notification grouping, custom push icons, sounds, time-sensitive notifications, critical alerts, and more.<br/>
|
||||
Additionally, Bark supports self-hosted servers and offers encrypted push notifications to ensure privacy and security. <br/>
|
||||
|
||||
## 问题反馈 Telegram 群
|
||||
[Bark反馈群](https://t.me/joinchat/OsCbLzovUAE0YjY1)
|
||||
## Documentation
|
||||
[https://bark.day.app/#/en-us/](https://bark.day.app/#/en-us/)
|
||||
|
||||
## 发送推送
|
||||
1. 打开APP,复制测试URL
|
||||
## Feedback
|
||||
[Telegram](https://t.me/joinchat/OsCbLzovUAE0YjY1)
|
||||
|
||||
## Sending Push Notifications
|
||||
1. Open the app and copy the test URL
|
||||
|
||||
<img src="https://wx4.sinaimg.cn/mw2000/003rYfqply1grd1meqrvcj60bi08zt9i02.jpg" width=365 />
|
||||
|
||||
2. 修改内容,请求这个URL
|
||||
2. Modify the content and request this URL
|
||||
```
|
||||
可以发 get 或者 post 请求 ,请求成功会立即收到推送
|
||||
You can send GET or POST requests, and you'll receive a push notification immediately upon success.
|
||||
|
||||
URL 组成: 第一个部分是 key , 之后有三个匹配
|
||||
URL structure: The first part is the key, followed by three matches
|
||||
/:key/:body
|
||||
/:key/:title/:body
|
||||
/:key/:category/:title/:body
|
||||
|
||||
title 推送标题 比 body 字号粗一点
|
||||
body 推送内容 换行请使用换行符 '\n'
|
||||
category 另外的功能占用的字段,还没开放 忽略就行
|
||||
post 请求 参数名也是上面这些
|
||||
title: The push title, slightly larger than the body text
|
||||
body: The push content, use the newline character '\n' for line breaks
|
||||
category: Reserved for additional features, currently not open for use, just ignore it
|
||||
For POST requests, the parameter names are the same as above
|
||||
```
|
||||
|
||||
## 复制推送内容
|
||||
收到推送时下拉推送(或在通知中心左滑查看推送)有一个`复制`按钮,点击即可复制推送内容。
|
||||
|
||||
> <img src="http://wx4.sinaimg.cn/mw690/0060lm7Tly1g0btjhgimij30ku0a60v1.jpg" width=375 />
|
||||
|
||||
```objc
|
||||
//将复制“验证码是9527”
|
||||
https://api.day.app/yourkey/验证码是9527
|
||||
```
|
||||
|
||||
携带参数 automaticallyCopy=1, 收到推送时,推送内容会自动复制到粘贴板(如发现不能自动复制,可尝试重启一下手机)
|
||||
```objc
|
||||
//自动复制 “验证码是9527” 到粘贴板
|
||||
https://api.day.app/yourkey/验证码是9527?automaticallyCopy=1
|
||||
```
|
||||
|
||||
|
||||
携带copy参数, 则上面两种复制操作,将只复制copy参数的值
|
||||
```objc
|
||||
//自动复制 “9527” 到粘贴板
|
||||
https://api.day.app/yourkey/验证码是9527?automaticallyCopy=1©=9527
|
||||
```
|
||||
|
||||
## 其他参数
|
||||
## Parameters
|
||||
|
||||
* url
|
||||
```
|
||||
// 点击推送将跳转到url的地址(发送时,URL参数需要编码)
|
||||
https://api.day.app/yourkey/百度网址?url=https://www.baidu.com
|
||||
```
|
||||
* isArchive
|
||||
```
|
||||
// 指定是否需要保存推送信息到历史记录,1 为保存,其他值为不保存。
|
||||
// 如果不指定这个参数,推送信息将按照APP内设置来决定是否保存。
|
||||
https://api.day.app/yourkey/需要保存的推送?isArchive=1
|
||||
// Click on the push notification to jump to the specified URL
|
||||
https://api.day.app/yourkey/url?url=https://www.google.com
|
||||
```
|
||||
* group
|
||||
```
|
||||
// 指定推送消息分组,可在历史记录中按分组查看推送。
|
||||
https://api.day.app/yourkey/需要分组的推送?group=groupName
|
||||
// Specify the push message group to view pushes by group.
|
||||
https://api.day.app/yourkey/group?group=groupName
|
||||
```
|
||||
* icon (仅 iOS15 或以上支持)
|
||||
* icon (supported on iOS 15 and above)
|
||||
```
|
||||
// 指定推送消息图标
|
||||
https://api.day.app/yourkey/需要自定义图标的推送?icon=http://day.app/assets/images/avatar.jpg
|
||||
// Specify the push message icon
|
||||
https://api.day.app/yourkey/icon?icon=http://day.app/assets/images/avatar.jpg
|
||||
```
|
||||
* 时效性通知
|
||||
* sound
|
||||
```
|
||||
// 设置时效性通知
|
||||
// Specify the push message sound
|
||||
https://api.day.app/yourkey/sound?sound=alarm
|
||||
```
|
||||
* call
|
||||
```
|
||||
// Play sound repeatedly for 30 seconds
|
||||
https://api.day.app/yourkey/call?call=1
|
||||
```
|
||||
* ciphertext
|
||||
```
|
||||
// Encrypted push message
|
||||
https://api.day.app/yourkey/ciphertext?ciphertext=
|
||||
```
|
||||
* Time-sensitive notifications
|
||||
```
|
||||
// Set time-sensitive notifications
|
||||
https://api.day.app/yourkey/时效性通知?level=timeSensitive
|
||||
|
||||
// 可选参数值
|
||||
// active:不设置时的默认值,系统会立即亮屏显示通知。
|
||||
// timeSensitive:时效性通知,可在专注状态下显示通知。
|
||||
// passive:仅将通知添加到通知列表,不会亮屏提醒
|
||||
// Optional values
|
||||
// active: Default value when not set, the system will immediately display the notification by lighting up the screen.
|
||||
// timeSensitive: Time-sensitive notification, can be displayed during focus mode.
|
||||
// passive: Adds notification to the notification list without lighting up the screen.
|
||||
```
|
||||
* Critical alerts
|
||||
```
|
||||
// Set critical alerts
|
||||
https://api.day.app/yourkey/criticalAlert?level=critical
|
||||
|
||||
## 后端代码
|
||||
[bark-server](https://github.com/Finb/bark-server)
|
||||
>将后端代码部署在你自己的服务器上。支持Docker
|
||||
|
||||
## Chrome 插件
|
||||
[Bark-Chrome-Extension](https://github.com/xlvecle/Bark-Chrome-Extension)
|
||||
>这是一款chrome插件能帮你方便地把网页上的文本或者网址推送到Bark手机端。
|
||||
|
||||
效果展示
|
||||
|
||||

|
||||
|
||||
|
||||
## 在线定时发送
|
||||
[https://api.ihint.me/bark.html](https://api.ihint.me/bark.html)
|
||||
|
||||
## Windows推送客户端
|
||||
[https://github.com/HsuDan/BarkHelper](https://github.com/HsuDan/BarkHelper)
|
||||
|
||||
## 跨平台的命令行应用
|
||||
[https://github.com/JasonkayZK/bark-cli](https://github.com/JasonkayZK/bark-cli)
|
||||
|
||||
## GitHub Actions
|
||||
[https://github.com/harryzcy/action-bark](https://github.com/harryzcy/action-bark)
|
||||
|
||||
## Quicker 动作
|
||||
使用 Quicker 软件在 Windows 上将选中文字一键推送到iPhone,支持打开URL和自动复制推送内容
|
||||
[https://getquicker.net/Sharedaction?code=e927d844-d212-4428-758d-08d69de12a3b](https://getquicker.net/Sharedaction?code=e927d844-d212-4428-758d-08d69de12a3b)
|
||||
|
||||
## Bark for Wox
|
||||
[https://github.com/Zeroto521/Wox.Plugin.Bark](https://github.com/Zeroto521/Wox.Plugin.Bark)
|
||||
|
||||
## bark-jssdk
|
||||
[https://github.com/afeiship/bark-jssdk](https://github.com/afeiship/bark-jssdk)
|
||||
|
||||
## java-bark-server
|
||||
[https://gitee.com/hotlcc/java-bark-server](https://gitee.com/hotlcc/java-bark-server)
|
||||
|
||||
## Python for Bark
|
||||
[barknotificator](https://github.com/funny-cat-happy/barknotificator)
|
||||
Critical alerts will ignore silent and do not disturb modes, always playing the notification sound and displaying on the screen.
|
||||
```
|
||||
## Others
|
||||
- [Online Scheduled Sending](https://api.ihint.me/bark.html)
|
||||
- [Windows Push Client](https://github.com/HsuDan/BarkHelper)
|
||||
- [Cross-platform Command Line Application](https://github.com/JasonkayZK/bark-cli)
|
||||
- [Bark GitHub Actions](https://github.com/harryzcy/action-bark)
|
||||
- [Quicker Actions](https://getquicker.net/Sharedaction?code=e927d844-d212-4428-758d-08d69de12a3b)
|
||||
- [Bark for Wox](https://github.com/Zeroto521/Wox.Plugin.Bark)
|
||||
- [bark-jssdk](https://github.com/afeiship/bark-jssdk)
|
||||
- [java-bark-server](https://gitee.com/hotlcc/java-bark-server)
|
||||
- [Python for Bark](https://github.com/funny-cat-happy/barknotificator)
|
||||
|
||||
91
README.zh.md
Normal file
91
README.zh.md
Normal file
@ -0,0 +1,91 @@
|
||||
**[English](README.en.md)** | 中文
|
||||
## Bark
|
||||
Bark 是一款推送通知工具 App。它免费、简单且安全,依赖 APNs 不会消耗设备的电量。<br/>
|
||||
Bark 支持 iOS 通知的多项高级特性,包括推送分组、定制推送图标、铃声,发送时效性通知、重要警告等等。<br/>
|
||||
此外,Bark 允许用户自行部署服务端,还有推送加密,APP由开源代码自动构建与发布等措施保证隐私安全。<br/>
|
||||
|
||||
## 使用文档
|
||||
[https://bark.day.app](https://bark.day.app)
|
||||
|
||||
## 问题反馈
|
||||
[Bark反馈群](https://t.me/joinchat/OsCbLzovUAE0YjY1)
|
||||
|
||||
## 发送推送
|
||||
1. 打开APP,复制测试URL
|
||||
|
||||
<img src="https://wx4.sinaimg.cn/mw2000/003rYfqply1grd1meqrvcj60bi08zt9i02.jpg" width=365 />
|
||||
|
||||
2. 修改内容,请求这个URL
|
||||
```
|
||||
可以发 get 或者 post 请求 ,请求成功会立即收到推送
|
||||
|
||||
URL 组成: 第一个部分是 key , 之后有三个匹配
|
||||
/:key/:body
|
||||
/:key/:title/:body
|
||||
/:key/:category/:title/:body
|
||||
|
||||
title 推送标题 比 body 字号粗一点
|
||||
body 推送内容 换行请使用换行符 '\n'
|
||||
category 另外的功能占用的字段,还没开放 忽略就行
|
||||
post 请求 参数名也是上面这些
|
||||
```
|
||||
|
||||
## 功能参数
|
||||
|
||||
* url
|
||||
```
|
||||
// 点击推送将跳转到url的地址(发送时,URL参数需要编码)
|
||||
https://api.day.app/yourkey/百度网址?url=https://www.baidu.com
|
||||
```
|
||||
* group
|
||||
```
|
||||
// 指定推送消息分组,可在历史记录中按分组查看推送。
|
||||
https://api.day.app/yourkey/需要分组的推送?group=groupName
|
||||
```
|
||||
* icon (仅 iOS15 或以上支持)
|
||||
```
|
||||
// 指定推送消息图标
|
||||
https://api.day.app/yourkey/需要自定义图标的推送?icon=http://day.app/assets/images/avatar.jpg
|
||||
```
|
||||
* sound
|
||||
```
|
||||
// 指定推送消息的铃声
|
||||
https://api.day.app/yourkey/sound?sound=alarm
|
||||
```
|
||||
* call
|
||||
```
|
||||
// 重复播放铃声30s
|
||||
https://api.day.app/yourkey/call?call=1
|
||||
```
|
||||
* ciphertext
|
||||
```
|
||||
// 推送加密的密文
|
||||
https://api.day.app/yourkey/ciphertext?ciphertext=
|
||||
```
|
||||
* 时效性通知
|
||||
```
|
||||
// 设置时效性通知
|
||||
https://api.day.app/yourkey/时效性通知?level=timeSensitive
|
||||
|
||||
// 可选参数值
|
||||
// active:不设置时的默认值,系统会立即亮屏显示通知。
|
||||
// timeSensitive:时效性通知,可在专注状态下显示通知。
|
||||
// passive:仅将通知添加到通知列表,不会亮屏提醒
|
||||
```
|
||||
* 重要警告
|
||||
```
|
||||
// 设置时效性通知
|
||||
https://api.day.app/yourkey/时效性通知?level=critical
|
||||
|
||||
重要警告会忽略静音和勿扰模式,始终播放通知声音并在屏幕上显示。
|
||||
```
|
||||
## 其他
|
||||
- [在线定时发送](https://api.ihint.me/bark.html)
|
||||
- [Windows推送客户端](https://github.com/HsuDan/BarkHelper)
|
||||
- [跨平台的命令行应用](https://github.com/JasonkayZK/bark-cli)
|
||||
- [Bark GitHub Actions](https://github.com/harryzcy/action-bark)
|
||||
- [Quicker 动作](https://getquicker.net/Sharedaction?code=e927d844-d212-4428-758d-08d69de12a3b)
|
||||
- [Bark for Wox](https://github.com/Zeroto521/Wox.Plugin.Bark)
|
||||
- [bark-jssdk](https://github.com/afeiship/bark-jssdk)
|
||||
- [java-bark-server](https://gitee.com/hotlcc/java-bark-server)
|
||||
- [Python for Bark](https://github.com/funny-cat-happy/barknotificator)
|
||||
Loading…
x
Reference in New Issue
Block a user