summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Bobov <abobov@gmail.com>2021-04-27 19:35:03 +0500
committerAnton Bobov <abobov@gmail.com>2021-04-27 19:35:03 +0500
commit91d03df8a6ea971f1adbc071fe1f4e056f0e7b36 (patch)
treecd6421659dc33bb663dc1f96a901c4b6eb2ae815
parentabc2d412cbd393bf715d13d913a707305c2233d8 (diff)
Chromium with mitmproxy.
-rwxr-xr-xmitm-chrome17
1 files changed, 17 insertions, 0 deletions
diff --git a/mitm-chrome b/mitm-chrome
new file mode 100755
index 0000000..f154b1a
--- /dev/null
+++ b/mitm-chrome
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+set -e
+
+check_command() {
+ if ! command -v "$1" &>/dev/null ; then
+ echo "No $1 found."
+ exit 1
+ fi
+}
+
+check_command chromium
+check_command mitmproxy
+
+PROXY_PORT=38752
+HTTP_PROXY=http://localhost:$PROXY_PORT chromium --temp-profile "$@" >/dev/null 2>&1 &
+mitmproxy --listen-port=$PROXY_PORT