阻止用户下载视频

发布于 2024-12-10 16:20:59 字数 140 浏览 1 评论 0原文

我有一个网站,用户可以在其中购买软件包并观看视频教程。不幸的是,该 URL 可从 HTML 获得,因此用户可以轻松地从该位置下载。我想阻止用户下载该文件,他应该只能从我的页面观看。

有没有办法在 ASP.NET 中或者通过配置 IIS 来做到这一点?

I have a site where users buy packages and watch video tutorials. Unfortunately that url is available from the HTML, so the user could easily download from that location. I want to prevent the user from downloading that file and he should only be able to watch from my page.

Is there a way to do this in ASP.NET or probably by configuring IIS?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

ζ澈沫 2024-12-17 16:20:59

正如您所发现的,如果您通过 URL 提供视频(或其他任何内容),则该视频将是可下载的。

一种替代方法是创建一个 ASP.NET 页面来检查用户是否正确登录,然后重定向到该文件 - 而不泄露 URL。在没有直接链接的情况下提供视频的其他方法是将其嵌入(或访问它)到 Java 或 Flash 等编译的内容中。

无论您选择哪种解决方案,不泄露 URL(或者首先不让视频可以在互联网上直接访问)都是关键。一旦 URL 可用,就可以轻松下载。

仅供参考,世界上有很多视频捕捉器。即使您确实隐藏了 URL,他们也能够在某种程度上“下载”它。

As you've found, if you make the video (or whatever else) available via a URL, it will be downloadable.

One alternative would be to create an ASP.NET page that checks that the user is correctly signed in and then redirects to the file - without revealing the URL. Other ways of supplying the video without a direct link would be by embedding it (or access to it) in something compiled like Java or Flash.

Whatever solution you might choose, not revealing the URL - or not making the video directly accessible on the Internet in the first place - is going to be the key. Once a URL is available, it is EASILY downloadable.

Just FYI, there are plenty of video capturers out there in the world. Even if you do hide the URL, they will be able to "download" it to some extent.

绝影如岚 2024-12-17 16:20:59

即使您隐藏 URL 或添加令牌查看,也总有一种方法可以使用视频下载器插件下载视频。

Even if you hide the URL, or add token viewing, there is always a way to download the video using video downloader plugins.

抽个烟儿 2024-12-17 16:20:59

这个问题的答案很简单:NO。您无法阻止用户下载您的视频。可以看到您视频的人可以通过使用不同的下载器或直接链接来获取您的视频,如果您尝试通过任何其他方式阻止它,用户可以通过使用某种屏幕捕获软件(如 camstudio 或 getcam 等)窃取视频。

因此你无论如何也做不到。您可以通过一种方式做到这一点,但热链接保护并不准确。保护那些您不希望用户下载的文件扩展名。

希望这有帮助。

The answer to this question is simply NO. you can not prevent your video from user to download it. One who can see your video can get your video by using different downloaders or direct linking, if you'll try to prevent it by any other mean, user can steal video by using some sort of screen capture softwares like camstudio or getcam etc.

Hence you can not do it by anymean. you can do it in one way but it is not accurate that HotLink protection. protecting those file extensions which you don't wish to be downloaded by the user.

Hope this helps.

绝不放开 2024-12-17 16:20:59

在我看来,最好的方法是通过 HTTP 实现基本的访问身份验证。

因此没有人能够访问该视频:

http://www.site.com/video.avi< /a>

访问视频时,系统将提示他们输入用户名和密码。
或者他们可以使用类似的 URl 模式下载它:

http://username:[电子邮件受保护]/video.avi

The best way to do it, in my opinion, is by implementing basic access authentication over HTTP.

So no one would be able to access the video:

http://www.site.com/video.avi

They will be prompted to input their username and password when accessing the video.
Or they can download it using a similar URl pattern to:

http://username:[email protected]/video.avi

你列表最软的妹 2024-12-17 16:20:59

简短的回答,否。

较长的回答,这取决于您的目的,有两种可能性。

如果您想阻止人们将您的视频嵌入到他们的网站中(从而使用您的带宽),则问题与热链接图像的问题类似。这涉及到检查引荐来源网址(但并非所有用户代理都提供)之类的事情。另一种选择是使视频用户的 URL 特定,例如超时的临时 URL、在 URL 中嵌入反 csrf 令牌、检查其是否与 cookie 匹配等。

如果您想阻止用户下载实际视频那么你就不能,请参阅如何防止下载来自我的网站的图像和视频文件?如何阻止用户下载或保存图像?

Short answer, No.

Longer answer, it depend upon your purpose there are 2 possibilities.

If you want to prevent people embedding your videos in their site (thus using your bandwidth) the problem is similar to that of hot linking images. This involves things like, checking the referrer (not all user agents supply one though). Another option is to make the URL for the video user specific, e.g. temporary URL that times out, embed an anti-csrf token in the URL, check this matches a cookie, etc.

If you want to prevent downloading the actual video by a user then you can't, see How to prevent downloading images and video files from my website? and How to prevent user from downloading or saving an image?.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文