cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: curl and automatic proxy configuration/various sundry things

From: Ralph Mitchell <rmitchell_at_eds.com>
Date: Tue, 21 May 2002 03:03:15 -0500

Daniel Stenberg wrote:

> On Mon, 20 May 2002 esp5_at_rama.comp.pge.com wrote:
>
> > > In your corporate environment can you really not simply hard code a proxy
> > > server (or two)?
> >
> > No... that doesn't work. (tried it already). You need to go through the
> > automatic server - at least the way they've set it up here, the end-proxies
> > only accept connects from the central proxy, and the end proxies send back
> > a direct connection to your local workstation.
>
> Hm, the pac config is used by the browser to get a host name or IP for the
> proxy to use (or "DIRECT" if no proxy is to be used).
>
> Most pac javascript programs are very simple and fairly easy to read and
> understand by human eyes.
>
> Extracting the proxy from there and using in a curl command line should be
> perfectly possible, and the proxy can't know if we used the PAC file or not.
> I don't understand how this can't work. I'd rather guess that something else
> is failing in that case.
>

Around here, the proxy inserts an extra header:

    Forwarded: by proxy.domain.com:80/ (Netscape-Proxy/3.52)

which would be a kinda stupid way to decide where a request was coming from. On
the other hand, the web/proxy server *knows* which IP address a request comes
from, and can easily be configured only to accept requests from particular
hosts..

Ed, I don't think you said if you'd actually tried curl? If you did, which
version? Some older versions don't play too well with proxies, which may
explain why it didn't work. If you haven't tried it yet, give it a go. If you
keep track of cookies and maybe handle redirects manually, you should be able to
make it work.

If you're being allowed/denied due to IP, then banging requests through the
proxy ought to mostly work. If you're being allowed/denied due to a "blessed
cookie", you should be able to push the initial request through the central
proxy to get the cookie, then hit the end servers direct. Maybe...:)

Ralph

_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
Received on 2002-05-21