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

๐Ÿ“š Documentation

README โ€ข Quick Start โ€ข Architecture โ€ข Deployment

๐Ÿ“– Russian Handbook

๐Ÿ’ป Examples

Python Client โ€ข Bash Script

Check the examples/ directory for more.