必须打开哪些端口才能与 Firebase 数据库通信(不是 FCM 消息传递)?

Which ports have to be open to communicate with Firebase Database (not FCM messaging)?

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

在我的测试系统上,一切正常。在客户的系统上,存在 firewall/procy 拒绝通信的限制。我们已经打开了 443 端口并且可以发送请求,但是没有得到响应。

旧的 GCM 文档说:

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 文档或网络中的其他任何地方找到任何内容。

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

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

数据库通信尽可能使用端口 443 上的 Web 套接字。您可能想检查防火墙是否做了一些专门阻止网络套接字的事情。