Proxy Shield 🛡️A High-Performance, Asynchronous AI Compliance Proxy.Proxy Shield allows you to inspect network traffic for compliance violations (e.g., sensitive data leaks) using an AI/Embedding model without slowing down the user.It uses a "Traffic Mirroring" architecture: traffic is instantly forwarded to a configured destination (zero latency), while a copy is sent asynchronously to an AI analyzer. If a violation is…
Source code on GitHub.
A High-Performance, Asynchronous AI Compliance Proxy.
Proxy Shield allows you to inspect network traffic for compliance violations (e.g., sensitive data leaks) using an AI/Embedding model without slowing down the user.
It uses a "Traffic Mirroring" architecture: traffic is instantly forwarded to a configured destination (zero latency), while a copy is sent asynchronously to an AI analyzer. If a violation is detected, the AI updates a shared Redis state to ban the offender's IP address temporarily.
[ Client ] ---> [ OpenResty (Nginx) ] --------------------> [ Configured Target ] | +---> (Mirror Copy) ---> [ AI Service ] | <--- (Ban Command) -----------+ (via Redis)
403 Forbidden.The proxy is configured at startup with a specific destination. All traffic will be forwarded to this target regardless of the original request's destination.
Set the TARGET_HOST environment variable in your .env file:
``bash
Example: Forward all traffic to an internal API server
TARGET_HOST=api.internal.example.com:443
🛠️ Tech Stack
* Proxy: OpenResty (Nginx + LuaJIT)
* State/Cache: Redis (Alpine)
* AI Service: Python (FastAPI + Uvicorn)
* Orchestration: Docker Compose
⚡ Quick Start
Prerequisites
* Docker & Docker ComposeConfiguration
- Copy
.env.example to .env:
`bash
cp .env.example .env
`- Edit
.env and set your target host:
`bash
TARGET_HOST=your-target-server:port
`Run the Stack
``bash
docker-compose up --build