Goindex将Google Drive通过Cloudflare网络生成无需科学上网即可访问的在线文件目录,具备轻量,设置简单,无服务器的特点,可以直接列出你谷歌网盘的所有文件,还可以在线观看某些格式的视频文件。

Combining the power of Cloudflare Workers and Google Drive will allow you to index you files on the browser on Cloudflare Workers.

目录 / LIST


# 获取配置参数 | Get parameters

  • 先安装rclone,并配置好你的谷歌网盘,个人推荐无限容量的团队盘,如果没有,可以联系 Maxh 免费领取一个。
  • First you should have rclone installed, and have google drive config set as well. It is recommended to add an shared team drive that have unlimited storage. Contact Maxh to get one for free.

你可能会感兴趣 | Maybe interested in


  • 配置完成后,用filebrowser打开rclone的配置文件/root/.config/rclone/rclone.conf,记下里面的对应的refresh_token,以及team_drive共享团队盘的代码。
  • After the configuration is complete, use the filebrowser to open the rclone configuration file /root/.config/rclone/rclone.conf, write down the corresponding refresh_token, and the team_drive code.

你可能会感兴趣 | Maybe interested in


# 获取workers代码 | Get workers code

  • 接下来到donwa/goindex · GitHubindex.js代码复制下来,并且把刚才获取的refresh_tokenteam_drive填入如下相应位置。
  • Next, copy the index.js code in donwa/goindex · GitHub, and fill in the following locations with the refresh_token and team_drive you just got.
var authConfig = {
    "siteName": "Marsgrid", // 网站名称
    "root_pass": "",  // 根目录密码,优先于.password
    "version" : "1.0.6", // 程序版本
    "theme" : "material", // material  classic 
    "client_id": "202264815644.apps.googleusercontent.com",
    "client_secret": "X4Z3ca8xfWDb1Voo-F9a7ZxJ",
    "refresh_token": "1/6MO******", // 授权 token | refresh_token
    "root": "0AA******" // 根目录ID | team_drive

# 部署到cloudflare | deployment in cloudflare

  • 登陆Cloudflare,依次选择WorkersCreate a worker
  • Log in to Cloudflare and select Workers, then Create a worker.
  • 把刚才准备好的代码复制到左边,然后点击Save and Deploy完成部署。
  • Copy the code you just prepared to the left and click Save and Deploy to complete the deployment.

# 绑定域名 | Binding domain name

  • 部署完成后域名可能会很长,参照以下步骤绑定你自己的三级域名。首先需要先将自己的域名转到cloudflare,然后点自己域名的DNS设置,解析一个A记录,IP地址随意,其他默认。
  • After the deployment is complete, the domain name may be very long. Follow the steps below to bind your own third-level domain name. First, you need to transfer your domain name to cloudflare, then click the DNS setting of your domain name, add an A record, the IP address is arbitrary, and other by default.
  • 设置完毕后再来到workers页面,点击Add route,输入刚才设置的三级域名,httphttps随意,记得末尾要添加/*Worker选择刚才新建的那个。
  • After setting, go to the workers page, click Add route, enter the three-level domain name you just set, type in http or https as you wish. Feel free to add /* at the end, and Worker select the one you just created.

# 在线播放 | Stream online

  • 打开nPlayer内置的浏览器输入刚才配置的域名即可在线播放。
  • Open nPlayer’s built-in browser and enter the domain name you just configured to go streaming.

# 参考指南 | User Guide

  • 如果你想了解更多Goindex的使用方法,可以访问下方的Github项目页面。
  • If you want to learn more about how to use Goindex, you can visit the GitHub page.

GitHub - donwa/goindex: Google Drive Directory Index

• 本文作者 | Author info >> MAXH
• 来源链接 | Source link >> Goindex免服务器谷歌网盘索引 | Serverless Google drive indexing
• 发表评论 | Make comments >>