cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: Auto-proxy configuration option for curl?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 6 Aug 2001 23:06:17 +0200 (MET DST)

On Mon, 6 Aug 2001, Roth, Kevin P. wrote:

> An "auto-proxy" script is really just a piece of JavaScript. It's a
> function that your browser calls to figure out what proxy settings to use
> for a specific URL. I'm gonna guess that it would be quite a stretch to
> change curl to be able to run this code.

One *theoretical* approach to actually doing that, would be to grab the
Mozilla source code and extract the javascript engine from there. I'd guess
that is quite a bit of work.

> You can actually type the auto-proxy URL into your browser's address bar,
> and view the JavaScript code. Your browser calls the function in there,
> and passes it the hostname and URL that it's getting ready to obtain, and
> the code should return the proxy setting to use. Either "PROXY
> hostname:port" or "DIRECT", or "SOCKS ...".

Yes, the actual code is often very simple and can in most cases be understood
with only little knowledge about programming languages in general.

-- 
     Daniel Stenberg -- curl dude -- http://curl.haxx.se/
Received on 2001-08-06