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:
proxyAddress = "::1"
proxyPort = 8118
socksParentProxy = "localhost:8080"
socksProxyType = socks5
Finally, point the app to Polipo using http_proxy=localhost:8118
.
Method 2: Run your program inside the torsocks
wrapper (or the older tsocks
), which proxies all connections transparently. It was meant for use with Tor, but works with any SOCKS server, including ssh -D
.
Method 3: Set up a HTTP proxy on your server, then use ssh -L
to access it.
Shouldn't it be
ssh -D user@host:8080
? – ngen – 2011-05-06T14:51:48.377i've done it with ssh a while back.. vnc through ssh. but you could I suppose use squid(an http proxy) through ssh. can't recall how i did it though at the moment. it's not -D 'cos (as you know -and better than me) -D is SOCKS if I recall. – barlop – 2011-05-06T15:03:21.780
@ngen: No.
-D
specifies a port to open the tunnel on, not the port to connect to. (Even the connection port is specified as-p port
, not:port
, for compatibility reasons.) – user1686 – 2011-05-06T15:05:11.827