This server should be installed in an Internet accesible network but with a SSL Terminator as a frontend.
Global node will receive HTTP(s) queries to three resources (about, status and wakeup/v1), so any other HTTP query can be securelly filtered.
Instead a common database, a simple configuration file is used to manage the different local networks.
The networks.json configuration field shall be a well formed JSON file.
The contents shall follow this scheme:
{ "<netidname>": { "host": "<local host URL>", "range": "<IP Range or ranges allowed in this network>", "network": "<MCC-MNC pair>", "offline": <true|false> }, ... }
Example:
{ "214-07": { "host": "http://localhost:9000", "range": "10.0.0.0/8", "network": "214-07", "offline": true } }
Due to some limitations in the reference platform (Firefox OS), netid will have the form of an IP address (four numbers between 0 and 255 separated by dots).
Also, if the network where this wakeup platform is installed have only one network, or don't offer netid, or wants to be backward compatible with old versions of the Push platform, it will provide a DEFAULT network for devices that only send a MCC-MNC pair.
The default netid will have the form "MCC-MNC.default", so if your MCC is 214 and your MNC 07, if you provide a network with netid "214-07.default", this will be used for devices that doesn't sent us a netid.
See the network collection info here: Networks collection