树洞剪藏#剪藏#树洞剪藏

cloudflare-bark-server: A Cloudflare worker for Bark server

2024 年 12 月 11 日1 分钟
分享Twitter / XTelegram微博

同步来源:树洞剪藏 源站剪藏 ID:364 原文地址:https://github.com/855555/cloudflare-bark-server

打开原文 · 打开源站剪藏快照


855555/cloudflare-bark-server: A Cloudflare worker for Bark server

/ " data-turbo-transient=true>

Skip to content

Navigation Menu

855555

/

cloudflare-bark-server

Type / to search

Create new...

Issues

Pull requests

You have unread notifications

Code

Pull requests 0

Actions

Projects 0

Wiki

Security

Insights

Settings

Additional navigation options

{{ message }}

Create list

-->

Create a list to organize your starred repositories.

Name .

32 remaining

Description .

160 remaining

.

Create

Tip: type : to add emoji to the name or description.

cloudflare-bark-server

Public

forked from oustn/cloudflare-bark-server

Unpin

Watch 0

Fork 0 Cannot fork because you own this repository and are not a member of any organizations.

Forks could not be loaded

Loading

Unstar this repository?

This will remove {{ repoNameWithOwner }} from the {{ listsWithCount }} that it's been added to.

-->

Unstar

Lists

Loading

Star 0

Lists

Loading

Open in github.dev ,>" target=_blank rel="noopener noreferrer">Open in a new github.dev tab Open in codespace

855555/cloudflare-bark-server

main 1 Branch 0 Tags

t

Add file Add file Code

This branch is up to date with oustn/cloudflare-bark-server:main . Contribute Sync fork

Folders and files Name Last commit message Last commit date

Latest commit

oustn

fix: 修复版本更新时已注册的设备无法重新注册 oustn#22

764320d · last week Dec 4, 2024

History 27 Commits

.github/ workflows

doc: update README last week Dec 2, 2024

.idea

build: add github action deploy last month Nov 13, 2024

src

fix: 修复版本更新时已注册的设备无法重新注册 oustn#22 last week Dec 4, 2024

tests

feat: bark schema & endpoint last month Nov 13, 2024

.editorconfig

feat: bark schema & endpoint last month Nov 13, 2024

.gitignore

build: fix github action error last month Nov 13, 2024

.releaserc.json

build: update auto release last month Nov 15, 2024

README.md

doc: update README last week Dec 2, 2024

drizzle.config.ts

feat: bark schema & endpoint last month Nov 13, 2024

package.json

chore: setup release action last month Nov 15, 2024

pnpm-lock.yaml

chore: setup release action last month Nov 15, 2024

prepare.sh

build: change github action variable to secret prevent leak last month Nov 15, 2024

renovate.json

chore: setup renovate base branches to dev last month Nov 15, 2024

tsconfig.json

feat: bark schema & endpoint last month Nov 13, 2024

vitest.config.ts

feat: bark schema & endpoint last month Nov 13, 2024

worker-configuration.d.ts

feat: bark schema & endpoint last month Nov 13, 2024

wrangler.example.toml

build: add github action deploy last month Nov 13, 2024

Drop to upload your files

Repository files navigation README

Cloudflare Bark Server

Bark 服务端,基于 Cloudflare Workers 实现,新增单用户模式和通知保存。多用户模式和通知保存使用 D1 SQL 数据库。

准备工作

创建 Cloudflare API token

选择 Edit Cloudflare Workers 模板

需要以下权限:Workers Builds Configuration、Workers Routes、Workers Scripts、D1

获取 Cloudflare Account ID

[可选] 多用户模式或保存通知,需要创建 D1 SQL 数据库 ,并获取数据库名称和 ID

[可选] 单用户模式,需要获取 Bark Device Token:打开 Bark App -> 点击右下角设置 -> 点击 Device Token

[可选] 单用户模式,需要生成一个随机字符串作为 Bark Key: openssl rand -base64 16 ,删除所有的符号,剩下的字符串作为密钥

(推荐)自动部署

(可选)配置 GitHub Actions Secret

PERSIST :是否启用多用户模式和通知保存,值为 true [可选,开启通知保存时配置]

CUSTOM_DOMAIN :自定义域名[可选]

D1_NAME :D1 数据库名称[可选]

D1_ID :D1 数据库 ID[可选]

手动部署

Fork 本仓库

在仓库的 Settings -> Secrets and variables -> Actions 中添加以下 Secrets(由于 action 的 log 是公开的,使用 secret 来配置变量):

CLOUDFLARE_ACCOUNT_ID :Cloudflare Account ID

CLOUDFLARE_API_TOKEN :Cloudflare API token

PERSIST :是否启用多用户模式和通知保存,值为 true [可选,开启通知保存时配置]

CUSTOM_DOMAIN :自定义域名[可选]

D1_NAME :D1 数据库名称[可选]

D1_ID :D1 数据库 ID[可选]

启用 Actions,手动运行 Deploy workflow

单用户模式

单用户模式下,只需配置 Bark Device Token 和 Bark Key,即可使用 Bark 服务端。

开启方式:

打开 Cloudflare 控制台

点击菜单 Workers 和 Pages

点击 cloudflare-bark-server 项目

点击设置

选择变量和机密菜单

点击添加

添加密钥类型,名称 DEVICE_TOKEN,值为 Bark Device Token

添加密钥类型,名称 KEY,值为 Bark Key

访问 https://your-worker-name.your-account.workers.dev/info ,可以看到 serverless 为 true

通知保存

当配置 D1 数据库和开启通知保存时,可以保存通知到数据库中。目前暂时没有提供浏览历史通知功能,可以直接在数据库的 messages 表中查看。

使用方法

查看 官方文档

Edit repository details

Description

Website

Topics (separate with spaces)

Include in the home page

Releases

Packages

Deployments

Save changes Cancel

About

A Cloudflare worker for Bark server

Resources

Readme

Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks

Releases

No releases published

Create a new release

Packages 0

No packages published

Publish your first package

Languages

TypeScript 97.6%

Shell 2.4%

Footer

© 2024 GitHub, Inc.

Footer navigation

Terms

Privacy

Security

Status

Docs

Contact

Manage cookies

Do not share my personal information

You can’t perform that action at this time.

set 限制解除

相关文章