Skip to content

Instantly share code, notes, and snippets.

@ploegert
Created November 4, 2025 23:58
Show Gist options
  • Select an option

  • Save ploegert/9d698246fa5004724a15db7da1c4e7d4 to your computer and use it in GitHub Desktop.

Select an option

Save ploegert/9d698246fa5004724a15db7da1c4e7d4 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Automate Charles Proxy SSL setup on Linux
CHARLES_CERT_URL="http://chls.pro/ssl"
CERT_NAME="charles-ssl-proxying-certificate.crt"
PROXY_PORT=8888
echo "Downloading Charles SSL certificate..."
wget -O $CERT_NAME $CHARLES_CERT_URL
echo "Installing certificate into system trust store..."
sudo cp $CERT_NAME /usr/local/share/ca-certificates/
sudo update-ca-certificates
echo "Configuring environment proxy variables..."
echo "export http_proxy=http://localhost:$PROXY_PORT" >> ~/.bashrc
echo "export https_proxy=http://localhost:$PROXY_PORT" >> ~/.bashrc
source ~/.bashrc
echo "Setup complete!"
echo "Restart Charles and ensure SSL Proxying is enabled
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment