Skip to content

Instantly share code, notes, and snippets.

@assafmo
Created June 6, 2019 08:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save assafmo/5f61e6007d153b74cad5f46959f60051 to your computer and use it in GitHub Desktop.
Save assafmo/5f61e6007d153b74cad5f46959f60051 to your computer and use it in GitHub Desktop.
Socks proxy using SSH
#!/bin/bash
ssh -D 1080 -N user@proxy-server & # The & won't work with password authentication
PROXY_PID="$!"
curl -x socks5://localhost:1080 https://google.com
kill -TERM "$PROXY_PID"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment