How do I make curl ignore the proxy?

后端 未结 12 1518
别跟我提以往
别跟我提以往 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:26

    First, I listed the current proxy setting with

    env | sort | less
    

    (should be something like http_proxy=http://wpad.local.machine.location:port number)

    Then I tried setting

    export http_proxy=";" 
    

    which gave this error message:

    curl: (5) Couldn't resolve proxy ';'
    

    Tried

    export http_proxy="" && curl http://servername:portnumber/destinationpath/ -d 55
    

    and it worked!

    PS! Remember to set http-proxy back to its original settings with

    export http_proxy=http://wpad.local.machine.location:port number
    

提交回复
热议问题