An easy, light mitm (man-in-the-middle) http/https proxy
1.1K
proxymitm is a easy light proxy man-in-the-middle HTTP/HTTPS proxy.
It is designed to easily analyse trafic from any blackbox application.
The simpliest way to use it is to run
docker run --rm --detach \
--publish 8080:8080 \
--name proxymitm \
docker.io/cyd01/proxymitm:latest
The proxy will be reachable to 8080 port.
To use it, do not forget to set your classic environment variables: HTTP_PROXY, HTTPS_PROXY, NO_PROXY and http_proxy, https_proxy, no_proxy.
To stop the proxy just run docker stop proxymitm.
To proxify SSL trafic, proxymitm creates server certificates on the fly. It needs to have fake certificates authority. At each startup an new authority is created and stored in /ca directory.
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.
Generating /ca/mitm.key
Generating /ca/mitm.crt
2023/12/08 13:29:25 Starting MITM TLS proxy server on port 8080
2023/12/08 13:29:25 AC certificate is available at http://0.0.0.0:8080/cert.crt
2023/12/08 13:29:25 [info] start listening to [::]:8080
To trust this authority your client application must get its certificate. Get it with the command docker cp proxymitm:/ca/mitm.crt ./mitm.crt.
Of course the authority can be provided at startup. Imagine you authority has a key myca.key and a certificate myca.crt. These two files must be pushed to /ca/mitm.key and /ca/mitm.crt.
docker run --rm --detach \
--publish 8080:8080 \
--name proxymitm \
--volume $(pwd)/myca.key:/ca/mitm.key \
--volume $(pwd)/myca.crt:/ca/mitm.crt \
docker.io/cyd01/proxymitm:latest
By default proxymitm only prints requests (Method and path) and response (HTTP return code).
It is possible to print headers too: just set the MITM_DEBUG environment variable to true.
docker run --rm --detach \
--publish 8080:8080 \
--name proxymitm \
--env MITM_PROXY=true \
docker.io/cyd01/proxymitm:latest
And get the logs with the command docker logs -f proxymitm.
Content type
Image
Digest
sha256:86711d1ad…
Size
77.5 MB
Last updated
3 months ago
docker pull cyd01/proxymitm