Re: Automatic Proxy Configuration

From: Dancer <>
Date: Wed, 11 Feb 1998 01:10:03 +1000

I'm just guessing here, 'cause it's the wee small hours, and I'm not going to look
things up.

Try changing your script to:

function FindProxyForURL(url, host)
            if (url.substring(0, 5) == "http:")
                 return "PROXY;"; // Note the extra semicolon in
the quotes
            return "DIRECT";

Now, if you get the 'server does not have a DNS entry' alert, then you _know_ that
the url.substring condition _failed_.
If it did, then you should start exploring why that function failed. I'm led to
understand that only a limited subset of functions are available in this function.
Maybe you should use shExpMatch() instead.


Benarson Behajaina Rodriguez wrote:

> Hi squiders,
> I'm running Squid 1.1.20 on, port 3128.
> My Netscape(Communicator 4.01) PAC (Proxy Auto-Config) doesn't work.
> When trying , the i've got:
> "Netscape is unable to locate the server
> The server doesn't have a DNS entry"
> I've configured my Netscape as:
> Preferences/Advanced/Proxies/Automatic PC(URL):
> where is running Apache/1.2.4:
> srm.conf: AddType application/x-ns-proxy-autoconfig pac
> mime.types: application/x-ns-proxy-autoconfig pac
> swh.pac:
> function FindProxyForURL(url, host)
> {
> if (url.substring(0, 5) == "http:") return "PROXY";
> }
> Even using the script from Squid FAQ (written by Oskar Pearson), my
> Netscape (browser) couldn't connect to the proxy.
> Of course, my manual proxy configuration works fine.
> Could someone tell me, where is the problem ?
> ----
> Benarson.

Did you read the documentation AND the FAQ?
If not, I'll probably still answer your question, but my patience will
be limited, and you take the risk of sarcasm and ridicule.
Received on Tue Feb 10 1998 - 07:15:27 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:38:50 MST