curl / Mailing Lists / curl-library / Single Mail


Re: http_proxy environment variable

From: Daniel Stenberg via curl-library <>
Date: Thu, 13 Sep 2018 15:28:18 +0200 (CEST)

On Thu, 13 Sep 2018, Colin Ngam wrote:

> Yes, you are right. The curl command works but if I write a test program
> using libcurl, libcurl does not automatically look for the variable. See

Those verbose lines my test shows comes from the library. So yes, it *does*
look for the variable. Can we perhaps change the game and you instead show us
your code for which it doesn't work?

See it working with libcurl:

$ cd docs/examples && make -sj
$ http_proxy=foo:9999 ./simple
curl_easy_perform() failed: Couldn't resolve proxy name
$ http_proxy=localhost:80 ./simple
[lots of HTML output]

(since I run a proxy on localhost port 80)

Received on 2018-09-13