Re: [squid-users] url_regex

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Tue, 11 Sep 2012 11:07:52 +1200

On 10.09.2012 20:58, Landucci L. wrote:
> Hi,
>
> I want to filter access using delay_pools by using url_regex (for
> example to filter and slowdown youtube access).

Okay.

> In my logs, i can see mime type of the file at the end of the line.
> Is it possible, even if managing mime types is not implemented in
> delay_pools of squid 3, to filter through the log all the access
> containing for example "video/x-flv" using url_regex ?
>

No. url_regex is an ACL test to compare a pattern to the *request* URL
(only).

There is rep_mime_type ACL test to compare a pattern against the mime
type of a *response*.

Delay pool has to limit what gets *sent* to the server and so is setup
before any response details is known. This is why mime type does not
work there. Any of the request or client TCP connection ACL tests can be
expected to work though.

You should be able to use squid-3.2 and client_delay_* pools instead
with mime_type ACL to limit how fast they get delivered. (been a while
since I worked on that and dont have time to dig into the code and
check, so this may be incorrect, but "should be").

> Does url_regex "read" only in the url or the whole line in logs (wich
> contain the mime type).

No, ACL have nothing to do with log lines. ACL are used to determine
how and what gets done. Log lines are only an output printed recorded
when everything else is finished.

Amos
Received on Mon Sep 10 2012 - 23:07:55 MDT

This archive was generated by hypermail 2.2.0 : Tue Sep 11 2012 - 12:00:03 MDT