在不同网络上的计算机之间的HTTP帖子
我正在尝试通过HTTP在不同网络上的多台计算机之间发送消息。
从我的理解来看,计算机具有用于其家庭网络的内部IP,以及用于路由器的外部IP。
要将我的HTTP数据包从一台计算机发送到另一台计算机,我认为它至少可以制作三个啤酒花:
- 从我的设备到路由器
- 从路由器到另一个路由器,并用给定的外部IP
- 从该路由器到设备具有给定的内部IP
,也就是鉴于没有任何其他子网。
因此,我的假设是要联系此设备,您需要至少一个IP地址的列表。但是,从我从curl
或ping
之类的工具中看到的东西,这不是其工作方式。
我误会了什么,如何将数据包发送到使用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:
- From my device to my router
- From my router to another router with a given external IP
- 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论