Re: [squid-users] Building on Mac OSX

2011-10-09 Thread Matt Cochran
I got it to build on Mac OS - but I would get compile errors from a straight, 
no options ./configure. I can get past the compile errors with some simple 
changes, but I also get some linking errors unless I use --disable-eui 
--disable-auth. Unfortunately I need the auth option! Can someone help me out 
with resolving the problems with TypedMsgHeader.h and the linker errors below?

Address.h - added #include
fatal.h, splay.h, util.h and SquidNew.h (although I'm not sure why it helped 
this last one) - added #include"config.h" so that SQUIDCEXTERN was available

In TypedMsgHeader.h, I get an "array bound is not an integer constant" for the 
struct definition here. To get past it I just set the array size to an 
arbitrary value, as I'm not sure why it doesn't work. Obviously that is not a 
fix...

    structCtrlBuffer{
        charraw[CMSG_SPACE(sizeof(int))]; ///< control buffer space for one fd
    } 

I also noticed that in adaptation/ecap/XactionRep.cc there is a conflict if you 
use --enable-ecap and --disable-auth, the class is using a property on the 
HttpRequest object that is not defined if auth is disabled, which is probably a 
rare case anyway. It would need to have something like:

const libecap::Area
Adaptation::Ecap::XactionRep::usernameValue() const
{
    const HttpRequest *request = dynamic_cast(theCauseRep ?
                                 theCauseRep->raw().header : 
theVirginRep.raw().header);
    Must(request);
#if USE_AUTH
    if (request->auth_user_request != NULL) {
        if (char const *name = request->auth_user_request->username())
            return libecap::Area::FromTempBuffer(name, strlen(name));
    }
#endif
    return libecap::Area();
}

So if I leave eui and auth enabled, I get the following linker error. I can 
live without eui, but I really need the auth part to work, and it's just that 
last entry for (Auth::StateData::CBDATA_StateData):

Undefined symbols for architecture x86_64:
  "Eui::Eui48::lookup(Ip::Address const&)", referenced from:
      connStateCreate(RefCount const&, http_port_list*)    in 
client_side.o
      ACLARP::match(ACLChecklist*)      in libacls.a(Arp.o)
  "Eui::Eui64::lookup(Ip::Address const&)", referenced from:
      connStateCreate(RefCount const&, http_port_list*)    in 
client_side.o
      ACLEui64::match(ACLChecklist*)      in libacls.a(Eui64.o)
  "Eui::Eui48::encode(char*, int)", referenced from:
      makeExternalAclKey(ACLFilledChecklist*, _external_acl_data*)       in 
external_acl.o
      aclDumpArpListWalkee(Eui::Eui48* const&, void*)in libacls.a(Arp.o)
      Format::Format::assemble(MemBuf&, AccessLogEntry*, int) constin 
libformat.a(Format.o)
  "Eui::Eui64::encode(char*, int)", referenced from:
      makeExternalAclKey(ACLFilledChecklist*, _external_acl_data*)       in 
external_acl.o
      aclDumpEuiListWalkee(Eui::Eui64* const&, void*)in libacls.a(Eui64.o)
libtool: link: rm -f ".libs/squidS.o"
      Format::Format::assemble(MemBuf&, AccessLogEntry*, int) constin 
libformat.a(Format.o)
  "Eui::Eui48::decode(char const*)", referenced from:
      aclParseArpData(char const*)in libacls.a(Arp.o)
  "Eui::Eui64::decode(char const*)", referenced from:
      aclParseEuiData(char const*)in libacls.a(Eui64.o)
  "Auth::StateData::CBDATA_StateData", referenced from:
      AuthBasicUserRequest::module_start(void (*)(void*, char*), void*)in 
libauth.a(lt3-UserRequest.o)
      AuthNTLMUserRequest::module_start(void (*)(void*, char*), void*)in 
libauth.a(lt6-UserRequest.o)
      AuthNegotiateUserRequest::module_start(void (*)(void*, char*), void*)in 
libauth.a(lt9-UserRequest.o)
      AuthDigestUserRequest::module_start(void (*)(void*, char*), void*)in 
