adapt metrics-lib to actual tordnsel format
Currently metrics-lib only reads tordnsel descriptors that contain exactly one ExitAddress entry. This does not reflect the torperf data, which can contain several ExitAddress entries TorDNSEL description (see also legacy/trac#17701 (moved)), i.e.
ExitNode D41C2006D7C461BDC22B9D236CC93F5D366C1388
Published 2015-12-11 12:28:41
LastStatus 2015-12-11 13:02:32
ExitAddress 37.48.65.71 2015-12-10 19:10:50
ExitAddress 37.48.74.44 2015-12-11 13:06:36
=== solution metrics-libs should process tordnsel descriptors with an arbitrary count (but finite ;-) of ExitAddress lines.
(I could only find entries with one and two ExitAddress lines, but there is no limit stated in the spec.)
=== proposed changes The interface needs to be changed: I suggest that the current getExitAddress is marked deprecated and returns one of the addresses read for backward compatibility
/**
* Return one IP address that was determined in the scan.
* @deprecated use getExitAddresses()
*/
public String getExitAddress();
In addition, a new method should be added
/* Return the IP addresses that were determined in the scan. */
public List<String> getExitAddresses();
Is this ok? Should anything be added or changed?