Secure Content Fetching & P2P Distribution
ProxyTorrent fetches content through isolated proxies or VPNs, packages it into private torrents, and seeds it via libtorrentโall exposed through a clean FastAPI REST interface.
Why ProxyTorrent?
Privacy First
All content fetching happens through your configured proxy or VPN, keeping your real IP hidden and ensuring privacy.
Efficient Distribution
Content is packaged into private BitTorrent files, enabling efficient P2P distribution with built-in seeding.
Modern API
Clean FastAPI REST interface with async processing, authentication, rate limiting, and comprehensive monitoring.
How It Works
Request
Client sends a fetch request to the REST API with target URL, method, headers, and optional authentication.
Fetch via Proxy
Background worker fetches content through configured SOCKS5/HTTP proxy or VPN, validating size and content type.
Package
Content is stored using content-addressable hashing and packaged into a private torrent file using libtorrent.
Seed
Built-in BitTorrent seeder starts distributing the content with encryption and configurable upload limits.
Deliver
Client retrieves the .torrent file or magnet link and downloads content via BitTorrent protocol.
Features
๐ Secure Fetching
Fetch content through configurable SOCKS5/HTTP proxies or VPN with SSL verification and size limits.
๐ฏ Private Torrents
Create private torrents with custom trackers, encryption, and content-addressable deduplication.
๐ Authentication
HMAC-SHA256 signature verification and Bearer token support for secure API access.
โฑ๏ธ Rate Limiting
Per-user and per-IP rate limits to prevent abuse and ensure fair resource allocation.
๐ Async Processing
Background task queue with worker pool for efficient concurrent request processing.
๐ณ Docker Ready
Fully containerized with docker-compose for easy deployment and VPN integration.
๐ Monitoring
Health checks, structured logging, and progress tracking for all fetch requests.
๐พ Smart Storage
Content-addressable storage with SHA256 hashing prevents duplication and ensures integrity.
Use Cases
Distributed Content Delivery
Fetch content once through proxy and distribute to multiple clients efficiently via BitTorrent.
Geo-Restricted Content
Access region-locked content through proxies while maintaining privacy and security.
Research & Archiving
Collect and preserve web content with verifiable integrity and efficient distribution.
Enterprise Caching
Cache external resources privately and distribute within your network via P2P.
Get Started
Quick Start with Docker
# Clone the repository
git clone https://github.com/NickScherbakov/proxytorrent.git
cd proxytorrent
# Start the service
docker-compose up -d
# Check health
curl http://localhost:8000/v1/health
Create Your First Request
# Create fetch request
curl -X POST http://localhost:8000/v1/requests \
-H "Content-Type: application/json" \
-d '{
"url": "http://example.com",
"method": "GET",
"ttl": 3600
}'
# Get request status
curl http://localhost:8000/v1/requests/{id}
# Download torrent file
curl http://localhost:8000/v1/requests/{id}/torrent -o file.torrent
Configuration
# Create .env file
SECURITY__AUTH_ENABLED=true
SECURITY__HMAC_SECRET=your-secret-key
# Proxy settings
PROXY__PROXY_ENABLED=true
PROXY__PROXY_TYPE=socks5
PROXY__PROXY_HOST=your-proxy-host
PROXY__PROXY_PORT=1080
# Storage
STORAGE__BASE_PATH=./data