Re: [squid-users] how to use adaptation_service_chain ?

From: David Touzeau <david_at_touzeau.eu>
Date: Fri, 27 Aug 2010 14:34:31 +0200

On 27/08/2010 13:41, David Touzeau wrote:
> Dear
>
> I'm using squid 3.1.4
>
> i would like to use 2 AV ICAP services chains but i did not really
> understand how to use adaptation_service_chain
>
> here it is my config
>
> # --------- ICAP Services.(2 service(s))
>
> icap_enable on
> icap_preview_enable off
> icap_preview_size 128
> icap_send_client_ip on
> icap_send_client_username on
> icap_client_username_header X-Authenticated-User
> icap_client_username_encode on
>
> # Kaspersky For Proxy server:
> # --------- icap_service KASPERSKY mode 3.1.1
>
> icap_service is_kav_resp respmod_precache 0
> icap://127.0.0.1:1344/av/respmod
> icap_service is_kav_req reqmod_precache 0 icap://127.0.0.1:1344/av/reqmod
>
> # --------- adaptation
>
> adaptation_access is_kav_req allow all
> adaptation_access is_kav_resp allow all
> adaptation_service_set class_kavAV service is_kav_resp
>
> # C-ICAP:
> # --------- icap_service C-ICAP mode 3.1.x
> acl MULTIMEDIA rep_mime_type -i
> ^(audio\/x-mpegurl|audio\/mpeg|video\/flv|video\/x-flv|application\/x-shockwave-flash|audio\/ogg|video\/ogg|application\/ogg)$
>
> icap_service service_antivir respmod_precache 1
> icap://127.0.0.1:1344/srv_clamav
>
> adaptation_service_set class_antivirus service_antivir
> adaptation_access class_antivirus deny MULTIMEDIA
> adaptation_access class_antivirus allow all
>
>
> does the directive
>
> adaptation_service_chain class_kavAV class_antivirus
>
> is the right one in order to set Kaspersky has the first av and C-ICAP
> has the second ?
>
> Best regards
>
>
>
>
>

dear

i have set this :

# --------- ICAP Services.(2 service(s))

# Kaspersky For Proxy server:
# --------- icap_service KASPERSKY mode 3.1.1

icap_service is_kav_resp respmod_precache 0 icap://127.0.0.1:1344/av/respmod
icap_service is_kav_req reqmod_precache 0 icap://127.0.0.1:1344/av/reqmod

# --------- adaptation

adaptation_access is_kav_req allow all
adaptation_access is_kav_resp allow all
adaptation_service_set class_kavAV service is_kav_resp

# C-ICAP:
# --------- icap_service C-ICAP mode 3.1.x
acl MULTIMEDIA rep_mime_type -i
^(audio\/x-mpegurl|audio\/mpeg|video\/flv|video\/x-flv|application\/x-shockwave-flash|audio\/ogg|video\/ogg|application\/ogg)$
icap_service service_url_check reqmod_precache 1
icap://127.0.0.1:1345/url_check
adaptation_service_set class_url_check service_url_check
adaptation_access class_url_check allow all

icap_service service_antivir respmod_precache 1
icap://127.0.0.1:1345/srv_clamav

adaptation_service_set class_antivirus service_antivir
adaptation_access class_antivirus deny MULTIMEDIA
adaptation_access class_antivirus allow all

icap_enable on
icap_preview_enable off
icap_preview_size 128
icap_service_failure_limit -1
icap_send_client_ip on
icap_send_client_username on
icap_client_username_header X-Authenticated-User
icap_client_username_encode on

#chains classes
adaptation_service_chain class_antivirus class_kavAV

but it seems that squid sends only object to the first ICAP service has
mentioned adaptation_service_chain force to use the
icap://127.0.0.1:1345 first not the icap://127.0.0.1:1344 ??

here it is a piece of logs :

1282911893.897 0 - -/200 300 OPTIONS
icap://127.0.0.1:1344/av/reqmod - -/127.0.0.1 -
1282911915.961 0 192.168.1.240 -/204 138 REQMOD
icap://127.0.0.1:1344/av/reqmod - -/127.0.0.1 -
1282911915.968 3 192.168.1.240 -/204 138 RESPMOD
icap://127.0.0.1:1344/av/respmod - -/127.0.0.1 -
1282911930.805 0 - -/200 301 OPTIONS
icap://127.0.0.1:1344/av/respmod - -/127.0.0.1 -
1282911941.443 0 debian.proxy.biz -/204 138 REQMOD
icap://127.0.0.1:1344/av/reqmod - -/127.0.0.1 -
1282911941.445 0 debian.proxy.biz -/204 138 REQMOD
icap://127.0.0.1:1344/av/reqmod - -/127.0.0.1 -
1282911941.446 0 debian.proxy.biz -/204 138 REQMOD
icap://127.0.0.1:1344/av/reqmod - -/127.0.0.1 -
1282911941.447 0 debian.proxy.biz -/204 138 REQMOD
icap://127.0.0.1:1344/av/reqmod - -/127.0.0.1 -
1282911941.448 0 debian.proxy.biz -/204 138 REQMOD
icap://127.0.0.1:1344/av/reqmod - -/127.0.0.1 -
1282911941.448 0 debian.proxy.biz -/204 138 REQMOD
icap://127.0.0.1:1344/av/reqmod - -/127.0.0.1 -
1282911946.173 0 192.168.1.240 -/204 138 REQMOD
icap://127.0.0.1:1344/av/reqmod - -/127.0.0.1 -
1282911946.180 3 192.168.1.240 -/204 138 RESPMOD
icap://127.0.0.1:1344/av/respmod - -/127.0.0.1 -
1282911975.972 0 192.168.1.240 -/204 138 REQMOD
icap://127.0.0.1:1344/av/reqmod - -/127.0.0.1 -
1282911975.979 3 192.168.1.240 -/204 138 RESPMOD
icap://127.0.0.1:1344/av/respmod - -/127.0.0.1 -

where i'm wrong ?

best regards
Received on Fri Aug 27 2010 - 12:34:37 MDT

This archive was generated by hypermail 2.2.0 : Fri Aug 27 2010 - 12:00:03 MDT