proxy.pac javascript url string match for IE ?

From: s leonard <ssl@dont-contact.us>
Date: Tue, 16 Nov 1999 13:06:15 -0700

Hi-

I am currently setting up squid as a proxy/cache to allow authenticated
users (university staff/students) on remote nets(ISP's etc) http access
to local and remote IP-restricted resources (e.g. databases, journals
that we subscribe to.)

I am having a problem with my autoconfig javascript.
Our proxy.pac has to direct the browsers to proxy:

1)only certain remote domains, (we dont want to proxy CNN to someone on
sabattical in Paris!) and

2) only certain directories/paths /files within local domains.

1) works fine using dnsDomainIs(); I can get both Netscape and IE to
properly proxy a domain: dnsDomainIs(host,".sciencedirect.com")

However, only Netscape seems to properly match the shell expressions I
use e.g:
shExpMatch(url,"http://*ahsl.arizona.edu/*_gateway.cfm*")
Does IE implement this function ? is there any other function I can use
for IE?

I am a javascript novice ;-)

--------------------
-part of proxy.pac-
 function FindProxyForURL(url, host)
        {
            //If they have only specified a hostname, go directly.
            if (isPlainHostName(host))
                    return "DIRECT";

            //We don't cache WAIS,
            if (url.substring(0, 5) == "wais:")
                    return "DIRECT";

            //So the error message "no such host" will appear through
the
            //normal Netscape box - less support queries :)
            if (!isResolvable(host))
                    return "DIRECT";
   //Connect via proxy to our local proxied gateway pages,
            //or remote IP restricted resources
         // **NB update with new proxied domains here:
            if (shExpMatch(host,"proxygate.ahsl.arizona.edu") ||
              shExpMatch(url,"http://*ahsl.arizona.edu/*_gateway.cfm*")
||

shExpMatch(url,"http://*aloe.ahsl.arizona.edu/cgi-bin/oclc*")||

shExpMatch(url,"http://*library.Arizona.EDU/cgi-bin/dbs_by_sftwr*")||
      dnsDomainIs(host,".pediatrics.org") ||
              dnsDomainIs(host,".pedsinreview.org") ||
              dnsDomainIs(host,".pfizer.com") ||
              dnsDomainIs(host,".pharmrev.org") ||
              dnsDomainIs(host,".aspetjournals.org") || // pharmrev
backend
              dnsDomainIs(host,".pnas.org") ||
              dnsDomainIs(host,".sciencedirect.com") ||
              dnsDomainIs(host,".sciencemag.org") ||

<snip a bunch of domains>

           //do it proxy!
                   return "PROXY proxy.ahsl.arizona.edu.:3128; DIRECT";

                           else
                           return "DIRECT";

--
shanna leonard
senior systems programmer
arizona health sciences library
520.626.2923
Received on Tue Nov 16 1999 - 13:14:41 MST

This archive was generated by hypermail pre-2.1.9 : Wed Apr 09 2008 - 11:57:32 MDT