Parse API Push Notifications (parse.com/GCM) URLs,

2019-09-10 19:38发布

问题:

I am using Parse API for pushing notifications in my Android app without problem.

The app should work without internet in my HotSpot network. So I need to open URLs, Maybe Ports or even protocols in my HotSpot network to allow the app to push its notifications.

I open these URLs without success:

*.apis.google.com
*.googleapis.com
*.parse.com

The fiddler is not showing anything useful. I guess that it may use another protocol instead of HTTP.

I want to know which URLs, IPs, protocols and or ports is used for Parse API to work and send its notifications?

If I'm not wrong, the Parse is using Google Cloud Messaging to push its notifications. But I don't know the GCM URLs either.

Any help would be appreciated

回答1:

In summary, opening these IPs/domains is not going to be sufficient.

The device accesses the GCM servers on ports 5228-5230.

Note: 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.

Here is the link to the relevant GCM documentation: https://developers.google.com/cloud-messaging/http

Latest Android versions fallback on port 443 in the absence of access to these ports.