⚡ 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.4.tar.gz
(137.3 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.4.tar.gz.
File metadata
- Download URL: proxycraft-1.0.4.tar.gz
- Upload date:
- Size: 137.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bce5504c0d07e5b1daea12457bebad5229578b2f48788157161f20d6a7080c2f
|
|
| MD5 |
c0e40fd0c4135738d93ba45070c429c4
|
|
| BLAKE2b-256 |
81975fa0f672633f59e469951fbe2e7656f1fe69486ba1a0df52493223172a6e
|
File details
Details for the file proxycraft-1.0.4-py3-none-any.whl.
File metadata
- Download URL: proxycraft-1.0.4-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 |
0563dd9a9046bdcfa4be0a3803308de5c25360726b20901c033121e69abe8a9b
|
|
| MD5 |
8ae4692bde23c50eed6c9cb84047d07d
|
|
| BLAKE2b-256 |
f2605d9e98f692c85ad324c3f987789d26bfddc4f3985669df0a5d993485c093
|