Skip to content

Commit

Permalink
try custom cert directory
Browse files Browse the repository at this point in the history
  • Loading branch information
nesmabadr committed Nov 8, 2024
1 parent b7df235 commit 34cf889
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions scripts/tests/setup_https_server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ CN = localhost # Common Name, change to your domain/IP if needed
[ v3_ca ]
subjectAltName = @alt_names
keyUsage = nonRepudiation, digitalSignature, keyEncipherment
[ alt_names ]
DNS.1 = localhost
Expand All @@ -44,13 +45,6 @@ openssl req -x509 -newkey rsa:2048 -keyout $KEY_FILE -out $CERT_FILE -days 30 -n
sudo cp $CERT_FILE /etc/ssl/certs/
sudo update-ca-certificates

wget https://downloads.mitmproxy.org/11.0.0/mitmproxy-11.0.0-linux-x86_64.tar.gz -O mitmproxy.tar.gz
tar -xzvf mitmproxy.tar.gz
chmod +x mitmdump

./mitmdump --listen-port 8081 --mode reverse:https://localhost:8080 &
export HTTPS_PROXY=http://localhost:8081

# Start Python HTTPS server
echo "Serving $DIRECTORY_TO_SERVE on https://localhost:$PORT"
nohup python3 scripts/tests/https_server.py "$DIRECTORY_TO_SERVE" "$CERT_FILE" "$KEY_FILE" "$PORT" &

0 comments on commit 34cf889

Please sign in to comment.