Skip to content
/ gdir Public
forked from workerindex/gdir

Google Drive Directory with Service Accounts (SA) rotation support!

License

Notifications You must be signed in to change notification settings

upupoo10/gdir

 
 

Repository files navigation

Google Drive Directory

A Cloudflare Worker based front-end and back-end that gives you a reversed proxy for your Google Drive contents!

中文教程(感謝 HE-SB)

Features

  • Supports both User Accounts (UA) with OAuth2 token, and Service Accounts (SA) with JWT token.
  • Unlimited account rotation algorithm. No more 403 error!
    • Choose a candidates window of 10 accounts every 1 minute, and randomly pick one account from the window for every request.
    • Listing requests that carry page tokens will use the previous account to avoid paging problems.
  • User login support. Admin can create users with password and optional whitelist and blacklist drive IDs.
  • Search support with permission enforcements.
  • Use GitHub, Gist, or any free static hosting services to host your encrypted account credentials, user settings, and static resources! Cloudflare Worker itself can only allow 1MB program data.
  • Dark Mode! Yeeeeeeeeee!
  • React.js for front-end render.
  • Written in TypeScript with Gulp tasks! Make development easy!

Dark Mode

Setup

  • Install Git and Golang toolchain.
  • Follow AutoRclone guide to create your pool of Service Accounts.
  • I recommend adding all your Service Accounts into a Google Group to make it simple for adding all Service Accounts into a Team Drive.

Clone this repository with the following command:

git clone https://github.com/workerindex/gdir.git

Under gdir folder, run the following command to launch the interactive setup program:

go run ./tools/setup

Then follow the instructions to setup and deploy your gdir instance.

Add / Edit Users

To add more users, run the following command:

go run ./tools/adduser

Then follow the instructions to add, edit, and deploy users.

Development

Launch a dev server with npm run dev. This will watch for any changes in source code and rebuild the component. It will start a local Cloudworker server that simulates the Cloudflare Worker environment. So you don't need to deploy to your actual Cloudflare account for development.

Say Hi

You are welcome to join our Telegram Group!

About

Google Drive Directory with Service Accounts (SA) rotation support!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 57.5%
  • Go 37.1%
  • CSS 4.5%
  • HTML 0.9%