记录一下通过Cloudflare的worker搭建Google Drive目录程序

说明

快速部署

  1. 打开https://install.achirou.workers.dev 或者 https://goindex-quick-install.glitch.me
  2. 授权并获取授权码
  3. 将代码部署到 Cloudflare Workers

部署

  1. 开启Google Drive API
  2. 创建一个 OAuth client ID
  3. 本地安装rclone
  4. 使用rclone获取refresh_token

    参考教程

  5. 下载index.js (https://github.com/Aicirou/goindex-theme-acrou/tree/master/go2index) 然后替换client_id,client_secret,refresh_token 为你刚刚获取到的
  6. 把代码部署到Cloudflare Workers

补充

建议使用第二种部署流程,这样获取到的client IDclient_secret是自己单独使用的,而使用快速部署获取到的,是很多人共用的,高峰期速度很慢!

评论