An intelligent MITM proxy tool implemented in Go, designed for AI developers to intercept, modify, and adapt complex LLM API requests (supporting OpenAI Responses API transformation).
- 🔒 HTTPS MITM Support - Automatically intercept and decrypt HTTPS traffic.
- 🤖 AI Protocol Adaptation - Exclusive support for automatically converting OpenAI's latest
Responses API(/v1/responses) to the standardChat Completions API. - 🛠️ Tool Call Transformation - Automatically wrap Responses API built-in tools (e.g.,
web_search) into standardfunction_callformat, ensuring compatibility with all upstream providers (e.g., DeepSeek, SiliconFlow). - 🌊 Streaming Protocol Enhancement - Automatically complete complex streaming event sequences (
created->added->delta->done->completed), ensuring perfect compatibility with Codex and OpenAI SDKs. - 🎯 URL Matching - Supports both regex and string matching.
- ✏️ Header Overwriting - Flexible modification of headers like User-Agent, Authorization, etc.
- 🔄 Upstream Proxy - Supports forwarding to HTTP/SOCKS proxies (e.g., Clash).
- 🎲 Random Port - Automatically assigns available ports to avoid conflicts.
- 🔐 Process Isolation - Only proxies the started subprocess, not affecting the rest of the system.
- 💻 Interactive App Support - Supports interactive programs like vim, bash, python, etc.
- 📝 Detailed Logging - Provides detailed traffic logs and plugin execution records for debugging.
Install with Go:
go install github.com/daydaychen/devproxy@latestBuild from source:
git clone https://github.com/daydaychen/devproxy.git
cd devproxy
make build
./devproxy --helpdevproxy [flags] -- <command> [args...]If you are using tools that support the new Responses API (like Codex) but want to connect to an upstream that only supports standard Chat Completions (like DeepSeek), use this plugin:
rules:
- name: "adapter-to-deepseek"
match: ["https://api.openai.com/v1/responses"]
plugins:
- "responses-api" # Automatically handles bi-directional conversion
overwrite:
Authorization: "Bearer your-deepseek-key"Features:
- Converts
input_texttotext. - Wraps built-in tool
web_searchinto function calls. - Fixes
additionalPropertiesvalidation issues for various providers. - Completes all required events in the streaming response to prevent client disconnects.
For models (like Minimax, DeepSeek) that return non-standard JSON arrays in content when using CoT or tool calls, this plugin flattens them to strings for Codex compatibility:
rules:
- name: "fix-codex-content"
match: ["/chat/completions"]
plugins:
- "codex-fix" # Flattens content: [{type: "text", text: "..."}] to stringrules:
- name: "github-api"
match: ["github.com"]
overwrite:
Authorization: "token your-token"
User-Agent: "GithubBot"| Flag | Short | Description | Example |
|---|---|---|---|
--config |
-c |
Config file path (YAML) | --config config.yaml |
--match |
- | URL matching rule (can be multiple) | --match "domain.com/api" |
--overwrite |
- | Header overwrite (format: header=value) |
--overwrite ua=Bot |
--upstream |
- | Upstream proxy address | --upstream http://127.0.0.1:7890 |
--port |
- | Specify proxy port (default random) | --port 8888 |
--verbose |
-V |
Detailed log output | --verbose |
--version |
-v |
Show version | devproxy -v |
⚠️ Warning: This tool sets environment variables likeNODE_TLS_REJECT_UNAUTHORIZED=0to bypass HTTPS certificate verification. Only use in development and testing environments. Do not use in production.
MIT License - see the LICENSE file for details.