Last Updated: February 25, 2016
·
12.7K
· sheerun

Proxy http traffic through your server using SSH on Mac OS X

Review my code (it should work on Mac OS X 10.6+)

curl -L http://git.io/n3X_Ww

Install it as proxy tool:

curl -L http://git.io/n3X_Ww -o /usr/local/bin/proxy
chmod a+x /usr/local/bin/proxy

Test your IP address for example on http://ip.sher.pl/

Proxy HTTP traffic through your VPS:

proxy user@example.com # SSH to your server

Check your IP address again. Enjoy :-)

  • Tool requires sudo for changing proxy configuration
  • You stop tool by simple Ctrl-C
  • It uses dynamic port forwarding ssh feature (ssh -N -D)
  • It works only for clients supporting SOCKS protocol, like Google Chrome. If you want to forward traffic using curl tool, just type: curl --socks5 localhost:1080 ip.sher.pl