libauth.a(lt12-UserRequest.o)
ld: symbol(s) not found for architecture x86_64

Any suggestions? I'm not sure how the linker isn't finding a 64bit library for 
these things, since I'm just building with the defaults.

Matt


From: Matt Cochran 
To: Squid 
Sent: Thursday, October 6, 2011 6:10 AM
Subject: Re: [squid-users] Building on Mac OSX

Unfortunately, I'm trying to work with libecap, and need the 3.2 version to 
build on the Mac. It seems like the configure step is not identifying the 
correct headers in a few cases, where is a good place to start troubleshooting 
this? It looks like the config pieces changed dramatically between 3.1 and 3.2.

Matt


From: jeffrey j donovan 
To: Matt Cochran 
Cc: Squid 
Sent: Sunday, September 25, 2011 5:02 PM
Subject: Re: [squid-users] Building on Mac OSX

I had the same problem, Im still running 3.1.x it compiles just fine.
-j
On Sep 24, 2011, at 4:51 PM, Matt Cochran wrote:

> I've been trying to build squid 3.2 on OSX, and I'm getting a lot of errors, 
> does anyone know of a guide for this?
>  
> I'm seeing things like: libtool: compile:  g++ -DHAVE_CONFIG_H -I../.. 
> -I../../include -I../../lib -I../../src -I../../include -I../../libltdl -Wall 
> -Wpointer-arith -Wwrite-strings -Wcomments -Wer

[squid-users] Can url_rewrite_program determine the referer?

2011-10-09 Thread dustfinger x
Hi,

The system is using Squid version 3.1.8.

I have configured squid to use a url_rewrite_program that redirects
users to the company portal sites under certain circumstances. The
problem is that the portal sites references external content and the
external content URI's are also being re_written. Is there any way for
me to determine if a particular uri has a referer? It would be idea if
I could determine the referer's domain name, but even just knowing if
the uri request has a referer would be helpful.

Sincerely,

dustfinger.


Re: [squid-users] Can url_rewrite_program determine the referer?

2011-10-09 Thread Diego Woitasen
On Sun, Oct 9, 2011 at 11:10 AM, dustfinger x
 wrote:
> Hi,
>
> The system is using Squid version 3.1.8.
>
> I have configured squid to use a url_rewrite_program that redirects
> users to the company portal sites under certain circumstances. The
> problem is that the portal sites references external content and the
> external content URI's are also being re_written. Is there any way for
> me to determine if a particular uri has a referer? It would be idea if
> I could determine the referer's domain name, but even just knowing if
> the uri request has a referer would be helpful.
>
> Sincerely,
>
> dustfinger.
>

Use "acl referer_regex" and url_rewriter_access. For example:

acl intranet_ref referer_regex *.intranet.com.*
url_rewriter_access deny intranet_ref
url_rewriter_access allow all

Regards,
 Diego


-- 
Diego Woitasen


Re: [squid-users] Can url_rewrite_program determine the referer?

2011-10-09 Thread dustfinger x
On Sun, Oct 9, 2011 at 12:19 PM, Diego Woitasen  wrote:
> On Sun, Oct 9, 2011 at 11:10 AM, dustfinger x
>  wrote:
>> Hi,
>>
>> The system is using Squid version 3.1.8.
>>
>> I have configured squid to use a url_rewrite_program that redirects
>> users to the company portal sites under certain circumstances. The
>> problem is that the portal sites references external content and the
>> external content URI's are also being re_written. Is there any way for
>> me to determine if a particular uri has a referer? It would be idea if
>> I could determine the referer's domain name, but even just knowing if
>> the uri request has a referer would be helpful.
>>
>> Sincerely,
>>
>> dustfinger.
>>
>
> Use "acl referer_regex" and url_rewriter_access. For example:
>
> acl intranet_ref referer_regex *.intranet.com.*
> url_rewriter_access deny intranet_ref
> url_rewriter_access allow all
>
> Regards,
>  Diego
>
>
> --
> Diego Woitasen
>

Hi Diego,

