Man-in-the-Middle Proxy
Automatically capture your logs without changing any code.
Important: Please Read This First
This is a work in progress and may include bugs or other issues. If you encounter any problems, please report them.
This tool is NOT intended for production use.This tool is designed for testing and debugging purposes only.
How It Works
The proxy operates as a simple HTTP server that listens on a specified port. It is configured to intercept all traffic destined for api.openai.com
and reroutes it—with the correct headers and configurations to oai.helicone.ai
. This enables you to swiftly integrate Helicone and all of its features without having to alter a single line of code.
Potential Use Cases for the MITM Proxy
- Github Actions
- Continuous Integration/Continuous Deployment (CI/CD)
- Testing
- Debugging
- Cost savings (utilizing Bucket Cache)
- Local Development
- Debugging
- Testing
- Cost savings (utilizing Bucket Cache)
Installation (Ubuntu/Debian)
We provide a script that will automatically install and configure the proxy for you.
Starting the Proxy
Stopping the Proxy
Viewing Logs
Installation (Mac)
We do not recommend installing this on your local machine. Instead, please use a virtual environment or a container. Man-in-the-Middle (MITM) Proxies can pose serious security risks.
To install on a Mac, follow the same instructions as for Ubuntu/Debian, but use the mitmproxy_mac.sh
script instead. You can find this script here: https://raw.githubusercontent.com/Helicone/helicone/main/mitmproxy_mac.sh
Configuring the Dynamic Helicone Headers
You can configure custom properties using a lock file located at ~/.helicone/custom_properties.json
. These properties will be applied to all requests.
To dynamically configure the proxy, you can install our python package.
Then, use the following code:
This enables you to manipulate properties dynamically, making your workflow more flexible and efficient.
Was this page helpful?