⚡ High-performance Python proxy server with authentication, load balancing, caching, and multi-protocol support
Project description
ProxyCraft
ProxyCraft is the easiest and quickest way to deploy a web proxy.
✨ 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
pip install proxycraft
Or with uv:
uv add proxycraft
Basic Usage
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
{
"version": "1.0",
"name": "Simple example",
"endpoints": [
{
"prefix": "/",
"match": "**/*",
"backends": {
"https": {
"url": "https://jsonplaceholder.typicode.com/posts"
}
},
"upstream": {
"proxy": {
"enabled": true
}
}
}
]
}
🐳 Docker Usage
docker build -t proxycraft -f dockerfiles/proxycraft.Dockerfile .
docker run -p 8080:8080 proxycraft
📄 License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
proxycraft-1.0.2.tar.gz
(132.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file proxycraft-1.0.2.tar.gz.
File metadata
- Download URL: proxycraft-1.0.2.tar.gz
- Upload date:
- Size: 132.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
21b4da08a24b38d5f6b8c3e69b4b34c00d2223718577aefb9eb05123373baff9
|
|
| MD5 |
6db8110f953c1e1989cabade62a84d57
|
|
| BLAKE2b-256 |
a11a38542e03f088a26d400b361d4b5ee374fc73d47393c0e274f5c24eaf47ea
|
File details
Details for the file proxycraft-1.0.2-py3-none-any.whl.
File metadata
- Download URL: proxycraft-1.0.2-py3-none-any.whl
- Upload date:
- Size: 71.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b0a110175f78fd86a4922ff0b361607caf582ce61234fd8a141c801ce2e380b6
|
|
| MD5 |
9a4811a6577449f78b1537b624247152
|
|
| BLAKE2b-256 |
26dbdf9cb1ca7bee0a2abe00fd296f6730040ac2cbdca87235469d42f912b63f
|