.. on Linux
Easy proxy configure for on the move with your mac :)
This script is a little one i’ve just thrown together to make it easy to move around and reconnect to proxies. Could be made a lot better but for basic needs it will suffice
# Assuming Use of Airport, change SSH_HOST and SSH_PORT and needed
NETWORK_SERVICE="Airport"
SSH_HOST="hostname"
SSH_PORT=22
PROXY_PORT=8080
echo "Checking IP of Airport to ensure network connectivity"
sudo networksetup -getinfo $NETWORK_SERVICE | grep "IP address" | grep -v v6
sudo networksetup -getairportnetwork
echo "Configuring Proxy … "
sudo networksetup -setsocksfirewallproxy $NETWORK_SERVICE 127.0.0.1 $PROXY_PORT off
echo "Connecting to SSH host. (Press Ctrl+c to exit)"
ssh -q -D $PROXY_PORT -C -N -x $SSH_HOST -p $SSH_PORT
echo " "
echo "Returning settings to default"
sudo networksetup -setsocksfirewallproxystate $NETWORK_SERVICE off
echo "exiting…."
| Print article | This entry was posted by dan on April 2, 2009 at 9:05 am, and is filed under Computers. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |