Skip to content

Commit

Permalink
adapt to Ubuntu
Browse files Browse the repository at this point in the history
  • Loading branch information
lilydjwg committed Feb 10, 2025
1 parent 0c382a1 commit b0e2da4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ jobs:
- name: Install mitmproxy
run: |
sudo apt update
sudo apt install -y mitmproxy bubblewrap
sudo apt install -y bubblewrap
pip install -U mitmproxy
# https://github.com/DevToys-app/DevToys/issues/1373#issuecomment-2599820594
sudo sysctl -w kernel.apparmor_restrict_unprivileged_unconfined=0
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
Expand Down
6 changes: 3 additions & 3 deletions scripts/run_cached_tests
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/bash -e

if [[ -f ~/.mitmproxy/nvdump ]]; then
mitmdump -S ~/.mitmproxy/nvdump -p 7890 --server-replay-reuse --server-replay-extra=forward -w newdump &
mitmdump -S ~/.mitmproxy/nvdump -p 7890 --server-replay-reuse --server-replay-extra=forward -w newdump >/dev/null &
else
mitmdump -w ~/.mitmproxy/nvdump -p 7890 &
mitmdump -w ~/.mitmproxy/nvdump -p 7890 >/dev/null &
fi

mitm_pid=$!
Expand All @@ -19,7 +19,7 @@ for _ in {1..10}; do
sleep 1
done

http_proxy=http://localhost:7890 https_proxy=http://localhost:7890 FAKEROOTDONTTRYCHOWN=1 bwrap --dev-bind / / --bind ~/.mitmproxy/mitmproxy-ca-cert.pem /etc/ssl/cert.pem pytest
http_proxy=http://localhost:7890 https_proxy=http://localhost:7890 FAKEROOTDONTTRYCHOWN=1 bwrap --dev-bind / / --bind ~/.mitmproxy/mitmproxy-ca-cert.pem /etc/ssl/certs/ca-certificates.crt pytest

kill -INT $mitm_pid

Expand Down

0 comments on commit b0e2da4

Please sign in to comment.