Skip to content

Instantly share code, notes, and snippets.

@mkanenobu
Last active January 7, 2019 09:29
Show Gist options
  • Save mkanenobu/9aa0c11a8c47711cf9dbcd27c4f82b5d to your computer and use it in GitHub Desktop.
Save mkanenobu/9aa0c11a8c47711cf9dbcd27c4f82b5d to your computer and use it in GitHub Desktop.
#!/bin/bash
# This script can use in macOS or Linux
# Change [proxy] and [port]
# Execute $ source proxy_switch.bash
proxy=""
port=""
if [ -z $http_proxy ]; then
echo "Enable"
export http_proxy="http://${proxy}:${port}/"
else
echo "Disable"
export http_proxy=""
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment