⚡ 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.3.tar.gz
(132.2 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.3.tar.gz.
File metadata
- Download URL: proxycraft-1.0.3.tar.gz
- Upload date:
- Size: 132.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4686bac6796e33fe57feb74e5d8b2eb8e745b97f535d66235c6eca75fb5e2820
|
|
| MD5 |
6e60f5a3d995ee4c932620cb0bc80ab9
|
|
| BLAKE2b-256 |
11543bed23eef6528b708e36fd5c1d0d9d05dfc004441eb206a732b3f6ec3c61
|
File details
Details for the file proxycraft-1.0.3-py3-none-any.whl.
File metadata
- Download URL: proxycraft-1.0.3-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 |
c0739b05e9fa15d04af008cf933e8d51c84313d3d1a72a0074ecd9d445e6e7b0
|
|
| MD5 |
be6e317d3134ae16b62163f7f22ecee4
|
|
| BLAKE2b-256 |
62a2c465e21c1ead750b8ee4a798fc5a0bf2d04da4670cdf10272d85cc2e3452
|