Metadata-Version: 2.4
Name: proxycraft
Version: 1.0.0
Summary: ⚡ High-performance Python proxy server with authentication, load balancing, caching, and multi-protocol support
Project-URL: homepage, https://github.com/sylvainmouquet/proxycraft
Project-URL: documentation, https://github.com/sylvainmouquet/proxycraft
Project-URL: repository, https://github.com/sylvainmouquet/proxycraft
Project-URL: changelog, https://github.com/sylvainmouquet/proxycraft/releases
Author-email: Sylvain Mouquet <sylvain.mouquet@gmail.com>
License: MIT
License-File: LICENSE
Keywords: authentication,http,https,load-balancing,networking,proxy,proxycraft,python,reverse-proxy,socks5,websocket
Classifier: Development Status :: 5 - Production/Stable
Classifier: Framework :: Pytest
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.13
Requires-Dist: aiofile>=3.9.0
Requires-Dist: aiofiles>=24.1.0
Requires-Dist: aiohttp>=3.11.18
Requires-Dist: antpathmatcher>=1.0.0
Requires-Dist: apscheduler>=3.11.0
Requires-Dist: curl-cffi>=0.11.2
Requires-Dist: granian>=2.3.3
Requires-Dist: gunicorn>=23.0.0
Requires-Dist: httpx>=0.28.1
Requires-Dist: hypercorn>=0.17.3
Requires-Dist: pydantic>=2.11.4
Requires-Dist: python-jose>=3.4.0
Requires-Dist: robyn>=0.68.0
Requires-Dist: starlette>=0.50
Requires-Dist: structlog>=25.3.0
Requires-Dist: uvicorn>=0.40
Requires-Dist: uvloop>=0.21.0
Description-Content-Type: text/markdown


<h1 align="center">
ProxyCraft
</h1>


<p align="center"><i>ProxyCraft is the easiest and quickest way to deploy a web proxy.</i></p>

****

<!-- Project Status Badges -->
![License](https://img.shields.io/badge/license-BSL-blue.svg)
![Python](https://img.shields.io/badge/python-3.13%2B-blue.svg)
![Build Status](https://img.shields.io/badge/build-passing-brightgreen.svg)
![Version](https://img.shields.io/badge/version-1.0.0-green.svg)

<!-- Technology Badges 
![FastAPI](https://img.shields.io/badge/FastAPI-005571?style=flat&logo=fastapi)
![Python](https://img.shields.io/badge/Python-3776AB?style=flat&logo=python&logoColor=white)
![Docker](https://img.shields.io/badge/Docker-2496ED?style=flat&logo=docker&logoColor=white)
![Asyncio](https://img.shields.io/badge/Asyncio-FFD43B?style=flat&logo=python&logoColor=blue)
-->
<!-- Protocol Support Badges -->
![HTTP](https://img.shields.io/badge/HTTP-✅-green)
![HTTPS](https://img.shields.io/badge/HTTPS-✅-green)
![WebSocket](https://img.shields.io/badge/WebSocket-✅-green)
![SOCKS5](https://img.shields.io/badge/SOCKS5-✅-green)
![TCP/UDP](https://img.shields.io/badge/TCP%2FUDP-✅-green)

<!-- Installation Badge 
![PyPI](https://img.shields.io/pypi/v/idum-proxy?logo=pypi&logoColor=white)
![Downloads](https://img.shields.io/pypi/dm/idum-proxy?logo=pypi&logoColor=white)
-->
<!-- Social Badges
![GitHub stars](https://img.shields.io/github/stars/idumhq/idum-proxy?style=social)
![GitHub forks](https://img.shields.io/github/forks/idumhq/idum-proxy?style=social)
![GitHub watchers](https://img.shields.io/github/watchers/idumhq/idum-proxy?style=social)
 -->
<!-- Custom Style Badges 
![Proxy](https://img.shields.io/badge/🌐_Proxy-Server-4F46E5?style=for-the-badge)
![Performance](https://img.shields.io/badge/⚡_High-Performance-10B981?style=for-the-badge)
![Security](https://img.shields.io/badge/🔒_Secure-Authentication-DC2626?style=for-the-badge)
-->

****

## ✨ Features

ProxyCraft offers many features:

- 🔒 Protocol Support: Handle HTTP, HTTPS, WebSockets, TCP/UDP, and SOCKS proxies
- 🔐 Authentication: Support for various auth methods (Basic, Digest, NTLM, Kerberos)
- 🔄 Connection Pooling: Efficient reuse of connections to improve performance
- ⚖️ Load Balancing: Distribute traffic across multiple proxies
- 🏥 Health Checking: Automatic detection and recovery from failed proxies
- 💾 Caching: Store and reuse responses for identical requests
- 🔄 Retry Mechanisms: Automatically retry failed requests
- 🔧 Circuit Breaking: Prevent cascading failures
- 📊 Metrics Collection: Track proxy performance, latency, error rates
- 🔐 TLS/SSL Termination: Handle encryption/decryption
- 🌍 IP Rotation: Change public IP addresses for scraping
- 🎯 Geo-targeting: Route requests through proxies in specific locations



## 🚀 Quick Start

## Installation

```bash
pip install proxycraft
```

Or with uv:

```bash
uv add proxycraft
```

### Basic Usage

```python
from proxycraft import ProxyCraft

if __name__ == "__main__":
    proxycraft: ProxyCraft = ProxyCraft(config_file='proxy.json')
    proxycraft.serve(host='0.0.0.0', port=8091)
```

📋 Configuration Example

```json

{
  "version": "1.0",
  "name": "Simple example",
  "endpoints": [
    {
      "prefix": "/",
      "match": "**/*",
      "backends": {
        "https": {
          "url": "https://jsonplaceholder.typicode.com/posts"
        }
      },
      "upstream": {
        "proxy": {
          "enabled": true
        }
      }
    }
  ]
}
```




## 🐳 Docker Usage


```bash
docker build -t proxycraft -f dockerfiles/proxycraft.Dockerfile .
docker run  -p 8080:8080 proxycraft
```

## 📄 License

[Business Source License 1.1](LICENSE)