Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,22 @@ Telegram Drive leverages the Telegram API to allow you to upload, organize, and
* **Drag & Drop**: Intuitive drag-and-drop upload and file management.
* **Thumbnail Previews**: Inline thumbnails for images and media files.
* **Folder Management**: Create "Folders" (private Telegram Channels) to organize content.
* **Optional Encrypted Vault**: Store files in an end-to-end encrypted vault backed by a private Telegram channel.
* **Privacy Focused**: API keys and data stay local. No third-party servers.
* **Cross-Platform**: Native apps for macOS (Intel/ARM), Windows, and Linux.

### Encrypted Vault Mode

Telegram Drive can also run in **Encrypted Vault** mode. After logging in, you can choose between the normal Saved Messages drive and a local-password-protected vault.

Vault files are encrypted on your device before upload using a key derived from your vault password. Telegram only receives encrypted vault blobs and encrypted manifest snapshots, stored in a private channel named `TelegramVault`. File names, folder records, and file contents are kept inside the encrypted vault manifest instead of being stored as normal Telegram channel folders.

Normal Drive remains the default path and keeps the existing Saved Messages/channel behavior unchanged. The first Vault Mode version stores vault configuration locally on the device where the vault was created, so fresh-device vault restore/import is not yet included. Keep your vault password safe; it is required to unlock encrypted files and cannot be recovered by the app.

| Storage Mode Selection | Vault Unlock |
|------------------------|--------------|
| ![Storage Mode Selection](screenshots/ModeSelection.png) | ![Vault Unlock](screenshots/VaultUnlock.png) |

## Screenshots

| Dashboard | File Preview |
Expand Down
146 changes: 144 additions & 2 deletions app/src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion app/src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,15 @@ log = "0.4"
env_logger = "0.11"
tauri-plugin-updater = "2.9.0"
actix-web = "4"
actix-files = "0.6"
actix-cors = "0.7"
futures = "0.3"
async-stream = "0.3"
actix-rt = "2"
tauri-plugin-process = "2.3.1"
rand = "0.8"

argon2 = "0.5"
chacha20poly1305 = "0.10"
zeroize = "1"
uuid = { version = "1", features = ["v4"] }
tempfile = "3"
16 changes: 9 additions & 7 deletions app/src-tauri/src/commands/mod.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use grammers_client::types::{LoginToken, PasswordToken};
use grammers_client::Client;
use std::sync::Arc;
use tokio::sync::Mutex;
use grammers_client::{Client};
use grammers_client::types::{LoginToken, PasswordToken};

/// Tracks the lifecycle of the Telegram connection
///
///
/// IMPORTANT: The `runner_shutdown` field is critical for preventing stack overflow.
/// When reconnecting, we MUST shutdown the old runner before spawning a new one.
/// Without this, runner tasks accumulate and exhaust the thread stack.
Expand All @@ -24,14 +24,16 @@ pub struct TelegramState {

pub mod auth;
pub mod fs;
pub mod preview;
pub mod utils;
pub mod network;
pub mod preview;
pub mod streaming;
pub mod utils;
pub mod vault;

pub use auth::*;
pub use fs::*;
pub use preview::*;
pub use utils::*;
pub use network::*;
pub use preview::*;
pub use streaming::*;
pub use utils::*;
pub use vault::*;
14 changes: 8 additions & 6 deletions app/src-tauri/src/commands/preview.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,13 +162,15 @@ pub async fn cmd_get_preview(
pub async fn cmd_clean_cache(
app_handle: tauri::AppHandle,
) -> Result<(), String> {
let cache_dir = app_handle
let base_cache_dir = app_handle
.path()
.app_cache_dir()
.map_err(|e: tauri::Error| e.to_string())?
.join("previews");
if cache_dir.exists() {
let _ = std::fs::remove_dir_all(cache_dir);
.map_err(|e: tauri::Error| e.to_string())?;
for child in ["previews", "vault"] {
let cache_dir = base_cache_dir.join(child);
if cache_dir.exists() {
let _ = std::fs::remove_dir_all(cache_dir);
}
}
Ok(())
}
Expand Down Expand Up @@ -271,4 +273,4 @@ pub async fn cmd_get_thumbnail(
}

Ok("".to_string())
}
}
Loading