televault 0.1.0__py3-none-any.whl → 2.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- televault/__init__.py +1 -1
- televault/chunker.py +29 -27
- televault/cli.py +237 -90
- televault/compress.py +59 -23
- televault/config.py +16 -17
- televault/core.py +140 -203
- televault/crypto.py +26 -33
- televault/models.py +29 -30
- televault/telegram.py +136 -107
- televault/tui.py +632 -0
- televault-2.0.0.dist-info/METADATA +310 -0
- televault-2.0.0.dist-info/RECORD +14 -0
- {televault-0.1.0.dist-info → televault-2.0.0.dist-info}/entry_points.txt +1 -0
- televault-0.1.0.dist-info/METADATA +0 -242
- televault-0.1.0.dist-info/RECORD +0 -13
- {televault-0.1.0.dist-info → televault-2.0.0.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: televault
|
|
3
|
+
Version: 2.0.0
|
|
4
|
+
Summary: Unlimited cloud storage using Telegram MTProto. No local DB - everything on Telegram.
|
|
5
|
+
Project-URL: Homepage, https://github.com/YahyaToubali/televault
|
|
6
|
+
Project-URL: Repository, https://github.com/YahyaToubali/televault
|
|
7
|
+
Author-email: Yahya Toubali <contact@yahyatoubali.me>
|
|
8
|
+
License: MIT
|
|
9
|
+
Keywords: backup,cloud,mtproto,storage,telegram
|
|
10
|
+
Classifier: Development Status :: 3 - Alpha
|
|
11
|
+
Classifier: Environment :: Console
|
|
12
|
+
Classifier: Intended Audience :: End Users/Desktop
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Topic :: System :: Archiving :: Backup
|
|
18
|
+
Requires-Python: >=3.11
|
|
19
|
+
Requires-Dist: aiofiles>=23.2.0
|
|
20
|
+
Requires-Dist: blake3>=0.4.0
|
|
21
|
+
Requires-Dist: click>=8.1.0
|
|
22
|
+
Requires-Dist: cryptography>=42.0.0
|
|
23
|
+
Requires-Dist: rich>=13.7.0
|
|
24
|
+
Requires-Dist: telethon>=1.36.0
|
|
25
|
+
Requires-Dist: textual>=0.47.0
|
|
26
|
+
Requires-Dist: zstandard>=0.22.0
|
|
27
|
+
Provides-Extra: dev
|
|
28
|
+
Requires-Dist: mypy>=1.8.0; extra == 'dev'
|
|
29
|
+
Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
|
|
30
|
+
Requires-Dist: pytest>=8.0.0; extra == 'dev'
|
|
31
|
+
Requires-Dist: ruff>=0.2.0; extra == 'dev'
|
|
32
|
+
Description-Content-Type: text/markdown
|
|
33
|
+
|
|
34
|
+
# TeleVault
|
|
35
|
+
|
|
36
|
+
Unlimited cloud storage using your **own** Telegram account. No local database — everything lives in a private Telegram channel, encrypted on your machine before upload.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Install
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
pip install televault
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Python 3.11+ is recommended.
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Quick Start
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
# 1) Set up your Telegram API credentials (one-time setup)
|
|
54
|
+
export TELEGRAM_API_ID=your_api_id
|
|
55
|
+
export TELEGRAM_API_HASH=your_api_hash
|
|
56
|
+
|
|
57
|
+
# 2) Login with your Telegram account (MTProto, not bot API)
|
|
58
|
+
televault login
|
|
59
|
+
|
|
60
|
+
# 3) Set up storage channel (interactive)
|
|
61
|
+
televault setup
|
|
62
|
+
|
|
63
|
+
# 4) Upload
|
|
64
|
+
TELEVAULT_PASSWORD="strong-password" televault push /path/to/file
|
|
65
|
+
|
|
66
|
+
# 5) List & download
|
|
67
|
+
televault ls
|
|
68
|
+
TELEVAULT_PASSWORD="strong-password" televault pull <file_id_or_name>
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Basic commands:
|
|
72
|
+
|
|
73
|
+
- `televault login` – authenticate with Telegram
|
|
74
|
+
- `televault setup` – set up storage channel (interactive or CLI flags)
|
|
75
|
+
- `televault push` – upload files / folders (`-r` for recursive)
|
|
76
|
+
- `televault pull` – download by id or name
|
|
77
|
+
- `televault ls` – list files with size/chunks/encryption
|
|
78
|
+
- `televault search` – fuzzy search by name
|
|
79
|
+
- `televault status` – overall vault stats
|
|
80
|
+
- `televault whoami` – show current Telegram account
|
|
81
|
+
- `televault logout` – clear session
|
|
82
|
+
|
|
83
|
+
All commands check authentication first and will prompt you to run `televault login` if needed.
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## Interactive TUI
|
|
88
|
+
|
|
89
|
+
TeleVault includes a rich Terminal User Interface (TUI) for visual file management:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
# Launch the TUI
|
|
93
|
+
televault tui
|
|
94
|
+
# or
|
|
95
|
+
televault-tui
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### TUI Features:
|
|
99
|
+
|
|
100
|
+
- **📁 File Browser** – Browse all files with details (size, chunks, encryption status)
|
|
101
|
+
- **🔍 Search** – Real-time search through your files
|
|
102
|
+
- **📤 Upload** – Interactive file upload with password protection
|
|
103
|
+
- **📥 Download** – One-click file download
|
|
104
|
+
- **📊 Statistics** – View vault stats (total files, storage used)
|
|
105
|
+
- **⌨️ Keyboard Shortcuts**:
|
|
106
|
+
- `q` - Quit
|
|
107
|
+
- `r` - Refresh file list
|
|
108
|
+
- `u` - Upload file
|
|
109
|
+
- `d` - Download selected file
|
|
110
|
+
- `s` - Search files
|
|
111
|
+
- `l` - Login
|
|
112
|
+
- `Delete` - Delete selected file
|
|
113
|
+
- `Enter` - Download selected file
|
|
114
|
+
|
|
115
|
+
The TUI provides a more visual and interactive way to manage your vault compared to the CLI commands.
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## Storage Channel Setup
|
|
120
|
+
|
|
121
|
+
The `televault setup` command provides three ways to configure your storage:
|
|
122
|
+
|
|
123
|
+
### Interactive Mode (Recommended)
|
|
124
|
+
```bash
|
|
125
|
+
televault setup
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
You'll be prompted to choose:
|
|
129
|
+
```
|
|
130
|
+
TeleVault Storage Channel Setup
|
|
131
|
+
|
|
132
|
+
How would you like to set up your storage?
|
|
133
|
+
1. Create a new private channel (recommended)
|
|
134
|
+
2. Use an existing channel by ID
|
|
135
|
+
|
|
136
|
+
Enter your choice (1 or 2):
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### Non-Interactive Options
|
|
140
|
+
|
|
141
|
+
**Auto-create a new channel:**
|
|
142
|
+
```bash
|
|
143
|
+
televault setup --auto-create
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
**Use an existing channel:**
|
|
147
|
+
```bash
|
|
148
|
+
televault setup --channel-id -1001234567890
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
> **Note:** Channel IDs should start with `-100` (e.g., `-1001234567890`). Make sure the bot is a member of the channel if using an existing one.
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## Project Vision
|
|
156
|
+
|
|
157
|
+
TeleVault is not a SaaS. The goal is to give hackers and power users a **simple, encrypted off‑site backup tool** built on top of infrastructure they already use every day.
|
|
158
|
+
|
|
159
|
+
- **Turn Telegram into your personal encrypted blob store** instead of spinning up S3 buckets, servers, or dashboards.
|
|
160
|
+
- **Stay client‑side by design** – TeleVault handles chunking, indexing, and crypto; Telegram just stores opaque data.
|
|
161
|
+
- **Be as easy to adopt as `pip install` + `televault login`**, with no extra services to maintain.
|
|
162
|
+
- **Stay portable** – future tooling should make it easy to export / migrate data so you’re never locked into Telegram.
|
|
163
|
+
|
|
164
|
+
This should feel closer to `restic`/`borg` than a cloud app: a sharp, scriptable tool that respects your threat model.
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
## Features
|
|
169
|
+
|
|
170
|
+
- **MTProto direct** – Uses Telethon + MTProto (no bot API limits)
|
|
171
|
+
- **Encrypted-by-default** – Client-side AES‑256‑GCM, password-derived keys
|
|
172
|
+
- **Zero local DB** – Metadata index is stored on Telegram itself
|
|
173
|
+
- **Chunked uploads** – Large files split into chunks (up to Telegram's per-file limit)
|
|
174
|
+
- **Resumable transfers** – Can continue interrupted uploads/downloads
|
|
175
|
+
- **Folder support** – Upload directories while preserving structure
|
|
176
|
+
- **Rich CLI** – Progress bars, colored output, and helpful error messages
|
|
177
|
+
- **Interactive TUI** – Full terminal UI with file browser, search, and management
|
|
178
|
+
- **Interactive setup** – Choose between creating new channel or using existing one
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## Security Model
|
|
183
|
+
|
|
184
|
+
TeleVault is designed so that Telegram sees only encrypted blobs and JSON metadata; your password never leaves your machine.
|
|
185
|
+
|
|
186
|
+
- **Encryption**
|
|
187
|
+
- Files are optionally compressed and then encrypted with **AES‑256‑GCM**.
|
|
188
|
+
- Keys are derived from your password using **scrypt** (memory‑hard KDF).
|
|
189
|
+
- Encryption happens **before** data is sent to Telegram.
|
|
190
|
+
|
|
191
|
+
- **Indexing & Metadata**
|
|
192
|
+
- Each file has a small JSON metadata message (size, name, chunk ids, hash).
|
|
193
|
+
- A pinned "index" message in your channel maps file IDs → Telegram message IDs.
|
|
194
|
+
- No external database or server is required.
|
|
195
|
+
|
|
196
|
+
- **Sessions & Accounts**
|
|
197
|
+
- TeleVault authenticates using a standard Telethon session file.
|
|
198
|
+
- That session lives in your config directory (see below) and is not uploaded.
|
|
199
|
+
|
|
200
|
+
- **Threat Model (summary)**
|
|
201
|
+
- If someone gets access to your Telegram account **and** your password, they can read your data.
|
|
202
|
+
- If they only get Telegram’s servers or just the channel history, they only see encrypted chunks + metadata.
|
|
203
|
+
|
|
204
|
+
> Important: **Don’t lose your password.** There is no recovery if you forget it and have encryption enabled.
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
|
|
208
|
+
## Configuration
|
|
209
|
+
|
|
210
|
+
Configuration is stored under:
|
|
211
|
+
|
|
212
|
+
```text
|
|
213
|
+
~/.config/televault/config.json
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
Example:
|
|
217
|
+
|
|
218
|
+
```json
|
|
219
|
+
{
|
|
220
|
+
"channel_id": -1003652003243,
|
|
221
|
+
"chunk_size": 104857600,
|
|
222
|
+
"compression": true,
|
|
223
|
+
"encryption": true,
|
|
224
|
+
"parallel_uploads": 3,
|
|
225
|
+
"parallel_downloads": 5,
|
|
226
|
+
"max_retries": 3,
|
|
227
|
+
"retry_delay": 1.0
|
|
228
|
+
}
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
You can override encryption on a per-command basis:
|
|
232
|
+
|
|
233
|
+
```bash
|
|
234
|
+
# disable encryption for this upload only
|
|
235
|
+
televault push movie.mkv --no-encrypt
|
|
236
|
+
|
|
237
|
+
# disable compression
|
|
238
|
+
televault push backup.tar --no-compress
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
The default password can also be set via environment variable:
|
|
242
|
+
|
|
243
|
+
```bash
|
|
244
|
+
export TELEVAULT_PASSWORD="strong-password"
|
|
245
|
+
televault push secrets.zip
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
---
|
|
249
|
+
|
|
250
|
+
## From Source (dev)
|
|
251
|
+
|
|
252
|
+
```bash
|
|
253
|
+
git clone https://github.com/YahyaToubali/televault.git
|
|
254
|
+
cd televault
|
|
255
|
+
|
|
256
|
+
# create an isolated env (recommended)
|
|
257
|
+
python -m venv .venv
|
|
258
|
+
source .venv/bin/activate
|
|
259
|
+
|
|
260
|
+
pip install -e .[dev]
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
Run tests:
|
|
264
|
+
|
|
265
|
+
```bash
|
|
266
|
+
pytest
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
---
|
|
270
|
+
|
|
271
|
+
## Roadmap (early ideas)
|
|
272
|
+
|
|
273
|
+
This is intentionally small for now; priorities will change as you use it.
|
|
274
|
+
|
|
275
|
+
- **Snapshots & versioning**
|
|
276
|
+
- `televault snapshot ~/Projects` with named snapshots and retention rules.
|
|
277
|
+
- Simple policies like "keep daily snapshots for 7 days, weekly for 4 weeks".
|
|
278
|
+
- **Smarter TUI**
|
|
279
|
+
- Better file browser, filters (by size/date/encrypted), and batch actions.
|
|
280
|
+
- **Scheduling helpers**
|
|
281
|
+
- Tiny helper commands or docs for cron/systemd timers ("backup this folder nightly").
|
|
282
|
+
- **Export / migrate tooling**
|
|
283
|
+
- One‑shot export from Telegram → local disk or other storage (S3, filesystem, etc.).
|
|
284
|
+
- **Multi‑vault support**
|
|
285
|
+
- Multiple channels as separate vaults (e.g. `personal`, `work`, `archives`).
|
|
286
|
+
|
|
287
|
+
If you’re reading this on GitHub and want to use TeleVault seriously, open an issue with your use case so priorities can be adjusted.
|
|
288
|
+
|
|
289
|
+
---
|
|
290
|
+
|
|
291
|
+
## Requirements
|
|
292
|
+
|
|
293
|
+
- Telegram account + API credentials from [my.telegram.org](https://my.telegram.org)
|
|
294
|
+
- Create an app to get your `api_id` and `api_hash`
|
|
295
|
+
- Set them as environment variables:
|
|
296
|
+
```bash
|
|
297
|
+
export TELEGRAM_API_ID=your_api_id
|
|
298
|
+
export TELEGRAM_API_HASH=your_api_hash
|
|
299
|
+
```
|
|
300
|
+
- Python 3.11 or newer
|
|
301
|
+
|
|
302
|
+
> **Tip:** Add the export lines to your `~/.bashrc`, `~/.zshrc`, or `~/.profile` to make them persistent.
|
|
303
|
+
|
|
304
|
+
---
|
|
305
|
+
|
|
306
|
+
## License
|
|
307
|
+
|
|
308
|
+
MIT
|
|
309
|
+
|
|
310
|
+
Author: **Yahya Toubali** · [@yahyatoubali](https://github.com/YahyaToubali)
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
televault/__init__.py,sha256=5FWvjEWaQFqBjp918-NB6gwpKzoDl_rUpGfB8w4zRQc,406
|
|
2
|
+
televault/chunker.py,sha256=ykoElL8V7cr9zbqqX8a9QNlVMTRXe5zeuZeqdcYIMZk,5270
|
|
3
|
+
televault/cli.py,sha256=KbnCAcZ7ZgxXagSmdhdYgO-2w2RDSagyjw-EcKgM0cQ,19947
|
|
4
|
+
televault/compress.py,sha256=-exX39XzW3iRKBS24PvB3SlpJbRZMmd_IP9irqeMpV8,4635
|
|
5
|
+
televault/config.py,sha256=718lMMHscVi0b5WHs6NcU8vvHP1RVr5y9xhWyvXMp1c,2055
|
|
6
|
+
televault/core.py,sha256=TIOyswESUEhxsnf24byxVXCsWYcE9eKjrFTsan4yd8c,13741
|
|
7
|
+
televault/crypto.py,sha256=0e2SBje5Zgcwooe8yDC0SzXurOs0qbQUXwepKX51JpQ,5074
|
|
8
|
+
televault/models.py,sha256=vDR7K1OcxWVm3PNbDr6N_E0VYa5V4MvfBEy7a2qqKW4,4586
|
|
9
|
+
televault/telegram.py,sha256=tlUCe84uvN4gENCXM8H7Q34HVNvPhAoYXziSGgq4iOI,12548
|
|
10
|
+
televault/tui.py,sha256=ETiwM2nXzVkdjBRb3rkCzxlfZ7eoKljkJ23Qvf3x__o,20833
|
|
11
|
+
televault-2.0.0.dist-info/METADATA,sha256=Y2EA99uQQr4wGJ3BKJZsOMKUnIlipxk8ujtnVFI7UTA,9287
|
|
12
|
+
televault-2.0.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
13
|
+
televault-2.0.0.dist-info/entry_points.txt,sha256=2zZbEnZlRFqTjjUV9R-Rnng6YMlQzL1JlqYry95R8Qc,111
|
|
14
|
+
televault-2.0.0.dist-info/RECORD,,
|
|
@@ -1,242 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: televault
|
|
3
|
-
Version: 0.1.0
|
|
4
|
-
Summary: Unlimited cloud storage using Telegram MTProto. No local DB - everything on Telegram.
|
|
5
|
-
Project-URL: Homepage, https://github.com/YahyaToubali/televault
|
|
6
|
-
Project-URL: Repository, https://github.com/YahyaToubali/televault
|
|
7
|
-
Author-email: Yahya Toubali <contact@yahyatoubali.me>
|
|
8
|
-
License: MIT
|
|
9
|
-
Keywords: backup,cloud,mtproto,storage,telegram
|
|
10
|
-
Classifier: Development Status :: 3 - Alpha
|
|
11
|
-
Classifier: Environment :: Console
|
|
12
|
-
Classifier: Intended Audience :: End Users/Desktop
|
|
13
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
-
Classifier: Operating System :: OS Independent
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
-
Classifier: Topic :: System :: Archiving :: Backup
|
|
18
|
-
Requires-Python: >=3.11
|
|
19
|
-
Requires-Dist: aiofiles>=23.2.0
|
|
20
|
-
Requires-Dist: blake3>=0.4.0
|
|
21
|
-
Requires-Dist: click>=8.1.0
|
|
22
|
-
Requires-Dist: cryptography>=42.0.0
|
|
23
|
-
Requires-Dist: rich>=13.7.0
|
|
24
|
-
Requires-Dist: telethon>=1.36.0
|
|
25
|
-
Requires-Dist: textual>=0.47.0
|
|
26
|
-
Requires-Dist: zstandard>=0.22.0
|
|
27
|
-
Provides-Extra: dev
|
|
28
|
-
Requires-Dist: mypy>=1.8.0; extra == 'dev'
|
|
29
|
-
Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
|
|
30
|
-
Requires-Dist: pytest>=8.0.0; extra == 'dev'
|
|
31
|
-
Requires-Dist: ruff>=0.2.0; extra == 'dev'
|
|
32
|
-
Description-Content-Type: text/markdown
|
|
33
|
-
|
|
34
|
-
# TeleVault
|
|
35
|
-
|
|
36
|
-
Unlimited cloud storage using Telegram MTProto. No local database — everything lives on Telegram.
|
|
37
|
-
|
|
38
|
-
## Features
|
|
39
|
-
|
|
40
|
-
- **MTProto Direct** — No bot API limits, 2GB file support
|
|
41
|
-
- **Zero Local DB** — Metadata stored on Telegram itself
|
|
42
|
-
- **Client-Side Encryption** — AES-256-GCM before upload
|
|
43
|
-
- **Smart Chunking** — Large files split automatically
|
|
44
|
-
- **Parallel Processing** — Faster uploads/downloads
|
|
45
|
-
- **Folder Support** — Preserve directory structure
|
|
46
|
-
- **Resume Capability** - Continue interrupted transfers
|
|
47
|
-
- **TUI + CLI** - Beautiful terminal interface
|
|
48
|
-
|
|
49
|
-
## Install
|
|
50
|
-
|
|
51
|
-
```bash
|
|
52
|
-
pip install televault
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
Or from source:
|
|
56
|
-
|
|
57
|
-
```bash
|
|
58
|
-
git clone https://github.com/YahyaToubali/televault
|
|
59
|
-
cd televault
|
|
60
|
-
pip install -e .".
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
## Quick Start
|
|
64
|
-
|
|
65
|
-
```bash
|
|
66
|
-
# First time: authenticate with Telegram
|
|
67
|
-
televault login
|
|
68
|
-
|
|
69
|
-
# Upload a file
|
|
70
|
-
televault push backup.tar.gz
|
|
71
|
-
|
|
72
|
-
# Upload a directory
|
|
73
|
-
televault push ~/Documents/ -r --no-encrypt
|
|
74
|
-
|
|
75
|
-
# List files
|
|
76
|
-
televault ls
|
|
77
|
-
|
|
78
|
-
# Download
|
|
79
|
-
televault pull backup.tar.gz
|
|
80
|
-
|
|
81
|
-
# Interactive TUI
|
|
82
|
-
televault
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
## How It Works
|
|
86
|
-
|
|
87
|
-
```
|
|
88
|
-
Your File
|
|
89
|
-
↓
|
|
90
|
-
[Compress] → zstd (optional, skips media)
|
|
91
|
-
↓
|
|
92
|
-
[Encrypt] → AES-256-GCM with Scrypt key derivation
|
|
93
|
-
↓
|
|
94
|
-
[Chunk] → Split into ≤2GB pieces
|
|
95
|
-
↓
|
|
96
|
-
[Upload] → MTProto to your private channel
|
|
97
|
-
↓
|
|
98
|
-
[Index] → Metadata stored as pinned message
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
### Channel Structure
|
|
102
|
-
|
|
103
|
-
```
|
|
104
|
-
📌 INDEX (pinned)
|
|
105
|
-
│ └── {"files": {"id1": msg_id, "id2": msg_id, ...}}
|
|
106
|
-
│
|
|
107
|
-
├── 📄 Metadata Message (JSON)
|
|
108
|
-
│ └── {"name": "file.zip", "size": 5GB, "chunks": [...]}
|
|
109
|
-
│
|
|
110
|
-
└── 📦 Chunk Messages (reply to metadata)
|
|
111
|
-
└── file_id_001.chunk, file_id_002.chunk, ...
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
## Commands
|
|
115
|
-
|
|
116
|
-
| Command | Description |
|
|
117
|
-
|---------|-------------|
|
|
118
|
-
| `televault login` | Authenticate with Telegram |
|
|
119
|
-
| `televault logout` | Clear session |
|
|
120
|
-
| `televault push <file>` | Upload file (or directory with -r) |
|
|
121
|
-
| `televault pull <file>` | Download file |
|
|
122
|
-
| `televault ls` | List all files |
|
|
123
|
-
| `televault search <query>` | Search files by name |
|
|
124
|
-
| `televault rm <file>` | Delete file |
|
|
125
|
-
| `televault info <file>` | Show file details |
|
|
126
|
-
| `televault status` | Show vault status |
|
|
127
|
-
| `televault whoami` | Show current Telegram account |
|
|
128
|
-
| `televault` | Launch TUI |
|
|
129
|
-
|
|
130
|
-
## Configuration
|
|
131
|
-
|
|
132
|
-
Config stored at `~/.config/televault/config.json`:
|
|
133
|
-
|
|
134
|
-
```json
|
|
135
|
-
{
|
|
136
|
-
"channel_id": -1003652003243,
|
|
137
|
-
"chunk_size": 104857600,
|
|
138
|
-
"compression": true,
|
|
139
|
-
"encryption": true,
|
|
140
|
-
"parallel_uploads": 3,
|
|
141
|
-
"parallel_downloads": 5,
|
|
142
|
-
"max_retries": 3,
|
|
143
|
-
"retry_delay": 1.0
|
|
144
|
-
}
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
## Security
|
|
148
|
-
|
|
149
|
-
- **Encryption**: AES-256-GCM (authenticated encryption)
|
|
150
|
-
- **Key Derivation**: Scrypt (memory-hard, GPU-resistant)
|
|
151
|
-
- **Session**: Telegram MTProto session stored encrypted
|
|
152
|
-
- **Zero Knowledge**: Server never sees unencrypted data
|
|
153
|
-
- **MTProto**: Direct Telegram protocol (no bot API limits)
|
|
154
|
-
|
|
155
|
-
## Prerequisites
|
|
156
|
-
|
|
157
|
-
- Telegram API credentials (get at [my.telegram.org](https://my.telegram.org))
|
|
158
|
-
- Telegram account
|
|
159
|
-
- Python 3.11+
|
|
160
|
-
|
|
161
|
-
## Installation
|
|
162
|
-
|
|
163
|
-
### From PyPI
|
|
164
|
-
|
|
165
|
-
```bash
|
|
166
|
-
pip install televault
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
### From Source
|
|
170
|
-
|
|
171
|
-
```bash
|
|
172
|
-
git clone https://github.com/YahyaToubali/televault
|
|
173
|
-
cd televault
|
|
174
|
-
pip install -e .".
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
## Setup
|
|
178
|
-
|
|
179
|
-
```bash
|
|
180
|
-
# Authenticate with Telegram
|
|
181
|
-
televault login
|
|
182
|
-
|
|
183
|
-
# Set up storage channel
|
|
184
|
-
televault setup
|
|
185
|
-
|
|
186
|
-
# Upload your first file
|
|
187
|
-
televault push hello.txt
|
|
188
|
-
```
|
|
189
|
-
|
|
190
|
-
## Usage Examples
|
|
191
|
-
|
|
192
|
-
### Upload a file
|
|
193
|
-
```bash
|
|
194
|
-
televault push backup.tar.gz --password mysecret
|
|
195
|
-
```
|
|
196
|
-
|
|
197
|
-
### Upload a directory
|
|
198
|
-
```bash
|
|
199
|
-
televault push ~/Documents/ -r --no-encrypt
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
### Download a file
|
|
203
|
-
```bash
|
|
204
|
-
televault pull backup.tar.gz --password mysecret
|
|
205
|
-
```
|
|
206
|
-
|
|
207
|
-
### List files
|
|
208
|
-
```bash
|
|
209
|
-
televault ls --sort=size
|
|
210
|
-
```
|
|
211
|
-
|
|
212
|
-
### Search files
|
|
213
|
-
```bash
|
|
214
|
-
televault search "*.sql"
|
|
215
|
-
```
|
|
216
|
-
|
|
217
|
-
## TUI
|
|
218
|
-
|
|
219
|
-
Launch the interactive terminal interface:
|
|
220
|
-
|
|
221
|
-
```bash
|
|
222
|
-
televault
|
|
223
|
-
```
|
|
224
|
-
|
|
225
|
-
Controls:
|
|
226
|
-
- `r` = Refresh
|
|
227
|
-
- `u` = Upload
|
|
228
|
-
- `d` = Download selected
|
|
229
|
-
- `q` = Quit
|
|
230
|
-
- Arrow keys to navigate
|
|
231
|
-
|
|
232
|
-
## License
|
|
233
|
-
|
|
234
|
-
MIT
|
|
235
|
-
|
|
236
|
-
## Author
|
|
237
|
-
|
|
238
|
-
Yahya Toubali - [@yahyatoubali](https://github.com/YahyaToubali)
|
|
239
|
-
|
|
240
|
-
---
|
|
241
|
-
|
|
242
|
-
Built with ❤️ using Python, Telethon, and Textual
|
televault-0.1.0.dist-info/RECORD
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
televault/__init__.py,sha256=rMVzSux5x0gb1u6Vede5MgTgNu-nBOgOtIat5Q_gGRU,405
|
|
2
|
-
televault/chunker.py,sha256=Hqh8dptBRlO8DdwEOgS0mXF0NJhZMYG9alF6oCrHkg4,5387
|
|
3
|
-
televault/cli.py,sha256=jBldMotU27yiP21GlkGxUUXjib8JbL0ixPS3rsU3-Vw,15815
|
|
4
|
-
televault/compress.py,sha256=WNuR7in1sWIK7vtJ3fciJr7YLQlymcRd_hySzl_28aI,4578
|
|
5
|
-
televault/config.py,sha256=-w-VQ7tyJ1LB6RHjmgvllnaWh4anORE1ukSRA9gVIv4,2157
|
|
6
|
-
televault/core.py,sha256=siDoxvN8ftnXhmbLGpO3J94pBhtXSqUiCD8dDddWCQ8,16723
|
|
7
|
-
televault/crypto.py,sha256=cYygPj4X_Tq3jTSDJM1KzVyL69KW8r18pUvyq7JInL0,5267
|
|
8
|
-
televault/models.py,sha256=NduoXIyY-n7nqQ4VLorxC9IuoNVPWZhoDuccJM_epxE,4717
|
|
9
|
-
televault/telegram.py,sha256=ShAGx8xBK2tcGGl9-eXuerYlgPfE8JFSecGJLQHoVLk,12023
|
|
10
|
-
televault-0.1.0.dist-info/METADATA,sha256=Djst_CPh0rbCzkUASu3D47SbKT0uFignCLATaIZA1D8,5299
|
|
11
|
-
televault-0.1.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
12
|
-
televault-0.1.0.dist-info/entry_points.txt,sha256=9bmq5Yu2HkyF9XVs-O4ydox-Skug2xI-aWeN9o52k8I,73
|
|
13
|
-
televault-0.1.0.dist-info/RECORD,,
|
|
File without changes
|