Skip to content

Instantly share code, notes, and snippets.

@ziluvatar
Last active April 4, 2018 11:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save ziluvatar/c781edf7280194cf8d9b80d9a073ce1a to your computer and use it in GitHub Desktop.
Save ziluvatar/c781edf7280194cf8d9b80d9a073ce1a to your computer and use it in GitHub Desktop.
Setup web proxy on macOs + run mitmproxy
#!/bin/bash
sudo networksetup -setwebproxy "Wi-Fi" "localhost" "8888"
sudo networksetup -setsecurewebproxy "Wi-Fi" "localhost" "8888"
# --insecure is added for development usage, where you may use self signed certificates
mitmproxy -p 8888 --insecure
sudo networksetup -setwebproxy "Wi-Fi" "" ""
sudo networksetup -setsecurewebproxy "Wi-Fi" "" ""
sudo networksetup -setwebproxystate wi-fi off
sudo networksetup -setsecurewebproxystate wi-fi off
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment