curl / Mailing Lists / curl-library / Single Mail

curl-library

Support for WinHttpGetProxyForUrl ?

From: Jeroen Ooms via curl-library <curl-library_at_cool.haxx.se>
Date: Wed, 27 Sep 2017 17:23:31 +0200

Windows uses on corporate networks can sometimes only connect to the
internet via an enterprise proxy server that is automatically detected and
configured by Internet Explorer clients. On some networks, different proxy
servers are required for different URL's (intranet vs internet, etc).

Windows has APIs for this, I was wondering if anyone has attempted to
support this in libcurl?

Our R bindings for libcurl include some additional wrappers:
ie_proxy_info() function shows the IE proxy settings,
and ie_get_proxy_for_url() asks windows what is the appropriate proxy
server for a given URL which seems to work for most configurations:
https://github.com/jeroen/curl/blob/master/src/ieproxy.c

Currently users have to query this API separately for each URL and then use
this to set the HTTPS_PROXY variable or handle options. However this is
tricky, especially for networks where the proxy server is dynamic. Perhaps
we could add an option to libcurl to automatically query the proxy server
for a given URL?

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2017-09-27