How do I make curl ignore the proxy?

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

    I have http_proxy and https_proxy are defined. I don't want to unset and set again those environments but --noproxy '*' works perfectly for me.

    curl --noproxy '*' -XGET 172.17.0.2:9200
    {
      "status" : 200,
      "name" : "Medusa",
      "cluster_name" : "elasticsearch",
      "version" : {
        "number" : "1.5.0",
        "build_hash" : "544816042d40151d3ce4ba4f95399d7860dc2e92",
        "build_timestamp" : "2015-03-23T14:30:58Z",
        "build_snapshot" : false,
        "lucene_version" : "4.10.4"
      },
      "tagline" : "You Know, for Search"
    }
    

提交回复
热议问题