Last active
March 1, 2016 16:40
-
-
Save jaderfeijo/9a5b51df98da2ecbe8cb to your computer and use it in GitHub Desktop.
sshpd
This file contains hidden or 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
usage() { | |
echo "Usage: sshpd [start|stop] [username@server_address]" | |
} | |
if [ "$1" == "start" ]; then | |
if [ "$2" != "" ]; then | |
ssh -D 8080 -f -C -q -N $2 | |
echo "[sshpd] service started!" | |
echo "[sshpd] listening for incoming connections on port 8080..." | |
else | |
usage | |
fi | |
elif [ "$1" == "stop" ]; then | |
pkill -x ssh | |
echo "[sshpd] service stopped!" | |
else | |
usage | |
fi |
To install, open a new Terminal window and type the following:
mkdir ~/.scripts && curl https://gist.githubusercontent.com/jaderfeijo/9a5b51df98da2ecbe8cb/raw/6c48b2056c8eeb370e1b2cb2a25744ec72f19bff/sshpd > ~/.scripts/sshpd && chmod a+x ~/.scripts/sshpd && echo 'PATH="$PATH:~/.scripts"' >> ~/.bash_profile && source ~/.bash_profile
To uninstall, type the following on a Terminal window:
rm -r ~/.scripts
Then edit your ~/.bash_profile
file and remove the line that says:
PATH="$PATH:~/.scripts"
Then type:
source ~/.bash_profile
Once the server is running, just configure your web browser to access the server as you would any other SOCKS proxy, point it to localhost
and have fun!
More information on how to setup the proxy server can be found here:
http://paulstamatiou.com/how-to-surf-securely-with-ssh-tunnel/
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usage:
sshpd [start|stop] [username@server_address]