Last Updated: February 25, 2016
· 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

Install it as proxy tool:

curl -L -o /usr/local/bin/proxy
chmod a+x /usr/local/bin/proxy

Test your IP address for example on

Proxy HTTP traffic through your VPS:

proxy # 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