[squid-users] Can I block facebook videos globally?

Amos Jeffries squid3 at treenet.co.nz
Fri Oct 28 07:34:37 UTC 2016


On 28/10/2016 7:35 p.m., Indunil Jayasooriya wrote:
> Hi list,
> 
> 
> Can I block facebook videos globally?
> 

"globally" is relative. If you can define an ACL or set of ACL tests
that match the transactions, you can block them.

> I wrote below acls
> 
> acl deny_rep_mime_flashvideo rep_mime_type video/x-flv
> http_reply_access deny deny_rep_mime_flashvideo

That prevents Squid delivering "x-flv" responses to the clients. Nothing
more. see below ...

> 
> acl facebook_videos dstdomain fbcdn-video-*.akamaihd.net video-*.fbcdn.net
> fbcdn-creative-*.akamaihd.net

Those "*" make the domain names regex (dstdom_regex type) not suitable
for dstdomain lists.

> http_access deny facebook_videos
> 
> 
> It seems like it blocks only a few.
> 
> 
> any idea?
> 
> is it possible with squid ?
> 

That depends on your definition of "globally". You can only control in
Squid that which goes through Squid.

If you block on the request (http_access) the transaction is blocked.

If you block on reply details (http_reply_access) the transactions goes
through anyway, only the response is stopped from reaching the client.
It still happens on the server side and Squid still consumes all or a
lot of the video bandwidth.

Of the browser uses a non-HTTP protocol and/or other WebSocket ports
then Squid has no relevance.

Amos



More information about the squid-users mailing list