Skip to content

Instantly share code, notes, and snippets.

@marlluslustosa
Forked from lene/socat_socks_proxy.sh
Created December 16, 2019 12:55
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 marlluslustosa/738728e0461e7281bfe1abf2cf8cb21a to your computer and use it in GitHub Desktop.
Save marlluslustosa/738728e0461e7281bfe1abf2cf8cb21a to your computer and use it in GitHub Desktop.
Using tor as SOCKS proxy with SOCAT
socat TCP-LISTEN:<localport> SOCKS4A:localhost:<host>:<remoteport>,socksport=9050
# for example, to ssh into secret.shell.server.org via tor, do:
$ socat TCP-LISTEN:22222 SOCKS4A:localhost:secret.shell.server.org:22,socksport=9050 &
$ ssh localhost -p 22222
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment