gvsvh

module
v0.0.0-...-04b4601 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 4, 2024 License: AGPL-3.0

README

ddrv

Turn Discord into infinite cloud storage with support for HTTP, WebDAV, and FTP.

About

ddrv is a Go application that exploits Discord's feature of unlimited file attachments (up to 25MB per file) to provide virtually infinite cloud storage. It uses an FTP frontend as well as HTTP and WebDAV, allowing users to upload any size of file. Behind the scene, ddrv cuts the file into 25MB chunks and uploads it to Discord, all the while maintaining the file's metadata in a PostgreSQL database.

Highlights

  • Theoretically infinite file size
  • Unlimited storage space.
  • Support for multiple protocols including HTTP, WebDAV, and FTP, which ensures compatibility with a variety of devices and operating systems.
  • Robust frontend that works with numerous clients such as web browsers, Filezilla, RClone, Windows Explorer, Ubuntu (Nautilus), and many more.
  • PostgreSQL-based file metadata management: File metadata is systematically stored and managed in a PostgreSQL database, enabling efficient file access and manipulation.
  • HTTP supports partial downloads (range headers), so you can use multi-threaded download managers and stream video directly to video players.

Prerequisites

  • PostgreSQL (Data provider - To store file metadata)
  • Discord WebhookURLs (To store actual file data)

Getting Started

  • Navigate to the Release page and download the latest release suitable for your platform.
  • Decompress the binary file and initialize ddrv with the command provided below:
    ./ddrv --dburl=postgres://user:pass@host:port/dbname?sslmode=false --webhooks=webhookURL1,webhookURL2
    
  • An FTP server will launch on ftp://localhost:2525
  • An HTTP server will launch on http://localhost:2526
  • An WebDav server will launch on webdav://localhost:2527

Build from Source

  • Ensure that you have Go (version 1.20 or newer) installed on your system.
  • Clone the repository:
    git clone https://github.com/forscht/ddrv.git
    
  • Navigate to the cloned directory:
    cd ddrv
    
  • Build the project:
    go build -race -o ddrv ./cmd/ddrv
    # If you're on linux and make is installed
    # make build
    
  • Run the executable:
    ./ddrv --dburl=postgres://user:pass@host:port/dbname?sslmode=false --webhooks=webhookURL1,webhookURL2
    
License

ddrv is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). See the LICENSE file for full license details.
For quick reference, the AGPL-3.0 permits use, duplication, modification, and distribution of the software, given that the conditions of the license are met. This license also includes a requirement that if you run modifications of the software on a network, you must make the modified source code available to users. However, the software is provided "as is" and without any warranty. For more information, please read the full license text.

Directories

Path Synopsis
cmd
internal
filesystem
Package fslog provides an afero FS logging package
Package fslog provides an afero FS logging package
ftp
pkg
breader
Package breader provides a thread-safe reader that ensures full reads.
Package breader provides a thread-safe reader that ensures full reads.
bufcp
Package bufcp provides functions for copying data from a reader to a writer with explicit control over buffer size and flushing of buffered data after each write.
Package bufcp provides functions for copying data from a reader to a writer with explicit control over buffer size and flushing of buffered data after each write.
httprange
Package httprange provides a utility function for parsing HTTP Range headers.
Package httprange provides a utility function for parsing HTTP Range headers.
lreader
Package lreader provides a reader that limits the amount of data read from an underlying io.ReadCloser to a specified limit.
Package lreader provides a reader that limits the amount of data read from an underlying io.ReadCloser to a specified limit.
migrate
Package migrate provides a dead simple Go package for performing sql migrations using database/sql.
Package migrate provides a dead simple Go package for performing sql migrations using database/sql.
ns
validator
Package validator extends validator.Validate with regex and few other validation capabilities.
Package validator extends validator.Validate with regex and few other validation capabilities.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL