How do I make curl ignore the proxy?

I ran into the same problem because I set the http_proxy and https_proxy environment variables. But occasionally, I connect to a different network and need to bypass the proxy temporarily. The easiest way to do this (without changing the environment variables) is:

curl --noproxy '*' stackoverflow.com

From the manual: "The only wildcard is a single * character, which matches all hosts, and effectively disables the proxy."

The * character is quoted so that it is not erroneously expanded by the shell.


If your curl is at least version 7.19.4, you could just use the --noproxy flag.

curl --noproxy '*' http://www.stackoverflow.com

From the manual.

Tags:

Curl