cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Proxy support - Mac and Windows

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Mon, 27 Aug 2007 15:37:45 -0700

On Mon, Aug 27, 2007 at 02:33:52PM -0700, Matthew Veenstra wrote:
> We are going to be adding support for grabbing proxy servers from user system
> preferences for Mac and Windows.  I know everyone has done a bit of this over
> the years.  Is there any interest in us adding this code to libcurl in some
> way.  
>
> libcurl supports environment variables for a proxy server.  GUI data is just an
> extension of storing user data.  If this is wanted is there any recommendation
> for an api to use this?  curl_getproxy()?

When this came up last time, IIRC the consensus was that this kind of code
made more sense as a separate function that could be linked in to an app
instead of being a part of libcurl.

As far as an API goes, you'll need to pass in at least the URL as well as the
easy handle to the proxy detection routine. The URL is needed to get
the requested protocol in case different proxies are needed for different
protocols. You might need to pass in the authentication method, too,
because I think NTLM authentication through a regular HTTP proxy server
isn't always reliable (you'd have to set CURLOPT_HTTPPROXYTUNNEL in that
case).

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2007-08-28