使用CF Workers做Status Page 云探针

[复制链接]
查看: 10208   回复: 10
发表于 2021-12-27 13:41:29 | 显示全部楼层 |阅读模式
一直很想做一个Status Page, 但是很多都是付费的,或者免费的有限制。
我无意中,看到了这个开源的
https://github.com/eidam/cf-workers-status-page

样板:https://status-page.eidam.dev/


本来我想就是通过CF的全球性,可以在全球知道我的网站在各地的联通率、联通速度。
这个的问题在于,使用CF Worker, CRON地点无法选择。大佬们可以参考一下,然后把他改的更加完美。

步骤:
1. 点击Depoly with Workers链接
授权CF Workers
这个链接第一次是授权CF Workers访问你的GitHub, 第二次才是填写具体的Accound ID, API Token。
我发现点击第二次出错概率比较大,本来是可以自动fork的,但是经常报错。所以,我先fork了。

1.1 (可选)修改Deploy with Workers链接
然后将Deploy with Workers的链接,修改为自己fork的链接
  1. https://deploy.workers.cloudflare.com/?url=https://github.com/$userName/cf-workers-status-page
复制代码

2. 复制Account ID 和API Token
Account ID是Worker首页上的Account ID, API Token 可以在第二次点击后创建。
创建的时候确认权限为“Edit Cloudflare Workers”,里面只有两个必填项,我都选择了全部。
API Token只出现一次,之后将不在出现。

3. GitHub Action
根据他的下一步在Action里面Enable workflow

4. 修改config.yaml
直接修改monitors下的网站,网址,是否支持redirect等。

5. 修改 wrangler.toml
修改以适用CF 免费版
将里面cron项,修改为:
  1. crons = ["*/2 * * * *"]
复制代码


Deploy Fail的修复
在wrangler.toml中添加 (第5行后)
  1. compatibility_date = "2021-10-11"
复制代码
回复

使用道具 举报

发表于 2021-12-27 13:42:25 | 显示全部楼层
现已加入 Cloudflare Worker 豪华午餐:

  • Cloudflare Worker Status Page 网站状态监控
    https://github.com/eidam/cf-workers-status-page
  • Euserv 自动续费基于 Cloudflare Workers
    https://github.com/xhuanya/CF-euserv_auto
  • IPFS_PHOTO_SHARE 基于 IPFS 的无服务器图片站
    https://github.com/ChenYFan-Tester/IPFS_PHOTO_SHARE
  • 解决跨域问题
    https://github.com/netnr/workers
  • 基于 Cloudflare Workers 的博客 cloudflare-worker-blog
    https://github.com/kasuganosoras/cloudflare-worker-blog
  • 基于 Cloudflare Workers 和 KV 的博客
    https://github.com/gdtool/cloudflare-workers-blog
  • 基于 Telegraf 框架的 Telegram Bot
    https://moe.best/tutorial/cfworker-telegraf-tgbot.html反代 Telegram Bot API
  • 另一个反代 Telegram Bot API
    https://paste.ubuntu.com/p/2w8KsyGvCg
  • 反代企业微信 API
    https://hostloc.com/thread-808429-1-1.html
    https://hostloc.com/thread-807156-1-1.html
  • GDIndex 谷歌网盘列表
    https://github.com/maple3142/GDIndex
  • PanList 百度网盘列表
    https://github.com/ChenYFan/PanList
  • PanDownload 网页版
    https://github.com/TkzcM/baiduwp
  • OnePoint 一个轻量级、多平台、多网盘的文件目录索引工具
    https://github.com/ukuq/onepoint/tree/master/worker
  • OneManager CloudFlare Workers 版本
    https://github.com/qkqpttgf/OneManager-cfworkerskv
  • 一个很漂亮的 OneDrive 列表程序 onedrive-cf-index
    https://github.com/spencerwooo/onedrive-cf-index
  • 基于 Cloudflare Workers 的 OneDrive 列表鼻祖 Fast OneDrive Index
    http://github.com/vcheckzen/FODI
    https://logi.im/back-end/fodi-on-cloudflare.html
  • 创建 Office 子账号
    https://github.com/zayabighead/Office-User-Auto-Create
  • 创建 Google 团队盘
    https://github.com/yyuueexxiinng ... -share-teamdrive.js
  • 下载辅助工具
    https://github.com/ukuq/cloudflare/blob/master/proxy.js
  • 加速 github 文件
    https://github.com/hunshcn/gh-proxy/blob/master/index.js
  • 短网址
    https://github.com/xyTom/Url-Shorten-Worker
    https://github.com/Closty/duanwangzhi
  • 导航站
    https://github.com/sleepwood/CF-Worker-Dir
  • Fruition 反代 Notion 构建博客
    https://www.notion.so/771ef38657244c27b9389734a9cbff44
  • 自建 Notion API
    https://github.com/splitbee/notion-api-worker反代 91图片反代
    https://github.com/JAVClub/workers/blob/master/img.js
回复 支持 反对

使用道具 举报

发表于 2021-12-27 13:42:33 | 显示全部楼层
这个不算是探针,只能算是在线率展示,而且这个项目很早就有了。
回复 支持 反对

使用道具 举报

发表于 2021-12-27 13:43:08 | 显示全部楼层
吃灰鸡那么多,总能拿出一只来挂探针
回复 支持 反对

使用道具 举报

发表于 2021-12-27 13:43:31 | 显示全部楼层
而且这cron是不能改。cfworker的出口ip是cf分配的,无法修改
回复 支持 反对

使用道具 举报

发表于 2021-12-27 13:43:44 | 显示全部楼层
可以有
回复 支持 反对

使用道具 举报

发表于 2021-12-27 13:43:51 | 显示全部楼层
看起来不错
回复 支持 反对

使用道具 举报

发表于 2021-12-27 13:44:24 | 显示全部楼层
字太多了,表示学不会。。
回复 支持 反对

使用道具 举报

发表于 2021-12-27 13:45:01 | 显示全部楼层
这个可以当云监控来用吧
回复 支持 反对

使用道具 举报

发表于 2021-12-27 13:45:15 | 显示全部楼层
绑定
回复 支持 反对

使用道具 举报

发表于 2021-12-27 13:45:20 | 显示全部楼层
ssl监控
:victory:
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则