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 #17701 (moved)), i.e.
ExitNode D41C2006D7C461BDC22B9D236CC93F5D366C1388 Published 2015-12-11 12:28:41 LastStatus 2015-12-11 13:02:32 ExitAddress 18.104.22.168 2015-12-10 19:10:50 ExitAddress 22.214.171.124 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?