我尝试从受控环境访问GCM时遇到问题,该环境将我限制在我可以访问的几个网站上。在这种环境中,我需要指定我可以访问的网站。第一次,我允许https://android.googleapis.com/gcm/send免费访问,但它不起作用。只有当我允许整个http://google *(注意星号)工作正常,但我不能让那种模式。
有人知道GCM访问的所有网站列表,以便在我的防火墙白名单中注册它们吗?
答案 0 :(得分:1)
来自GCM Http Connection server documentation,它声明:
Note: 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.
因此,您需要为5228,5229和5230配置端口。