El 04/03/15 18:20, Ing. José Ramón Hermosilla Moreno escribió:
Ciertamente reply_body_max_size es la mejor solución, combinado con el horario.
La acl a la que me referí anteriormente era "rep_header".
Las otras variantes siguen siendo válidas (acl externa e ICAP) para
combinaciones más complejas y dinámicas.
----- Mensaje original -----
De: "Ariel"<ar...@cncc.cult.cu>
Para: "Lista cubana de soporte técnico en Tecnologias Libres" jovenclub.cu>
Enviados: Miércoles, 4 de Marzo 2015 16:13:25
Asunto: Re: [Gutl-l] Duda squid
si existe
El 04/03/2015 12:06, Damián Tomey Soto escribió:
Saludos, existe alguna forma de saber el tamaño de un archivo desde
squid para si es mayor de un valor denegar su descarga en horario
laboral?
Bueno:
También se pudiera usar el parámetro:
reply_body_max_size
ver detalles en:
http://www.squid-cache.org/Doc/config/reply_body_max_size/
disponible en las versiones: 3.HEAD 3.5 3.4 3.3 3.2 2.7 3.1
3.0 2.6
sintaxis:
reply_body_max_size SIZE UNITS [acl ...]
ejemplo:
Limitar descargas a un máximo de 20 MB.
reply_body_max_size 20 MB allow desc-limit
Donde:
reply_body_max_size (parámetro para limitar las descargas).
20 (Cantidad representada en MegaBytes).
allow (permitir/aceptar que el parámetro se cumpla siempre que el
máximo en MB a descargar sea el valor indicado).
desc-limit (Nombre de la Lista de Control de Access[ACL] que matchea).
espero te sea útil,
saludos,
PD: Para quienes no tienen salida al mar, he aqui el contenido del enlace
Squid configuration directive reply_body_max_size
Available in: 3.HEAD 3.5 3.4 3.3 3.2 2.7 3.1 3.0 2.6
History:
Changes in 3.0 reply_body_max_size
Syntax changed:
reply_body_max_size size [acl acl...]
allow/deny no longer used.
Configuration Details:
Option Name: reply_body_max_size
Replaces:
Requires:
Default Value: No limit is applied.
Suggested Config:
This option specifies the maximum size of a reply body. It can be
used to prevent users from downloading very large files, such as
MP3's and movies. When the reply headers are received, the
reply_body_max_size lines are processed, and the first line where
all (if any) listed ACLs are true is used as the maximum body size
for this reply.
This size is checked twice. First when we get the reply headers,
we check the content-length value. If the content length value exists
and is larger than the allowed size, the request is denied and the
user receives an error message that says "the request or reply
is too large." If there is no content-length, and the reply
size exceeds this limit, the client's connection is just closed
and they will receive a partial reply.
WARNING: downstream caches probably can not detect a partial reply
if there is no content-length header, so they will cache
partial responses and give them out as hits. You should NOT
use this option if you have downstream caches.
WARNING: A maximum size smaller than the size of squid's error messages
will cause an infinite loop and crash squid. Ensure that the smallest
non-zero value you use is greater that the maximum header size plus
the size of your largest error page.
If you set this parameter none (the default), there will be
no limit imposed.
Configuration Format is:
reply_body_max_size SIZE UNITS [acl ...]
ie.
reply_body_max_size 10 MB
--
Michael González Medina
Administrador de Red
Centro Nacional de Sanidad Vegetal
--
Este mensaje ha sido analizado por MailScanner
en busca de virus y otros contenidos peligrosos,
y se considera que está limpio.
------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL:
<http://listas.jovenclub.cu/pipermail/gutl-l/attachments/20150305/e5e3019c/attachment.html>
______________________________________________________________________
Lista de correos del Grupo de Usuarios de Tecnologías Libres de Cuba.
Gutl-l@jovenclub.cu
https://listas.jovenclub.cu/cgi-bin/mailman/listinfo/gutl-l