Lampa Proxy Server
A high-performance proxy server specifically designed for video streaming applications, with enhanced support for Lampa player and similar media applications.
Features
🎬 Advanced Video Streaming
Smart Video Detection: Automatically detects video content using URL patterns and HEAD requests
Range Request Support: Full support for HTTP Range headers enabling seeking and rewinding in videos
Chunked Streaming: Efficient video delivery with configurable chunk sizes
Adaptive Timeouts: Extended timeouts for long video streams
🔒 Enhanced Security & Encoding
Multiple Encoding Schemes: Support for enc, enc1, enc2, and enc3 encoded requests
Base64 URL Decoding: Secure handling of encoded parameters and URLs
Header Propagation: Automatic forwarding of essential headers (Authorization, Cookies, etc.)
CORS Enabled: Cross-origin resource sharing for web applications
⚡ Performance Optimizations
Proxy Rotation: Automatic proxy rotation with health checking and failover
Connection Pooling: Efficient HTTP connection management
Configurable Timeouts: Fine-grained timeout control for different operations
Memory Management: Stream processing with minimal memory footprint
🔄 Protocol Support
HTTP/HTTPS: Full protocol support with automatic normalization
Protocol-Relative URLs: Support for //example.com style URLs
Redirect Handling: Automatic following of HTTP redirects with configurable limits
Multiple HTTP Methods: GET, POST, PUT, DELETE with proper body handling
Use Cases
🎥 Media Applications
Lampa TV Player: Enhanced compatibility and streaming performance
Video Streaming Apps: Reliable proxy layer for video content delivery
M3U8/HLS Streams: Specialized handling for HTTP Live Streaming
DASH Content: Support for Dynamic Adaptive Streaming over HTTP
🔧 Development & Testing
API Development: Proxy layer for API requests with encoding/decoding
Content Aggregation: Aggregate content from multiple sources through a single endpoint
Debugging & Monitoring: Detailed logging for request/response cycles
🌐 Cross-Platform Compatibility
Web Applications: CORS-enabled for browser-based apps
Mobile Apps: Lightweight proxy for mobile applications
Desktop Applications: Reliable backend for desktop media players
Key Benefits
For End Users
🚀 Faster Streaming: Optimized video delivery with seeking support
🔄 Seamless Playback: No interruptions with automatic retry mechanisms
🌐 Geo-Unblocking: Access content through proxy rotation
For Developers
🛠 Easy Integration: Simple API endpoints with encoded request support
📊 Comprehensive Logging: Detailed logs for debugging and monitoring
⚙️ Highly Configurable: Environment-based configuration system
🔧 Extensible Architecture: Modular design for custom enhancements
For Deployments
🐳 Docker Ready: Container-friendly configuration
☁️ Cloud Native: Stateless design for horizontal scaling
📈 Production Ready: Built-in health checks and status endpoints
Technical Highlights
Async Python: Built with FastAPI and httpx for high concurrency
Streaming First: Designed from ground up for media streaming
Proxy Management: Intelligent proxy selection and health monitoring
Range Header Processing: Advanced byte range calculation and handling
Content Type Detection: Multi-strategy approach for accurate media detection
This proxy server is specifically engineered to solve common challenges in media streaming applications, providing a robust, scalable, and feature-rich solution for modern video delivery needs.
https://github.com/Mirocow/lampatv-proxy