cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: Auto-proxy configuration option for curl?

From: Roth, Kevin P. <KPRoth_at_MarathonOil.com>
Date: Mon, 6 Aug 2001 16:48:23 -0400

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.

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 ...".

Once you know which URLs need to go through a PROXY and which don't, it
should be possible to re-code that logic into your Perl script to set
PROXY options on a per-connection basis.

--Kevin

-----Original Message-----
From: Halliburton, Pat [mailto:phalliburton_at_ti.com]
Sent: Monday, August 06, 2001 3:12 PM
To: 'curl_at_contactor.se'
Subject: Auto-proxy configuration option for curl?

I have a Perl script which calls Curl as a commandline utility on
Solaris.
Currently, I'm using environment variables HTTP_PROXY, HTTPS_PROXY and
NO_PROXY to set protocol specific proxy settings. This script basically
just uses Curl to test a set of intranet and internet url's, ie. can
they be
accessed successfully or not. This method of proxy cofiguration works
fine
for most urls. However, there are some urls which consistently fail
using
these proxy setttings yet work fine in my workstation browsers if I use
an
"auto-proxy" configuration url option instead of setting specific
protocol
proxy server setttings. I'd like to use this "auto-proxy" option with
curl
but am having trouble finding any curl doc that describes how to do
that.
There is a mention of another environment variable: ALL_PROXY. Is that
what I need, ie. just set to the url which I use for the auto-proxy
settings
in my workstation browsers? Or is there some curl commandline option
which
allows me to specify this?

Regards,
Pat
Received on 2001-08-06