Sign inSign up

shubhamsinghs2/codemask-proxy

By shubhamsinghs2

•Updated 3 months ago

A local privacy proxy for AI coding agents and LLM applications

Image
Security
API management
0

199

shubhamsinghs2/codemask-proxy repository overview

⁠CodeMask Proxy

A local privacy proxy for AI coding agents and LLM applications.

CodeMask Proxy sits between your AI coding agent and the LLM API. It detects sensitive values in outgoing requests, replaces them with reversible placeholders, forwards only the sanitized content to the LLM, and restores the original values in the response before returning it to the agent.

⁠How It Works

AI Coding Agent
      ↓
CodeMask detects and masks sensitive values
      ↓
LLM receives sanitized content
      ↓
LLM responds using placeholders
      ↓
CodeMask restores the original values
      ↓
Agent receives usable code

Example:

10.20.30.40 → {{IP_1}} → sent to LLM

LLM response:
Connect to {{IP_1}}

Restored response:
Connect to 10.20.30.40

⁠Features

  • Automatic sensitive-data detection and masking
  • Reversible placeholder restoration
  • Session-isolated secret mapping
  • OpenAI-compatible API proxying
  • Anthropic-compatible request support
  • Streaming response handling
  • Automatic session expiration and cleanup
  • Built-in monitoring dashboard
  • Health and session monitoring endpoints
  • Runs locally using Docker

⁠Quick Start

docker run -d \
  --name codemask-proxy \
  --restart unless-stopped \
  -p 8080:8080 \
  -e OPENAI_TARGET_URL=https://api.openai.com/v1 \
  shubhamsinghs2/codemask-proxy:latest

The proxy will be available at:

http://localhost:8080

Dashboard:

http://localhost:8080/dashboard

Configure your supported AI coding agent to use the local proxy URL instead of calling the LLM provider directly.

⁠Configuration

Common environment variables:

PORT=8080
OPENAI_TARGET_URL=https://api.openai.com/v1
ANTHROPIC_TARGET_URL=https://api.anthropic.com
SESSION_TTL_MINUTES=60
CLEANUP_INTERVAL_MIN=10
DISABLE_TLS_VERIFY=false

⁠Source Code & Documentation

GitHub: https://github.com/shubham-singhS2/codemask-proxy⁠

The GitHub repository contains complete setup instructions, supported providers, coding-agent configuration examples, testing steps, and project documentation.

CodeMask is a portfolio and learning project. It uses pattern-based detection and is not intended to replace enterprise DLP or secrets-management solutions.

Tag summary

Content type

Image

Digest

sha256:48a7fc6e2…

Size

50 MB

Last updated

3 months ago

docker pull shubhamsinghs2/codemask-proxy