Skip to content

Latest commit

 

History

History
24 lines (15 loc) · 1.17 KB

README.md

File metadata and controls

24 lines (15 loc) · 1.17 KB

Docker image for JS and HTML injection based on mitmproxy

This repository contains the code for a docker image that runs a proxy which injects javascript and html content into a specific webpage at a specific location. It runs the mitmproxy and is based on the mitmproxy/mitmproxy image.

Modifications to the basic image

  • contains an addon that injects local scripts and html into a specific webpage
  • uses the command-line-version mitmdump instead of the interactive mitmproxy so it can be run as a service on a cloud platform such as Kubernetes
  • has basic authentication configured to restrict access to the proxy
  • removes caching headers by setting the anticache flag

Start injecting ...

  • Build: docker build . -t proxy
  • Run: docker run -p 8080:8080 -t proxy

Authentication

Default credentials are set in the Dockerfile. You can configure the credentials by passing the environment variables USER and PASSWORD when running the image.

Example: docker run -p 8080:8080 -e USER=admin -e PASSWORD=password -t proxy