我需要这些信息,以便我们的网络团队可以打开UAT环境的防火墙端口以进行UAT测试.
我试图从developer.android.com/google/gcm/查找,但没有运气.
我们的网络团队拒绝打开所有ip范围从asn 15169这是一个相当巨大的名单.
解决方法
在有关why GCM is not giving push notification in android device?问题的评论中,有人提到他打开了端口5258,29,30,然后他能够从防火墙后面的GCM服务器接收到该标识.
另外我认为@ Eran Which port and protocol does Google Cloud Messaging (GCM) use?的答案将会有所帮助.它说:
The device accesses the GCM servers on ports 5228-5230. If your organization has a firewall that restricts the traffic to or from the Internet,you’ll need to configure it to allow connectivity with GCM. 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. It changes IPs frequently. We recommend against using ACLs but if you must use them,take a broad approach such as the method suggested in this support link.
如果您的设备通过WiFi连接到互联网,这是相关的.
希望这有帮助.
更新:
根据Mark Whitaker对类似问题here的回答,他提到:
Newer versions of Android also fall back to port 443 if ports 5228-5230 are blocked by a firewall.
虽然似乎还没有正式的名单.