cURL / Mailing Lists / curl-library / Single Mail


Re: Automatic use of http_proxy environment variable

From: Daniel Stenberg <>
Date: Tue, 16 Sep 2014 14:55:25 +0200 (CEST)

On Tue, 16 Sep 2014, wrote:

> We have an app which we distribute to Windows and Linux and which makes use
> of libcurl. The app allows to setup proxy in config file. However when
> http_proxy env. variable is set it comes into a conflict with app-specific
> proxy settings. This is especially annoying for Windows users.

Can't you then just set the proxy if there is one, and set it to "" if you
explicitly do not want one? I can't think of a situation where this would be
unclear. Can you?

> The solution I propose is very simple. Since all proxy-detection magic lives
> in detect_proxy() function in url.c, we can easily call this function
> conditionally:
> proxy = detect_proxy(conn);
> #endif

If a disable switch really is necessary, I would think it should be possible
to set at run-time and not require a special build!

List admin:
Received on 2014-09-16