必须打开哪些端口才能与 Firebase 数据库通信(不是 FCM 消息传递)? [英] Which ports have to be open to communicate with Firebase Database (not FCM messaging)?

查看:21
本文介绍了必须打开哪些端口才能与 Firebase 数据库通信(不是 FCM 消息传递)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用 C# 编写了一个 Windows 服务,它连接到 Firebase 数据库并存储数据.对于连接和数据库通信,我使用了名为FirebaseAuthentification.net"和FirebaseDatabase.net"的 NuGet 包,均由 StepUp Labs, Inc. 提供.

I have written a Windows service in C# which connects to the Firebase Database and stores data. For connection and database communication, I use a NuGet Packages called "FirebaseAuthentification.net" and "FirebaseDatabase.net", both by StepUp Labs, Inc.

在我的测试系统上,一切正常.在客户的系统上,存在拒绝通信的防火墙/procy 限制.我们已经打开了 443 端口,可以发送请求,但是没有收到回复.

On my test system, everything works fine. On the customer's system, there are firewall/procy restrictions which deny communication. We already opened Port 443 and are able to send a request, but the answer does not arrive.

旧 GCM 文档说:

如果您的组织有防火墙限制进出 Internet 的流量,您需要将其配置为允许与 GCM 连接,以便您的 GCM 客户端应用接收消息.要打开的端口是:5228、5229 和 5230.GCM 通常只使用 5228,但有时会使用 5229 和 5230.GCM 不提供特定 IP,因此您应该允许防火墙接受到包含的所有 IP 地址的传出连接在 Google 的 ASN 15169 中列出的 IP 块中.

If your organization has a firewall that restricts the traffic to or from the Internet, you need to configure it to allow connectivity with GCM in order for your GCM client apps to receive messages. The ports to open are: 5228, 5229, and 5230. GCM typically only uses 5228, but it sometimes uses 5229 and 5230. GCM doesn't provide specific IPs, so you should allow your firewall to accept outgoing connections to all IP addresses contained in the IP blocks listed in Google's ASN of 15169.

但消息传递不是数据库身份验证.我在 firebase 文档或网络中的其他任何地方都没有找到任何内容.

But Messaging is not Database Authentification. I did not find anything in the firebase docs or anywhere else in the net.

我必须打开哪些端口才能使连接正常工作?

Which Ports do I have to open in order to make the Connection work?

推荐答案

Firebase 身份验证和 Firebase 实时数据库都使用 HTTPS 在客户端和服务器之间进行通信.这意味着所有通信都通过端口 443.

Firebase Authentication and the Firebase Realtime Database both use HTTPS to communicate between the client and the server. This means that all communication goes over port 443.

数据库通信尽可能使用端口 443 上的 Web 套接字.您可能需要检查防火墙是否会专门阻止 Web 套接字.

The database communication uses web sockets over port 443 when possible. You might want to check if the firewall does something to specifically block web sockets.

这篇关于必须打开哪些端口才能与 Firebase 数据库通信(不是 FCM 消息传递)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