From 97782e58fad09698b4eef586a1732f7379b3b465 Mon Sep 17 00:00:00 2001 From: kev Date: Mon, 22 Apr 2024 15:54:57 +0800 Subject: [PATCH] update mitmproxy --- mitmproxy/README.md | 13 +++++++++++++ mitmproxy/docker-compose.yml | 11 +++++++++++ 2 files changed, 24 insertions(+) diff --git a/mitmproxy/README.md b/mitmproxy/README.md index 8e7b9ca..84cf8c2 100644 --- a/mitmproxy/README.md +++ b/mitmproxy/README.md @@ -5,7 +5,20 @@ mitmproxy ```bash $ docker-compose up -d + $ curl --proxy 127.0.0.1:8080 --cacert data/mitmproxy-ca-cert.pem https://www.google.com + +$ curl https://localhost:8443/headers +{ + "headers": { + "Accept": "*/*", + "Host": "httpbin.org", + "User-Agent": "curl/8.6.0" + } +} ``` +> To install certificate globally, please read [this][2]. + [1]: https://mitmproxy.org/ +[2]: https://docs.mitmproxy.org/stable/concepts-certificates/ diff --git a/mitmproxy/docker-compose.yml b/mitmproxy/docker-compose.yml index eeaf264..f745123 100644 --- a/mitmproxy/docker-compose.yml +++ b/mitmproxy/docker-compose.yml @@ -1,5 +1,7 @@ version: "3.8" + services: + mitmproxy: image: mitmproxy/mitmproxy command: mitmweb --web-host 0.0.0.0 @@ -9,3 +11,12 @@ services: volumes: - ./data:/home/mitmproxy/.mitmproxy restart: unless-stopped + + mitmdump: + image: mitmproxy/mitmproxy + command: mitmdump --mode reverse:https://httpbin.org:443@8443 + ports: + - "8443:8443" + volumes: + - ./data:/home/mitmproxy/.mitmproxy + restart: unless-stopped