Sign inSign up

ainvirion/aiproxyguard

By ainvirion

•Updated 4 months ago

LLM Security Proxy with Prompt Injection Detection

Image
Security
1

7.5K

ainvirion/aiproxyguard repository overview

⁠AIProxyGuard

Drop-in security layer for LLM applications. Intercepts requests to OpenAI, Anthropic, and other providers to block prompt injections before they reach the model.

⁠Why AIProxyGuard?

LLMs are vulnerable to adversarial inputs that bypass safety guardrails. AIProxyGuard acts as a reverse proxy, scanning every request in real-time and blocking:

  • Prompt injection ("ignore previous instructions...")
  • Jailbreak attempts (DAN, persona exploits)
  • Encoding bypasses (base64, hex, ROT13)
  • Delimiter attacks (JSON/XML injection)
  • Unicode evasion (homoglyphs, fullwidth)

⁠30-Second Setup

docker run -d -p 8080:8080 ainvirion/aiproxyguard:latest

Change your base URL from api.openai.com to localhost:8080 — that's it.

client = OpenAI(base_url="http://your-aiproxyguard:8080/openai/v1⁠")

⁠Features

  • Multi-Provider — OpenAI, Anthropic, OpenRouter, Ollama
  • Detection-Only Mode — /check endpoint for scanning without forwarding
  • ML + Signatures — Layered detection with low false positives
  • Policy Engine — Block, warn, or log per category
  • Metrics — Prometheus endpoint at /metrics
  • Multi-Arch — linux/amd64 and linux/arm64

Tag summary

Content type

Image

Digest

sha256:8b0fd1b66…

Size

178.4 MB

Last updated

4 months ago

docker pull ainvirion/aiproxyguard