在不同网络上的计算机之间的HTTP帖子

发布于 2025-02-12 13:57:25 字数 401 浏览 0 评论 0原文

我正在尝试通过HTTP在不同网络上的多台计算机之间发送消息。

从我的理解来看,计算机具有用于其家庭网络的内部IP,以及用于路由器的外部IP。

要将我的HTTP数据包从一台计算机发送到另一台计算机,我认为它至少可以制作三个啤酒花:

  1. 从我的设备到路由器
  2. 从路由器到另一个路由器,并用给定的外部IP
  3. 从该路由器到设备具有给定的内部IP

,也就是鉴于没有任何其他子网。

因此,我的假设是要联系此设备,您需要至少一个IP地址的列表。但是,从我从curlping之类的工具中看到的东西,这不是其工作方式。

我误会了什么,如何将数据包发送到使用curl的设备上?

I'm trying to send messages between multiple computers on different networks via HTTP.

From my understanding, a computer has an internal IP for their home network, and an external IP for their router.

To send my HTTP packet from one computer to another, I assume it makes at least three hops:

  1. From my device to my router
  2. From my router to another router with a given external IP
  3. From that router to the device with a given internal IP

And that's given there aren't any other subnetworks in the way.

My assumption, therefore, is that to contact such a device, you need a list of at least one IP address. But from what I've seen from tools like cURL or ping, that's not how it works.

What am I misunderstanding, and how do I go about sending a packet to such a device with cURL?

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文