Question

I'm working on a project about a streaming server (Linux, Apache, Squid, DHCP) that works on LAN. Clients connect to the server through web browser and watch videos with HTML5. Using HTML5 is very simple, but clients can also download videos easily with right-click menu (or with a browser extension). Is it possible to prevent users from downloading videos with squid proxy server while they can play videos with browser? I tried to block video file downloading (with squid), but with this method HTML5 video won't play either. Squid config for blocking file download that i used:

acl BlockExt url_regex -i \.mp4$    
http_access deny BlockExt all

Thanks.

Was it helpful?

Solution

sadly there is no way to differentiate from the server between a browser requesting the video to play and requesting the video to download.

you could add an annoyance factor by disabling rightclick via javascript (that's only going to stop really basic users) or split the video into multiple fragments and use the ended event to jump to the next piece (potential for buffering delays of course, but for this sample dealing with Audio it's been fairly reliable - https://gist.github.com/1266499)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top