4ac95ad8cf
* explorer-api: move mix node client operations into a package * explorer-api: add port test for mixnodes with cache for results * explorer-api: add `humantime-serde` dependency * explorer-api: mix node API proxy This fixes mixed-content responses when using the mix node API from the network explorer. An in-memory cache protects the explorer API from over-querying the http API on the mix node. * explorer-api: adjust naming * explorer-api: fix up self refs * explorer-api: add method to state to get a mix node by identity key * explorer-api: add cached http resource to proxy the `/description` and `/stats` http api resources to allow the network explorer do https requests for the mix node api resource avoid mixed content requests * explorer-api: set default mix node cache time to 30 minutes * explorer-api: make clippy happy * explorer-api: add CORS with wide open configuration * explorer-api: fixes from review feedback * explorer-api: move port check test into separate function * explorer-api: use `rocket-cors` that is pinned in the `validator-api` and remove custom CORS handler
Network Explorer API
An API that can:
- calculate how many nodes are in which country, by checking the IPs of all nodes against an external service
- serve "hello world" via HTTP
TODO:
- record the number of mixnodes on a given date and write to a file for later retrieval
- store the nodes per country state in a variable
- grab mixnode description info via reqwest and serve it (avoid mixed-content errors)
- serve it all over http
- dependency injection
- tests