Coder Social home page Coder Social logo

workerindex / gdir Goto Github PK

View Code? Open in Web Editor NEW
72.0 7.0 48.0 3.81 MB

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

License: Do What The F*ck You Want To Public License

TypeScript 51.72% HTML 0.81% Go 43.08% SCSS 4.05% Makefile 0.34%

gdir's Introduction

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.