This guide provides instructions for installing Rust, setting up dependencies, and running a GDrive CDN server. The server allows you to list and retrieve files stored in your Google Drive. Follow the steps below to get started.
Install Rust using the following command:
curl https://sh.rustup.rs -sSf | sh
This repository uses the gdrive command line tool to interact with Google Drive. Follow the gdrive installation instruction to set up the tool.
Ensure you have cargo and install required crates:
cargo buildcargo runThe server will start on http://0.0.0.0:3000.
- List all files:
GET /files - Get a file URL:
GET /file/{filename}
Replace {filename} with the actual file name from the logs.
- Ensure
upload_log.txtexists in the root directory. - Modify the
log_filepath in the Rust script if needed. - If you encounter permission issues, use
sudo cargo run(Linux/macOS).
Press Ctrl + C in the terminal to stop the server.