erlug
[Top] [All Lists]

Re: [Erlug] Esperti di Squid: auth e transparent non vanno bene assieme?

To: erlug@xxxxxxxxxxxxxx
Subject: Re: [Erlug] Esperti di Squid: auth e transparent non vanno bene assieme?
From: straluna <straluna@xxxxxxxx>
Date: Tue, 14 Mar 2006 12:20:47 +0100
Ciao,
riprendo il vostro thread di settimana scorsa....

On Thu, 09 Mar 2006 12:29:58 +0100
Andrea wrote:

> function FindProxyForURL(url, host)
> {
>    if (isPlainHostName(host) ||
>        dnsDomainIs(host, ".example.net") ||
>        dnsDomainIs(host, ".lan.example.net") ||
>        isInNet(host, "10.0.0.0", "255.0.0.0")) ||
>        isInNet(host, "127.0.0.0", "255.0.0.0"))
>      {
>        return "DIRECT";
>      }
>    else
>      {
>        return "PROXY proxy.example.net:8080; DIRECT";
>      }
> }

Avete verificato che questo wpad.dat funzioni anche con firefox?
Perchè a suo tempo a me non funzionava col suddetto browser e
controllando con la Javascript console l'errore riportato era (a
memoria):

syntax error alla linea (numero linea)
isInNet(host, "10.0.0.0", "255.0.0.0")) ||
                                        ^^^

L'errore di sintassi segnalato era quindi l'operatore di controllo ||
prima della dichiarazione della rete 127.0.0.0.

Ho verificato ieri sera con firefox 1.07 e 1.5 e mi dà lo stesso
errore e, di conseguenza, se ne impippa delle impostazioni del proxy.

Ovviamente modificando lo script in questo modo

 function FindProxyForURL(url, host)
 {
    if (isPlainHostName(host) ||
        dnsDomainIs(host, ".example.net") ||
        dnsDomainIs(host, ".lan.example.net") ||
        isInNet(host, "10.0.0.0", "255.0.0.0"))
      {
        return "DIRECT";
      }
    if  (isInNet(host, "127.0.0.0", "255.0.0.0"))
        {
        return "DIRECT";
      }
    else
      {
        return "PROXY proxy.example.net:8080; DIRECT";
      }
 }

anche firefox è contento e infatti l'errore di syntax scompare.

Non ho investigato oltre epperò mi interessava sapere se anche a voi
risulta questo errore e/o sapere dove sbaglio.

ciaps,
a.

<Prev in Thread] Current Thread [Next in Thread>