两个任意源之间的文件/数据传输

发布于 2024-09-18 17:40:30 字数 279 浏览 8 评论 0原文

我正在寻找一种简单的方法来实现这种情况:

假设我有两台机器,我想在它们之间共享数据。这些机器的位置/地址可以随时更改。我希望两台机器都能签入中央服务器以宣布它们的可用性。两个系统之一想要从另一个系统中提取文件。我知道我可以让接收器系统向服务器发出请求,然后服务器从源请求文件,拉出它,然后将其提供给请求者。然而,从带宽的角度来看,这似乎效率低下。文件将被传输两次。是否有一个系统可以让源将其直接广播到接收器?

如果系统位于防火墙后面,则无法保证诸如端口转发之类的事情。我不知道有什么办法。

谢谢。

I'm looking for a simple way to implement this scenario:

Say I have two machines I'd like to share data between. The location/addresses of these machines can change at any time. I'd like both machines to check in to a central server to announce their availability. One of the two systems wants to pull a file from the other. I know that I can have the sink system make a request to the server, who then requests the file from the source, pulls it, then feeds it to the requester. However, this seems inefficient from a bandwidth perspective. The file will be transfered twice. Is there a system in place where the source can broadcast it directly to the sink?

Without being able to guarantee things like port forwarding if a system is behind a firewall etc. I don't know of a way.

Thanks.

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

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

发布评论

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

评论(1

自由如风 2024-09-25 17:40:30

当机器A想要向机器B发送数据时,A向中央服务器C发送请求。 CB 请求许可。如果接受,C 会将 B 的 IP 和端口提供给 AA 尝试直接连接到 B。如果不成功(即,如果B位于路由器/防火墙后面),则A会通知C失败。然后,CA 的IP 和端口提供给BB 尝试直接连接到 A(应该能够通过 B 的防火墙/路由器)。如果任一连接成功,则 A 具有直接连接以将数据发送到 B。如果两个连接均不成功(即,如果 A 也位于防火墙/路由器后面),则 C 必须充当 A< 之间所有传输的代理。 /code> 和 B

When machine A wants to send data to machine B, A sends a request to the central server C. C asks B for permission. If accepted, C gives B's IP and port to A. A attempts to connect to B directly. If unsuccessful (ie, if B is behind a router/firewall), then A notifies C of the failure. C then gives A's IP and port to B. B attempts to connect directly to A (which should be able to pass through B's firewall/router). If either connection is successful, then A has a direct connection to send data to B. If both connections are unsuccessful (ie, if A is also behind a firewall/router), then C has to act as a proxy for all transfers between A and B.

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