Search squid archive

Re: url_regex

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

 



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



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

  Powered by Linux