Thank you very much for your response. The challenge that I face is
that there will probably be a lot of referred to domains and these may
potentially change over time. If it is possible to somehow determine
the referrer from the url_rewrite_program, then that would be idea.
Your solution is not totally out of the question, but it would be a
maintenance issue for me.

I suspect that what I want to do is simply not supported, but I did
read one user's post that he was able to pass the referrer to the
redirector using user variables. The poster did not detail how he went
about this though.

Sincerely,

dustfinger.


Re: [squid-users] [3.2.0.12] ErrorDetailManager.cc(222) parse: WARNING! invalid error detail name:

2011-10-09 Thread David Touzeau
Le lundi 26 septembre 2011 à 10:38 +0200, David Touzeau a écrit :
> Le vendredi 23 septembre 2011 à 13:17 +0200, David Touzeau a écrit :
> > Le vendredi 23 septembre 2011 à 11:45 +1200, Amos Jeffries a écrit :
> > > On 23/09/11 11:13, Amos Jeffries wrote:
> > > > On 23/09/11 02:21, david touzeau wrote:
> > > >> Le jeudi 22 septembre 2011 à 15:28 +0200, Helmut Hullen a écrit :
> > > >>> Hallo, david,
> > > >>>
> > > >>> Du meintest am 22.09.11:
> > > >>>
> > > >>>
> > >  Dear i receive this error in cache.log just after compiling the
> > >  3.2.0.12 version
> > > >>>
> > > >>>
> > > >>>
> > >  ErrorDetailManager.cc(222) parse: WARNING! invalid error detail name:
> > >  P?.?P?.?09_V_ERR_DOMAIN_MISMATCH
> > >  2011/09/22 15:15:23 kid1| errorpage.cc(352) loadFromFile: parse
> > >  error while reading template
> > >  file: /usr/share/squid3/errors/templates/error-details.txt
> > > >>>
> > > >>> Maybe I've seen the same error, with "squid-3.2.0.10". Compiling squid
> > > >>> without "enable-ssl" cured that problem (but that's no real solution).
> > > >>>
> > > >>> Viele Gruesse!
> > > >>> Helmut
> > > >>>
> > > >> tried with 3.2.0.12-20110921-r11341 without success...
> > > >>
> > > >>
> > > >> 2011/09/22 16:20:31 kid1| Adding domain touzeau.com
> > > >> from /etc/resolv.conf
> > > >> 2011/09/22 16:20:31 kid1| Adding nameserver 192.168.1.105
> > > >> from /etc/resolv.conf
> > > >> 2011/09/22 16:20:31 kid1| Adding nameserver 192.168.1.1
> > > >> from /etc/resolv.conf
> > > >> 2011/09/22 16:20:31 kid1| ErrorDetailManager.cc(222) parse: WARNING!
> > > >> invalid error detail name: (��(��09_V_ERR_DOMAIN_MISMATCH
> > > >> 2011/09/22 16:20:31 kid1| errorpage.cc(352) loadFromFile: parse error
> > > >> while reading template
> > > >> file: /usr/share/squid3/errors/templates/error-details.txt
> > > >> FATAL: failed to find or read error text file.
> > > >> Squid Cache (Version 3.2.0.12-20110921-r11341): Terminated abnormally.
> > > >> CPU Usage: 0.008 seconds = 0.004 user + 0.004 sys
> > > >> Maximum Resident Size: 22640 KB
> > > >> Page faults with physical i/o: 4
> > > >>
> > > >
> > > > We have two bugs here.
> > > > One where the newest SSL messages sub-tag "ERROR" is being incorrectly
> > > > translated. This can be worked around by copying the file from
> > > > errors/templates/error-details.txt over top of its alternate in all the
> > > > other languages.
> > > 
> > > A workaround has been added to do this step in 3.2 and langpack for the 
> > > next round of daily updates (squid-3.2 r11343 and later).
> > > 
> > > Although, note the major Rock store changes went in at r11342. So fair 
> > > warning on that snapshot.
> > > 
> > > Amos
> > 
> > Thanks amos, 
> > 
> > r11343 did not resolv the issue...
> > 
> > 2011/09/23 13:16:02 kid3| Starting Squid Cache version
> > 3.2.0.12-20110923-r11343 for i686-pc-linux-gnu...
> > 2011/09/23 13:16:02 kid3| Process ID 1548
> > 2011/09/23 13:16:02 kid3| Process Roles: coordinator
> > 2011/09/23 13:16:02 kid3| With 1024 file descriptors available
> > 2011/09/23 13:16:02 kid3| Initializing IP Cache...
> > 2011/09/23 13:16:02 kid3| DNS Socket created at [::], FD 8
> > 2011/09/23 13:16:02 kid3| DNS Socket created at 0.0.0.0, FD 9
> > 2011/09/23 13:16:02 kid3| Adding domain touzeau.com
> > from /etc/resolv.conf
> > 2011/09/23 13:16:02 kid3| Adding domain touzeau.com
> > from /etc/resolv.conf
> > 2011/09/23 13:16:02 kid3| Adding nameserver 192.168.1.105
> > from /etc/resolv.conf
> > 2011/09/23 13:16:02 kid3| Adding nameserver 192.168.1.1
> > from /etc/resolv.conf
> > 2011/09/23 13:16:02 kid3| ErrorDetailManager.cc(222) parse: WARNING!
> > invalid error detail name: ($�($�09_V_ERR_DOMAIN_MISMATCH
> > 2011/09/23 13:16:02 kid3| errorpage.cc(352) loadFromFile:  parse error
> > while reading template
> > file: /usr/share/squid3/errors/templates/error-details.txt
> > 
> > 
> > 
> 3.2.0.12-20110926-r11343 did not resolve the issue...
> 
> 
> FATAL: failed to find or read error text file.
> Squid Cache (Version 3.2.0.12-20110926-r11343): Terminated abnormally.
> CPU Usage: 0.008 seconds = 0.004 user + 0.004 sys
> Maximum Resident Size: 23472 KB
> Page faults with physical i/o: 0
> 2011/09/26 10:36:30 kid2| ErrorDetailManager.cc(222) parse: WARNING!
> invalid error detail name: (d+�(d+�09_V_ERR_DOMAIN_MISMATCH
> 2011/09/26 10:36:30 kid2| errorpage.cc(352) loadFromFile:  parse error
> while reading template
> file: /usr/share/squid3/errors/templates/error-details.txt
> FATAL: failed to find or read error text file.
> Squid Cache (Version 3.2.0.12-20110926-r11343): Terminated abnormally.
> CPU Usage: 0.008 seconds = 0.000 user + 0.008 sys
> Maximum Resident Size: 23472 KB
> Page faults with physical i/o: 0
> 2011/09/26 10:36:30 kid3| ErrorDetailManager.cc(222) parse: WARNING!
> invalid error detail name: (D�(D�09_V_ERR_DOMAIN_MISMATCH
> 2011/09/26 10:36:30 kid3| errorpage.cc(352) loadFromFile:  parse error
> while reading template
> file: /usr/share/squid3/err

Re: [squid-users] Can url_rewrite_program determine the referer?

2011-10-09 Thread Amos Jeffries

On Sun, 9 Oct 2011 16:07:00 -0600, dustfinger x wrote:

On Sun, Oct 9, 2011 at 12:19 PM, Diego Woitasen
 wrote:

On Sun, Oct 9, 2011 at 11:10 AM, dustfinger x
 wrote:

Hi,

The system is using Squid version 3.1.8.

I have configured squid to use a url_rewrite_program that redirects
users to the company portal sites under certain circumstances. The
problem is that the portal sites references external content and 
the
external content URI's are also being re_written. Is there any way 
for
me to determine if a particular uri has a referer? It would be idea 
if
I could determine the referer's domain name, but even just knowing 
if

the uri request has a referer would be helpful.

Sincerely,

dustfinger.



Use "acl referer_regex" and url_rewriter_access. For example:

acl intranet_ref referer_regex *.intranet.com.*
url_rewriter_access deny intranet_ref
url_rewriter_access allow all

Regards,
 Diego


--
Diego Woitasen



Hi Diego,

Thank you very much for your response. The challenge that I face is
that there will probably be a lot of referred to domains and these 
may

potentially change over time. If it is possible to somehow determine
the referrer from the url_rewrite_program, then that would be idea.
Your solution is not totally out of the question, but it would be a
maintenance issue for me.

I suspect that what I want to do is simply not supported, but I did
read one user's post that he was able to pass the referrer to the
redirector using user variables. The poster did not detail how he 
went

about this though.


Sounds way too complex. You can use external ACL in url_rewrite_access 
to make the ACL checks real-time based on arbitrary data source. Usage 
the same as in http_access.


Amos


Re: [squid-users] [3.2.0.12] ErrorDetailManager.cc(222) parse: WARNING! invalid error detail name:

2011-10-09 Thread Amos Jeffries

On Mon, 10 Oct 2011 00:23:38 +0200, David Touzeau wrote:

Le lundi 26 septembre 2011 à 10:38 +0200, David Touzeau a écrit :

Le vendredi 23 septembre 2011 à 13:17 +0200, David Touzeau a écrit :
> Le vendredi 23 septembre 2011 à 11:45 +1200, Amos Jeffries a écrit 
:

> > On 23/09/11 11:13, Amos Jeffries wrote:
> > > On 23/09/11 02:21, david touzeau wrote:
> > >> Le jeudi 22 septembre 2011 à 15:28 +0200, Helmut Hullen a 
écrit :

> > >>> Hallo, david,
> > >>>
> > >>> Du meintest am 22.09.11:
> > >>>
> > >>>
> >  Dear i receive this error in cache.log just after compiling 
the

> >  3.2.0.12 version
> > >>>
> > >>>
> > >>>
> >  ErrorDetailManager.cc(222) parse: WARNING! invalid error 
detail name:

> >  P?.?P?.?09_V_ERR_DOMAIN_MISMATCH
> >  2011/09/22 15:15:23 kid1| errorpage.cc(352) loadFromFile: 
parse

> >  error while reading template
> >  file: /usr/share/squid3/errors/templates/error-details.txt
> > >>>
> > >>> Maybe I've seen the same error, with "squid-3.2.0.10". 
Compiling squid
> > >>> without "enable-ssl" cured that problem (but that's no real 
solution).

> > >>>
> > >>> Viele Gruesse!
> > >>> Helmut
> > >>>
> > >> tried with 3.2.0.12-20110921-r11341 without success...
> > >>
> > >>
> > >> 2011/09/22 16:20:31 kid1| Adding domain touzeau.com
> > >> from /etc/resolv.conf
> > >> 2011/09/22 16:20:31 kid1| Adding nameserver 192.168.1.105
> > >> from /etc/resolv.conf
> > >> 2011/09/22 16:20:31 kid1| Adding nameserver 192.168.1.1
> > >> from /etc/resolv.conf
> > >> 2011/09/22 16:20:31 kid1| ErrorDetailManager.cc(222) parse: 
WARNING!

> > >> invalid error detail name: (��(��09_V_ERR_DOMAIN_MISMATCH
> > >> 2011/09/22 16:20:31 kid1| errorpage.cc(352) loadFromFile: 
parse error

> > >> while reading template
> > >> file: /usr/share/squid3/errors/templates/error-details.txt
> > >> FATAL: failed to find or read error text file.
> > >> Squid Cache (Version 3.2.0.12-20110921-r11341): Terminated 
abnormally.

> > >> CPU Usage: 0.008 seconds = 0.004 user + 0.004 sys
> > >> Maximum Resident Size: 22640 KB
> > >> Page faults with physical i/o: 4
> > >>
> > >
> > > We have two bugs here.
> > > One where the newest SSL messages sub-tag "ERROR" is being 
incorrectly

> > > translated. This can be worked around by copying the file from
> > > errors/templates/error-details.txt over top of its alternate 
in all the

> > > other languages.
> >
> > A workaround has been added to do this step in 3.2 and langpack 
for the

> > next round of daily updates (squid-3.2 r11343 and later).
> >
> > Although, note the major Rock store changes went in at r11342. 
So fair

> > warning on that snapshot.
> >
> > Amos
>
> Thanks amos,
>
> r11343 did not resolv the issue...
>
> 2011/09/23 13:16:02 kid3| Starting Squid Cache version
> 3.2.0.12-20110923-r11343 for i686-pc-linux-gnu...
> 2011/09/23 13:16:02 kid3| Process ID 1548
> 2011/09/23 13:16:02 kid3| Process Roles: coordinator
> 2011/09/23 13:16:02 kid3| With 1024 file descriptors available
> 2011/09/23 13:16:02 kid3| Initializing IP Cache...
> 2011/09/23 13:16:02 kid3| DNS Socket created at [::], FD 8
> 2011/09/23 13:16:02 kid3| DNS Socket created at 0.0.0.0, FD 9
> 2011/09/23 13:16:02 kid3| Adding domain touzeau.com
> from /etc/resolv.conf
> 2011/09/23 13:16:02 kid3| Adding domain touzeau.com
> from /etc/resolv.conf
> 2011/09/23 13:16:02 kid3| Adding nameserver 192.168.1.105
> from /etc/resolv.conf
> 2011/09/23 13:16:02 kid3| Adding nameserver 192.168.1.1
> from /etc/resolv.conf
> 2011/09/23 13:16:02 kid3| ErrorDetailManager.cc(222) parse: 
WARNING!

> invalid error detail name: ($�($�09_V_ERR_DOMAIN_MISMATCH
> 2011/09/23 13:16:02 kid3| errorpage.cc(352) loadFromFile:  parse 
error

> while reading template
> file: /usr/share/squid3/errors/templates/error-details.txt
>




3.2.0.12-20111008-r11360 did not resolve the issue...

processes
2011/10/10 00:21:50 kid1| ErrorDetailManager.cc(222) parse: WARNING!
invalid error detail name: PT�PT�09_V_ERR_DOMAIN_MISMATCH
2011/10/10 00:21:50 kid1| errorpage.cc(354) loadFromFile:  parse 
error

while reading template
file: /usr/share/squid3/errors/templates/error-details.txt


Can you check that the upgrade installation actually changes those 
files?

I'm suspicious that the copy may leave the mangled version in place.

I also find it a bit weird that the first two bytes of the text "X5" is 
what you see being mangled. The problem r11343 and r11360 fix is a 
sub-string "_ERROR_" being wrongly affected.


Amos


[squid-users] ACL's by Specific Date and Time

2011-10-09 Thread Jim Gifford
I use my squid server at home for me to keep my eyes on my kids 
internet. Was wondering if it was possible to allow or deny access by a 
specific day and time.


What my thoughts are is when they are on a holiday, to disable my normal 
rules. So when they are out of school the proxy doesn't stop their 
access, but if it's a non school day, it will allow them out.


Not sure if this is possible.


RE: [squid-users] ACL's by Specific Date and Time

2011-10-09 Thread Jenny Lee

> Date: Sun, 9 Oct 2011 20:45:07 -0700
> From: maill...@jg555.com
> To: squid-users@squid-cache.org
> Subject: [squid-users] ACL's by Specific Date and Time
> 
> I use my squid server at home for me to keep my eyes on my kids 
> internet. Was wondering if it was possible to allow or deny access by a 
> specific day and time.
> 
> What my thoughts are is when they are on a holiday, to disable my normal 
> rules. So when they are out of school the proxy doesn't stop their 
> access, but if it's a non school day, it will allow them out.
> 
> Not sure if this is possible.
 
Very easy to do.
 
 
See "acl time": 
http://wiki.squid-cache.org/SquidFaq/SquidAcl?highlight=%28time%29#How_can_I_allow_some_clients_to_use_the_cache_at_specific_times.3F
 
You can add weekends to your rules to allow access to your kids. You can also 
download official public holiday list and create rules for these days.
 
Jenny 

[squid-users] calamaris error

2011-10-09 Thread Benjamin

  Hi,


I am getting warning msg. while using calamaris.



cat /var/log/squid/access.log | calamaris -s
defined(%hash) is deprecated at /usr/bin/calamaris line 2605.
   (Maybe you should just omit the defined()?)


I can see report but i m getting first above msg.

OS : Fedora 15
Squid: 3.1.14
Calamaris: 3


Thanks,
Benjamin