问题
I need to stream a video which is present on server say xyz.com. If I access the correct path of the video everyone is able to see that video. What I need to do is that create a MD5sum corresponding to the every particular video which has an unique video id.
So that from now onwards if the user is accessing the video as before ie :
it should not load for the below.
http:/xyz.com/video.mp4
It should load only for the following url
http:/xyz.com/video.mp4?md5=202cb962ac59075b964b07152d234b70
Any suggestions?
回答1:
I think you would be better using a scripting language such as php for this. However if you are adamant on doing it inside of lighttpd you can do this with mod_magnet using lua.
http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModMagnet
回答2:
Lighttpd also offers a module called "SECDownload", it is very easy to install. It enables you to make a url available for a limited time.
Tutorial is here: http://redmine.lighttpd.net/projects/1/wiki/Docs_ModSecDownload
This only creates a temporary link, the url is not limited to a IP. If one url is created, every user may access it (at least if you don't do anything to prevent this).
来源:https://stackoverflow.com/questions/11310917/how-to-assure-security-for-a-video-streaming-using-lighttpd