I am currently forwarding all my traffic through a ssh tunnel:
ssh -ND 8080 user@remote-machine
And have set the system socks5 proxy (in system settings under network section) to
127.0.0.1:8080. Everything works fine, Google Chrome and other programs are using the socks proxy as supposed to.
The problem comes when I'm trying to use
curl (either in terminal or using it in
What I get is this:
user@laptop:~$ curl -v google.com * About to connect() to proxy 127.0.0.1 port 8080 (#0) * Trying 127.0.0.1... connected > GET HTTP://google.com HTTP/1.1 > User-Agent: curl/7.22.0 (i686-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/184.108.40.206 libidn/1.23 librtmp/2.3 > Host: google.com > Accept: */* > Proxy-Connection: Keep-Alive > * Empty reply from server * Connection #0 to host 127.0.0.1 left intact curl: (52) Empty reply from server * Closing connection #0
I tried to google around but couldn't find anything relevant. So how do I get curl to work with system proxy (if present)? I would like to be able to setup an alias that would work with both cases (proxy and no proxy) because I will not be always willing to use the proxy.