fix(mitmproxy): Pin to mitmproxy 10.1.6 to avoid Rust dependency

mitmproxy 10.2+ requires mitmproxy_rs which needs Rust 1.80+, but
Alpine 3.19 only has Rust 1.76. Using mitmproxy 10.1.6 which is the
last pure-Python version without Rust requirements.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
CyberMind-FR 2026-01-17 07:21:36 +01:00
parent f977f488e4
commit 8ba910c271

View File

@ -304,11 +304,12 @@ set -e
# Enable community repository
sed -i 's|#\(.*community\)|\1|' /etc/apk/repositories
# Update and install Python dependencies + Rust toolchain for mitmproxy_rs
# Update and install Python dependencies
# Note: mitmproxy 10.2+ requires Rust 1.80+ but Alpine 3.19 only has 1.76
# Using mitmproxy 10.1.6 which is the last pure-Python version
apk update
apk add --no-cache \
python3 \
python3-dev \
py3-pip \
py3-wheel \
py3-cryptography \
@ -322,17 +323,10 @@ apk add --no-cache \
py3-sortedcontainers \
libffi \
openssl \
ca-certificates \
rust \
cargo \
musl-dev \
gcc
ca-certificates
# Install mitmproxy (latest version with Rust support)
pip3 install --break-system-packages mitmproxy
# Clean up build dependencies to save space
apk del --purge rust cargo python3-dev musl-dev gcc 2>/dev/null || true
# Install mitmproxy 10.1.6 (last version without Rust/mitmproxy_rs requirement)
pip3 install --break-system-packages 'mitmproxy==10.1.6'
# Create directories
mkdir -p /data /var/log/mitmproxy /etc/mitmproxy/addons