Add "hostname" column to index page.
Some clients may miss the hostname column from the old implementation of TorStatus.
Currently, this information is only available on a per-relay basis -- when a client views the detail page for a router. When this page is requested, the hostname is looked up. It'd be nice to have a hostname column in the cache.active_relay
table so that it could be cheaply displayed in the index page. This would also mean that hostnames would not have to be looked up whenever a router detail page is requested.
This should probably be implemented on the database level by keeping a table consisting of an INET
, a TIMESTAMP
, and a CHARACTER VARYING(255)
, with indexes on the INET
and TIMESTAMP
. Then, when the join to create the cache.active_relay
table is performed, we can LEFT JOIN that result with the hostname table on the IP addresses. We'd lookup hostnames whenever a new IP address is added to the table, whenever we have a hostname that more than (interval) old and the IP address is in the active_statusentry table, or an IP address is added to the active_statusentry table that does not exist in the hostname table. We'd delete hostnames that are older than (interval) old.