How scarrymany/tg-manager works
TG Manager is a portable Windows desktop app for managing isolated Telegram account containers. The main workflow is to create or edit a container, store its metadata and proxy settings, then launch or stop Telegram in that container; users can also run cleanup or session export as background tasks. The WPF UI coordinates account state and task progress, while a separate Python worker handles tdata conversion and cleanup. The README documents several capabilities whose implementation details are not fully shown; those links are included only where documented or supported by the source index.
Main entry points: MainWindow.xaml.cs Main window · Launcher.cs Telegram launcher · worker.py Automation worker · WorkerHost.cs Worker host
Components 23
Desktop interface
- Main window
src/TGManager/Windows/MainWindow.xaml.cs - Account editor
src/TGManager/Windows/AccountWindow.xaml.cs - Cleanup dialog
src/TGManager/Windows/CleanupWindow.xaml.cs - Task log
src/TGManager/Windows/TaskLogWindow.xaml.cs - Account state
src/TGManager/ViewModels/AccountVm.cs - Task state
src/TGManager/ViewModels/TaskVm.cs
Accounts and launch
- Account store
src/TGManager/Services/Store.cs - Account models
src/TGManager/Services/Models.cs - Portable paths
src/TGManager/Services/Paths.cs - Proxy parser
src/TGManager/Services/ProxyParse.cs - Telegram launcher
src/TGManager/Services/Launcher.cs
Automation worker
- Worker host
src/TGManager/Services/WorkerHost.cs - Automation worker
tgmanager/automation/worker.py - Session lock
tgmanager/automation/lock.py - Session export
tgmanager/automation/export_session.py - Session pack
tgmanager/automation/session_pack.py
Platform services
- Process control
src/TGManager/Services/ProcessUtil.cs - HTTP proxy bridge
src/TGManager/Services/HttpBridge.cs
Other components
- User
- ProxyChains
- Telegram Desktop
- Container tdata
- Telegram service
Connections 28
- User → Main window: uses
README.md - Main window → Account store: loads and updates
src/TGManager/Windows/MainWindow.xaml.cs - Main window → Account state: updates
src/TGManager/Windows/MainWindow.xaml.cs - Main window → Account editor: opens
src/TGManager/Windows/MainWindow.xaml.cs - Account editor → Proxy parser: parses proxy
src/TGManager/Windows/AccountWindow.xaml.cs - Main window → Telegram launcher: starts and stops
src/TGManager/Windows/MainWindow.xaml.cs - Telegram launcher → Portable paths: resolves paths
src/TGManager/Services/Launcher.cs - Telegram launcher → HTTP proxy bridge: starts HTTP bridge
src/TGManager/Services/Launcher.cs - Telegram launcher → ProxyChains: launches through
README.md - ProxyChains → Telegram Desktop: wraps process
README.md - Telegram launcher → Telegram Desktop: launches isolated
README.md - Main window → Worker host: starts automation
src/TGManager/Windows/MainWindow.xaml.cs - Main window → Cleanup dialog: opens
src/TGManager/Windows/MainWindow.xaml.cs - Cleanup dialog → Worker host: configures task
src/TGManager/Windows/CleanupWindow.xaml.cs - Task state → Worker host: starts worker
src/TGManager/ViewModels/TaskVm.cs - Main window → Task state: tracks tasks
src/TGManager/Windows/MainWindow.xaml.cs - Task log → Task state: displays progress
src/TGManager/Windows/TaskLogWindow.xaml.cs - Worker host → Automation worker: starts process
README.md - Worker host → Portable paths: resolves workdir
src/TGManager/Services/WorkerHost.cs - Automation worker → Container tdata: reads and cleans
README.md - Automation worker → Session lock: uses session lock
tgmanager/automation/worker.py - Automation worker → Session export: dispatches export
tgmanager/automation/worker.py - Session export → Session pack: builds archive
tgmanager/automation/export_session.py - Session export → Container tdata: converts session
README.md - Automation worker → Telegram service: connects for actions
README.md - HTTP proxy bridge → Telegram service: forwards HTTP CONNECT
README.md - Process control → Telegram Desktop: terminates process
README.md - Account store → Portable paths: stores config at
src/TGManager/Services/Store.cs