基本 P2P / 端口 / 安全问题
我正在构建一个应用程序,允许用户从他们的家用计算机流式传输视频。
在哪里可以找到有关如何使广播公司本地网络之外的用户可以访问此流的更多信息?
假设我正在从 192.168.0.1:8080/video.mpg 广播视频,
我知道如果我将端口转发设置到广播计算机,我就可以将人们定向到我的外部 IP:8080/video.mpg,并且它会从我的电脑。
但是,P2P 下载应用程序和远程桌面应用程序等如何允许直接访问用户的计算机,而不会让用户遇到端口转发等麻烦?
希望我说得足够清楚 - 如果您需要任何说明,请告诉我:)
Lewis
I'm building an app that allows a user to stream a video from their home computer.
Where can I find more information about how I can make this stream accessible to users outside of the broadcaster's local network?
Let's say I'm broadcasting the video from 192.168.0.1:8080/video.mpg
I know that if I setup port forwarding to the broadcasting computer I could then direct people to my external IP:8080/video.mpg and it would stream from my computer.
But how do things like P2P downloading apps and remote desktop applications allow direct access to a user's computer without making the user hassle with port forwarding, etc..?
Hopefully I'm being clear enough - let me know if you need any clarification :)
Lewis
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
除非您正在编写用于访问视频流的协议,否则您想要做的事情是不可能的。有一些技术可以允许 P2P 网络通过 NAT 工作(例如打洞:http:// /www.brynosaurus.com/pub/net/p2pnat/),但它们的使用要求您编写两端使用的协议。
你所做的不是 P2P,而是客户端/服务器,而且看起来你希望人们能够使用浏览器观看视频。由于 HTTP 协议不在您的控制范围内,因此您可以在 NAT 网关后面执行此操作,而不是使用端口转发。
对不起。
What you want to do is not possible unless you are writing the protocol being used to access the video stream. There are techniques available to allow P2P networks to work through NAT (for example hole-punching: http://www.brynosaurus.com/pub/net/p2pnat/) but their use requires you to write the protocol in use at both ends.
What you're doing is not P2P it's client/server, and it looks like you want people to be able to see the video using a browser. Since the HTTP protocol is not within your control, you can's do this behind a NAT gateway other than by using port-forwarding.
Sorry.