DEV Community

gunxueqiu6
gunxueqiu6

Posted on

AI Privacy Gateway v2.0: 30-Second PII Firewall for Your AI Tools

AI Privacy Gateway — Install a Firewall for Your AI Data in 30 Seconds

Your prompts are leaking PII to AI APIs right now. Here is how to stop it.

The Wake-Up Call

Every time you paste code into Cursor, Claude Code, or ChatGPT, you might be sending phone numbers, API keys, emails, and ID cards to third-party servers. Your AI coding assistant does not know the difference between code and secrets — it sends everything.

AI Privacy Gateway sits between your AI client and the API, detecting and masking sensitive data BEFORE it leaves your machine.

How It Works

Your AI Client → [Privacy Gateway :9999] → Masked Data → OpenAI/DeepSeek/Anthropic
                     ↓
              Local Encrypted Vault
Enter fullscreen mode Exit fullscreen mode
  1. Intercept AI API requests in real-time (< 1ms latency)
  2. Detect 14+ PII types + 20+ API key formats
  3. Replace with typed placeholders: [PHONE_abc], [EMAIL_xyz]
  4. Forward masked request — provider NEVER sees raw data

30-Second Setup

docker run -d -p 9999:9999 ghcr.io/gunxueqiu6/ai-privacy-gateway:lite
# Point your AI client to http://localhost:9999 — done.
Enter fullscreen mode Exit fullscreen mode

Works transparently with: Cursor, Claude Code, VS Code, Cody, ChatGPT.

v2.0 New Features

  • AES-256-GCM vault encryption
  • Multi-upstream load balancer
  • Pub/sub audit event bus
  • Browser extension SDK (Chrome/Edge)
  • Windows/macOS installers

What Gets Protected

Type Example
Phone 13812345678[PII_PHONE_A]
ID Card 110101199001011234[PII_IDCARD_B]
Email user@example.com[PII_EMAIL_C]
API Keys sk-proj-..., ghp_..., AKIA... (20+ formats)
Bank Card 6222021234567890123[PII_BANK_D]

Open source (PolyForm Shield). Free for non-commercial use.

GitHub: https://github.com/gunxueqiu6/ai-privacy-gateway
Live Demo: https://privacygw.pages.dev/demo

Top comments (0)