Skip to content

Commit 21a3d13

Browse files
committed
Install mitmproxy from PyPI
Now that mitmproxy/mitmproxy@5353df5 has shipped in a version of mitmproxy (10.4.0) we can install it from PyPI once again.
1 parent f226900 commit 21a3d13

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

monitor/setup.sh

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,15 @@ if [ "$RUNNER_OS" = "macOS" ]; then
2222
sudo sysadminctl -addUser mitmproxyuser -admin
2323

2424
sudo -u mitmproxyuser -H bash -e -c 'cd /Users/mitmproxyuser && \
25-
git clone -b main https://github.com/mitmproxy/mitmproxy.git && \
26-
cd mitmproxy && \
27-
git checkout f87ec2235968acd688a378e7c1ed7e07d9bce43e && \
2825
python -m venv venv && \
29-
venv/bin/pip install -e ".[dev]" '
26+
venv/bin/pip install "mitmproxy>=10.4.0" requests'
3027

3128
# install requests for mitm plugin
3229
sudo cp mitm_plugin.py /Users/mitmproxyuser/mitm_plugin.py
3330

3431
# start mitmdump in simple mode for now to generate CA certificate
3532
sudo -u mitmproxyuser -H bash -e -c "cd /Users/mitmproxyuser && \
36-
/Users/mitmproxyuser/mitmproxy/venv/bin/mitmdump &"
33+
/Users/mitmproxyuser/venv/bin/mitmdump &"
3734

3835
# wait for mitmdump to start and generate CA certificate
3936
counter=0
@@ -76,7 +73,7 @@ if [ "$RUNNER_OS" = "macOS" ]; then
7673
echo "ALL ALL=NOPASSWD: /sbin/pfctl -s state" | sudo tee -a /etc/sudoers
7774

7875
# finally, start mitmdump in transparent mode
79-
sudo -u mitmproxyuser -H bash -e -c "cd /Users/mitmproxyuser && /Users/mitmproxyuser/mitmproxy/venv/bin/mitmdump \
76+
sudo -u mitmproxyuser -H bash -e -c "cd /Users/mitmproxyuser && /Users/mitmproxyuser/venv/bin/mitmdump \
8077
--mode transparent \
8178
--showhost \
8279
--allow-hosts '$filter' \
@@ -129,15 +126,12 @@ elif [ "$RUNNER_OS" = "Linux" ]; then
129126

130127
# install mitmproxy
131128
sudo -u mitmproxyuser -H bash -e -c 'cd ~ && \
132-
git clone -b main https://github.com/mitmproxy/mitmproxy.git && \
133-
cd mitmproxy && \
134-
git checkout 5353df5f1eeaf5fc36d9b5f7024199c888aed116 && \
135129
"$(command -v python3.10 || command -v python3)" -m venv venv && \
136-
venv/bin/pip install -e ".[dev]" '
130+
venv/bin/pip install "mitmproxy>=10.4.0" requests'
137131

138132
sudo cp mitm_plugin.py /home/mitmproxyuser/mitm_plugin.py
139133
sudo -u mitmproxyuser -H bash -e -c "cd /home/mitmproxyuser && \
140-
/home/mitmproxyuser/mitmproxy/venv/bin/mitmdump \
134+
/home/mitmproxyuser/venv/bin/mitmdump \
141135
--mode transparent \
142136
--showhost \
143137
--allow-hosts '$filter' \

0 commit comments

Comments
 (0)