How do I make curl ignore the proxy?

后端 未结 12 1750
别跟我提以往
别跟我提以往 2021-01-30 03:01

How do I make curl ignore the proxy? Setting $NO_PROXY doesn\'t seem to work for me.

12条回答
  •  抹茶落季
    2021-01-30 03:36

    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.

提交回复
热议问题