How omgbox/rsd works
Main Components
a) Client Layer:
• Web Browsers
• Media Players
• Any HTTP-capable clients
b) Server Components:
• HTTP Server Module
• Torrent Client Module
• Stream Handler
• File Management System
c) External Components:
• BitTorrent Network
• Torrent Peers
[Client Layer]
• ↕
[Application Layer]
• ↕
[BitTorrent Network]
Component Details
• Port listener (default 8080)
• /stream endpoint handler
• Range request processor
• Magnet link processor
• Metadata fetcher
• Peer connection manager
• Video file identifier
• Content type detector
• Chunk manager
• Buffer manager
• Download directory manager
• Cleanup scheduler
• Storage monitor
Data Flow Indicators
Client → HTTP Server (/stream?magnet=...)
HTTP Server → Torrent Client (magnet link processing)
Torrent Client ↔ BitTorrent Network (peer connections)
Torrent Client → Stream Handler (video data)
Stream Handler → Client (HTTP streaming)
Technical Details
Notes about:
• HTTP range request support
• Video format support (.mp4, .mkv)
• Storage optimization
• Periodic cleanup process
Implementation Notes
• Command-line parameters (-port, -dir)
• Static binary compilation options
• Platform support (Linux/Windows/Mac)