Add hostnames and geoip to connection panel
Many releases ago Nyx showed hostnames on the connection panel, but dropped this because it leaked our connections to our DNS provider. We can still get this information, but it must be on every relay or none at all.
Turns out Onionoo already supports exactly what we want! In particular here's the query we want...
Note that Onionoo supports gzip compression and we want to take advantage since it drops the size of our replies from 1.5 MB to 432.6 KB.
For this we want a new Daemon subclass in tracker.py. This class would have a single relay_details(fingerprint) method that returns a struct with these attributes. If we meet the following two constraints then it calls Onionoo to update our cache...
- We make a request for a fingerprint the cache doesn't have.
- It's been over an hour since the relays_published date in our last reply (like the consensus Onionoo updates hourly, so no point in requesting more frequently).
Note that we might not want all of these geoip fields (we'll need to fiddle with the panel to see what is nice to have).