The question is simple, but the answer is not :
ssh -D 8080 user@host
or
ssh -gCNf -D 8080 user@host
or
wathever with -D #
I need a kind of proxy that i can use with http_proxy variable, in an embedded device that doesn't support SOCKS.
What should i do?
Best Answer
Method 1: Use a HTTP proxy that supports using a SOCKS upstream, e.g. Polipo or Privoxy.
First establish a
-D
tunnel over SSH like always, then configure the HTTP proxy to use the SSH tunnel – example Polipo configuration:Finally, point the app to Polipo using
http_proxy=localhost:8118
.Method 2: Run your program inside the
torsocks
wrapper (or the oldertsocks
), which proxies all connections transparently. It was meant for use with Tor, but works with any SOCKS server, includingssh -D
.Method 3: Set up a HTTP proxy on your server, then use
ssh -L
to access it.