darold / squidclamav

SquidClamAv is a dedicated ClamAV antivirus redirector for Squid. It can run antivirus checks based on filename regex, content-type regex, and more. It is easy to install and works even with heavy Squid access.
http://squidclamav.darold.net/
Other
55 stars 32 forks source link

slow start download (file without virus) #40

Closed 9acca9 closed 6 years ago

9acca9 commented 7 years ago

Hi, again. Well i installed squidclamav, c-icap, and clamav; and its working all fine, but... the download is too slow, the download of a file. There is a way to accelerate this?? Also, when the file its a virus, the message "this is a virus bla bla", go fast... i mean the slow download its for all the other files that dosent have a virus...

This is squid.conf


icap_enable on 
icap_send_client_ip on 
icap_send_client_username on 
icap_client_username_header X-Authenticated-User 
icap_preview_enable on 
icap_preview_size 1024 
icap_service service_req reqmod_precache bypass=1 icap://127.0.0.1:1344/squidclamav 
adaptation_access service_req allow all 
icap_service service_resp respmod_precache bypass=1 icap://127.0.0.1:1344/squidclamav 
adaptation_access service_resp allow all 

c-icap.conf


PidFile /var/run/c-icap.pid 
CommandsSocket /var/run/c-icap.ctl 
StartServers 1 
MaxServers 20 
MaxRequestsPerChild  100 
Port 1344 
ServerAdmin yourname@yourdomain 
TmpDir /tmp 
MaxMemObject 131072 
DebugLevel 0 
ModulesDir /usr/local/c-icap/lib/c_icap/ 
ServicesDir /usr/local/c-icap/lib/c_icap/ 
LoadMagicFile /usr/local/etc/c-icap.magic 

acl localhost src 127.0.0.1/255.255.255.255 
acl PERMIT_REQUESTS type REQMOD RESPMOD 
icap_access allow localhost PERMIT_REQUESTS 
icap_access deny all 

ServerLog /var/log/c-icap/server.log 
AccessLog /var/log/c-icap/access.log 

Service squidclamav squidclamav.so 

CLAMD.CONF

LogFile /var/log/clamd.scan 
PidFile /var/run/clamd.scan/clamd.pid 
TemporaryDirectory /var/tmp 
DatabaseDirectory /var/lib/clamav 
LocalSocket /var/run/clamd.scan/clamd.sock 
TCPSocket 3310 
TCPAddr 127.0.0.1 
User clamscan 

SQUIDCLAMAV.CONF


maxsize 5000000 
redirect http://squid.xxxxxxxxxxxxx.lan/cgi-bin/clwarn.cgi.en_EN
clamd_ip 127.0.0.1 
clamd_port 3310 
trust_cache 0 
timeout 1 
logredir 1 
dnslookup 0 
safebrowsing 0 

abortcontent ^video\/x-flv$ 
abortcontent ^video\/mp4$ 
# White list some sites 

Somebody can give me a hand with this??? Thanks to all.

pd.:there is some way to exclude some users or ip of the "antivirus"??

darold commented 7 years ago

To find a way to exclude some users or ip of the "antivirus" see 'trustuser' and 'trustclient' configuration directives.