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

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

问题描述

我已经用C#编写了Windows服务,该服务连接到Firebase数据库并存储数据.对于连接和数据库通信,我使用了StepUp Labs,Inc.的NuGet软件包,分别名为"FirebaseAuthentification.net"和"FirebaseDatabase.net".

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的15169的ASN中列出的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天全站免登陆