Search squid archive

Re: proxy.pac file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tuesday 29 August 2006 23:30, Kevin wrote:
> On 8/29/06, Raj <sunfire2005@xxxxxxxxx> wrote:
> > I am running squid version 2.5.stable10. All the users use the
> > following proxy.pac file
>
> I do a lot with PAC, but never tried variables for return lines.

We are doing something similar here. And it works. Example:

function FindProxyForURL(url, host) {
  if (
        isPlainHostName(host)
     || dnsDomainIs(host, "our.intranet")
      )
    var proxy = "DIRECT";

  else if (...)
    var proxy = "...";
  else if ...
    var proxy = "...";
  else ...
    var proxy = "...";

  //alert("URL="+url+" HOST="+host+" => PROXY="+proxy);
  return proxy
}

I introduced that "alert" statement so I can easily create a proxy-test.pac 
file from this file and enable the "alert" statement. That allows me to 
debug which proxy is returned for each HTTP request. So generally 
variables work.

Without the 'alerts' the whole script is impossible to debug.

 Christoph

[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux