直接文件传输是否要求其中一方拥有可公开访问的 IP?
我正在构建一个直接文件传输工具,用于在两个用户之间共享文件。
为了建立这种连接,他们中的任何一个都必须拥有可公开访问的 IP 吗?
如果我使用中间服务器,所有流量都应该经过它,还是它可以帮助各方以某种方式建立连接,并且其余的传输过程将直接在它们之间进行?
谢谢!
I'm building a direct file transfer tool for sharing files between two users.
Is it an absolute requirement for any of them to have a publicly accessible IP in order to establish such connection?
In case I go with an intermediary server, should all traffic go through it, or can it help parties to establish a connection somehow, and the rest of transfer process will be made between them directly?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不,事实并非如此——但如果他们这样做的话就更可靠了。
然而,他们仍然需要某种中介才能首先找到对方。一旦发生这种情况,您可以使用 NAT 打洞 建立直接连接。
No, it's not - but it's more reliable if they do.
However, they will still need an intermediary of some kind in order to find each other in the first place. Once that's happened, you can use NAT hole-punching to establish a direct connection.