使用AWS放大时,如何获得主机IP

发布于 2025-02-03 20:50:01 字数 137 浏览 4 评论 0原文

我制作了一个React Web应用程序,并使用AWS放大了它。除了托管网站外,主机还运行PEERJS服务器,以便客户端可以使用对等连接。问题在于,为了使对等式连接到PEERJS服务器,它需要服务器正在运行的IP地址。

那么如何获得主机的IP地址?

I made a React web app and deployed it using AWS Amplify. In addition to hosting the website the host is also running a peerjs server so that the clients can use peer-to-peer connection. The problem is that in order for a peer to connect to the peerjs server it needs the IP address that the server is running on.

So how can I get the host's IP address?

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

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

发布评论

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