Skip to content

Overview

Wheat Carrier edited this page Aug 31, 2023 · 1 revision

TGFS is a virtual filesystem based on Telegram. It takes advantage of the unlimited storage feature of Telegram, and builds an extra layer on top of it to describe a folder structure. Therefore it can provide similar functions like all other cloud file storage services (Google drive, Onedrive, etc.).

The main program is a Telegram client logged in as a user, exposing some APIs for creating, downloading, renaming and deleting files and folders. The files are stored in a private Telegram channel, so nobody can access them except the owner.

The folder structure is described by a metadata.json file, also stored in the channel, but as a pinned message. Editing the folder structure (creating/deleting/moving) results in an update of the pinned metadata.json file. As such, if more than one clients are modifying the folder structure concurrently, the changes made by any of them can be overwritten by any of them, resulting in information lost. However, there is no restriction on it. So users are expected to be careful when they have multiple clients writing into one channel. But writing into different channel with different clients should be safe (of course).

The program also provides some services to adapt to different clients. At present, it has a WebDAV server, so user can use any WebDAV clients to work with it. S3 server and NFS server are on the roadmap.

There is a monitoring service with a Web UI to let users know the status and progress of the upload/download tasks. It can also be a management console in the future.

Clone this wiki locally