Files
nym/explorer-api
Mark Sinclair 4ac95ad8cf Explorer API - add port check and node description/stats proxy (#731)
* 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
2021-08-10 15:27:17 +01:00
..
2021-08-04 12:38:35 +01:00
2021-08-04 12:38:35 +01:00
2021-08-04 12:38:35 +01:00

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