Created
August 26, 2022 02:37
-
-
Save saku/bc02830d68485eda1b6e9eb68e80c3f1 to your computer and use it in GitHub Desktop.
Web proxy setting for Mac. (For mitmproxy use)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
sudo echo "Please select on/off for proxy setting." | |
select item in on off | |
do | |
if [ "${item}" = "on" ]; then | |
sudo networksetup -setwebproxy Wi-Fi localhost 8080 | |
sudo networksetup -setsecurewebproxy Wi-Fi localhost 8080 | |
elif [ "${item}" = "off" ]; then | |
sudo networksetup -setwebproxystate Wi-Fi off | |
sudo networksetup -setsecurewebproxystate Wi-Fi off | |
else | |
echo "Please select from displayed number." | |
fi | |
exit 0 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment