Skip to content

feat(cloud): add Telegram Cloud Storage backend and integration - #3

Closed
ash-iir wants to merge 13 commits into
VD171:mainfrom
ash-iir:feature/telegram-cloud-storage
Closed

ash-iir wants to merge 13 commits into
VD171:mainfrom
ash-iir:feature/telegram-cloud-storage

Conversation

@ash-iir

@ash-iir ash-iir commented Nov 8, 2026 •

Copy link
Copy Markdown

Summary

This pull request introduces native Telegram Cloud Storage as an unlimited cloud destination backend for VD-Backup, using MTProto (Telethon) with dedicated private storage channels.

Key Features & Enhancements

  • Telegram MTProto Client Backend:

    • Automated session management using Telethon SQLiteSession.
    • Multi-part direct chunked uploads/downloads bypassing standard bot size limits (supports archives up to 2GB, or 4GB with Telegram Premium).
    • Encrypted stream integrity and automated backup metadata indexing.
    • Randomized Channel Naming & Detection: Generates randomized, privacy-preserving channel titles (e.g. Cat_meow_VDB, 17788821_VDB, ISJWBI-VDB) with trailing VDB tag.
    • Existing Storage Channel Auto-Detection: Automatically identifies existing channels with the VDB suffix (and backward-compatible VD_Backup_*) upon login or storage initialization, preventing CreateChannelRequest spamreport restrictions.
    • Phone Format Normalization: Accepts international phone inputs in any standard format (e.g. +1 (672) 285-7086).
  • Dynamic WebUI Integration:

    • Cleanly integrated into VD-Backup's original WebUI layout without altering existing theme or styling.
    • Telegram Status Card on the Destinations tab is hidden by default and dynamically appears on top only when authenticated (isAuth == true).
    • Added "Telegram (unlimited storage)" entry to destination options.
    • Integrated interactive authentication modal (Phone number -> Login Code -> 2FA Password).
    • Fixed localization key ui_back on OTP verification screen.
  • Performance & System Improvements:

    • Instant App Loading (Stale-While-Revalidate): Added SWR caching and document fragment batching to render app lists instantaneously (<15ms) while fresh package manager scans run in the background.
    • DEX Path Dual Fallback: Supports both etc/vdbackup_helper.dex and vdbhelper.dex for helper tool execution across versions.
    • Excluded Apps Picker: Displays all installed packages with real-time search filtering.
    • Merged upstream v1.03.2 release changes.

Verification & Testing

  • Tested end-to-end on live Android 14 / Magisk device.
  • Verified authentication, channel auto-detection, phone number formatting, and app list loading performance.

VD171 Contributor added 8 commits November 8, 2026 02:21
- MTProto authentication via official client API ID (no bot tokens or custom secrets)
- Phone number verification + Telegram OTP (+ 2FA password support)
- Automatic private backup channel creation (VD_Backup_<hex>) with safety warning
- Telegram Cloud upload, listing, download and restore support
- Fully vendored pure-Python MTProto client stack (telethon, pyaes, rsa, pyasn1)
- Modern WebUI modal for linking and browsing Telegram cloud backups
…storage in add destination, and fix excluded apps picker
@ash-iir

ash-iir commented Nov 8, 2026

Copy link
Copy Markdown
Author

Closing PR temporarily for further debugging and fixes.

@ash-iir ash-iir closed this Nov 8, 2026
@ash-iir ash-iir reopened this Nov 8, 2026
@ash-iir

ash-iir commented Nov 8, 2026

Copy link
Copy Markdown
Author

All issues have been thoroughly resolved and tested on a live device:

  • Instant App Loading (SWR): Implemented Stale-While-Revalidate caching for app package listing to eliminate UI loading delays and freezing.
  • Smart Channel Auto-Detection: Automatically detects existing storage channels (ending with VDB) to prevent Telegram CreateChannelRequest spamreport errors.
  • Randomized Channel Naming: Generated discrete channel names ending with VDB (Cat_meow_VDB, 17788821_VDB, ISJWBI-VDB).
  • Flexible Phone Normalization: Accepts all international phone number formats (e.g. +1 (672) 285-7086).
  • UI Localization: Resolved missing ui_back string on OTP screen and preserved original WebUI styling.

Reopened and ready for review!

@ash-iir ash-iir closed this Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant