Please help to click 1!

Tuesday 19 June 2012

Squid : Block Youtube and Media Streams


Warning: Any example presented here is provided "as-is" with no support or guarantee of suitability
Media Streams come in many types. Most commonly used are Audio, Video, or Audio-Visual Streaming.
It's hard to separate the stream types by application so the config below includes all the known streams and simply comments the commonly known ones where possible.


## The videos come from several domains
acl youtube_domains dstdomain .youtube.com .googlevideo.com .ytimg.com
 
http_access deny youtube_domains



# Media Streams


## MediaPlayer MMS Protocol
acl media rep_mime_type mms
acl mediapr url_regex dvrplayer mediastream ^mms://
## (Squid does not yet handle the URI as a known proto type.)


## Active Stream Format (Windows Media Player)
acl media rep_mime_type x-ms-asf
acl mediapr urlpath_regex \.(afx|asf)(\?.*)?$


## Flash Video Format
acl media rep_mime_type video/flv video/x-flv
acl mediapr urlpath_regex \.flv(\?.*)?$


## Flash General Media Scripts (Animation)
acl media rep_mime_type application/x-shockwave-flash
acl mediapr urlpath_regex \.swf(\?.*)?$


## Others currently unknown
acl media rep_mime_type ms-hdr
acl media rep_mime_type x-fcs


http_access deny mediapr
http_reply_access deny media

No comments:

Post a Comment