cURL / Mailing Lists / curl-users / Single Mail

curl-users

'automatic configuration script' as proxy

From: Edward S. Peschko <esp5_at_pge.com>
Date: Sun, 29 Feb 2004 15:48:49 -0800

hey all,

I was wondering if curl supported an 'automatic configuration script' as do mozilla,
IE, and opera...

Just to make sure I'm being clear:

in IE, going into 'internet options => connections => lan settings' you can select
'automatically detect settings', or 'use automatic configuration script' which
tells the browser to look at a proxy webpage to get a function that determines
the proxy to use. In my case the function looks like:

function FindProxyForURL(url, host)
{
...

        if (shExpMatch(url, "ftp:..*")
        {
                return "DIRECT";
        }

        ....

        return("PROXY someproxy:8080");
}

In other words, we - at my site - have to go through a bunch of hoops to get a
proxy server name. I need to be able to automate this. I'd like to say

curl --proxy-config 'http://whateverproxy:8080' 'http://www.yahoo.com'

where proxy-config points me to this webpage, runs the (presumably javascript) function
and returns back a proxy that I can use in order to fetch the http.. This proxy may or
may not prompt for a password, so the it should be able to take -u output..

Thanks much,

Ed
(
        ps - if I can get this working, could I somehow get cvs read access using curl
        in this way? I'm thinking through the cvsweb method..
)
Received on 2004-03-01