Installation
# Install required dependencies
sudo apt update
sudo apt install -y python3 python3-pip ffmpeg
# Clone the repository
git clone https://github.com/vishalwaghela/mediaflow-proxy.git
cd mediaflow-proxy
# Install Python requirements
pip3 install -r requirements.txt
Configuration
# Edit the config file
nano config.ini
# Example configuration
[server]
host = 0.0.0.0
port = 5000
[proxy]
max_connections = 100
timeout = 30
buffer_size = 8192
[cache]
enable = true
size_limit = 1GB
expiry_time = 3600
Running the Proxy
# Start the proxy server
python3 proxy.py
# For production use with Gunicorn
gunicorn -w 4 -b 0.0.0.0:5000 proxy:app
Usage Examples
# Basic proxy request
http://your-server:5000/proxy?url=https://example.com/video.mp4
# With quality parameter
http://your-server:5000/proxy?url=https://example.com/video.mp4&quality=720p
# With format conversion
http://your-server:5000/proxy?url=https://example.com/video.mp4&format=webm
Security
# Set up authentication
[security]
enable_auth = true
api_key = your-secure-api-key
# Then use with requests:
http://your-server:5000/proxy?url=...&api_key=your-secure-api-key