Skip to content

Tracing Requests with a Reverse Proxy

To trace requests sent to your broadcasted EC2, dns53 comes bundled with an internal reverse proxy. To enable proxying:

dns53 --proxy

Once enabled, set the required environment variables to trace both HTTP and HTTPS requests. It is advised not to proxy any requests to IMDS on your EC2.

export HTTP_PROXY=http://localhost:10080
export HTTPS_PROXY=http://localhost:10080
export NO_PROXY=169.254.169.254
curl http://httpbin.org/headers
curl https://httpbin.org/ip -k

If you do not wish to set any of these environment variables, your preferred CLI tool should support request proxying using a dedicated flag. For curl, that is -x.

Changing the proxy port

Feel free to change the default proxy port of :10080 by using the proxy-port flag:

dns53 --proxy --proxy-port 10888