Commit Graph

480 Commits

Author SHA1 Message Date
Karsten Loesing
d8c21b3cf8 Skip lines in server descriptors starting with @. 2012-01-08 16:53:14 +01:00
Karsten Loesing
055e8fde32 The bool in hibernating lines is 0/1, not false/true. 2012-01-08 16:49:03 +01:00
Karsten Loesing
a42848728f Also accept lower-case hex fingerprints. 2012-01-08 16:45:45 +01:00
Karsten Loesing
220bda35fd Update copyright lines to 2012. 2012-01-02 17:43:43 +01:00
Karsten Loesing
908612803a Start implementing extra-info descriptor parsing. 2012-01-02 17:37:34 +01:00
Karsten Loesing
aecdb0f72e Implement parsing relay server descriptors. 2012-01-02 14:37:30 +01:00
Karsten Loesing
f3e72d2f65 Implement a minimal relay descriptor reader. 2011-12-16 12:57:45 +01:00
Karsten Loesing
c2dac40a03 Improve vote parsing and unit tests. 2011-12-16 12:56:23 +01:00
Karsten Loesing
15ddbf715c Add a real fix for the 682f6e0 bug. 2011-12-16 09:31:58 +01:00
Karsten Loesing
c188815a26 Include the 682f6e0 bug in the unit tests.
The bug was that we considered "\nr" as the beginning of a status entry.
However, there are crypto lines starting with "r", so we need to look for
"\nr ".  Now there are crypto lines starting with "r" in the unit tests.
Doesn't fix the problem, but helps discover it in the future.  Fix comes
next.
2011-12-16 09:23:59 +01:00
Karsten Loesing
9acd48f52e Throw out Java's BlockingQueue implementation.
The problem is that Java's BlockingQueue implementation doesn't support
end-of-stream objects to signal that the producer won't add more objects
to the queue.  We need to implement that ourselves, and it turns out it's
harder than expected to get it right.  We can just implement our own
thread handling.
2011-12-16 08:57:54 +01:00
Karsten Loesing
682f6e0d9e Fix a bug in the network status parser. 2011-12-15 21:46:51 +01:00
Karsten Loesing
57bd584c64 Fix a bug in the vote parser. 2011-12-15 21:30:00 +01:00
Karsten Loesing
cb9c62a90e Make votes use the general network-status parsing code. 2011-12-15 20:45:42 +01:00
Karsten Loesing
da64a02757 Skip all crypto parts when counting keywords. 2011-12-15 15:37:12 +01:00
Karsten Loesing
a7e7c7f527 Make an abstract network status parser class.
This will allow us to parse v3 consensuses, v3 votes, v3 microdesc
consensuses, v2 statuses, and sanitized bridge network statuses without
duplicating too much code.  v1 directories are too different, though.
2011-12-15 15:28:30 +01:00
Karsten Loesing
0c889f5140 Don't attempt to sort Tor versions alphanumerically.
Spotted by Sebastian.
2011-12-15 09:29:42 +01:00
Karsten Loesing
cb3934aa8c Make the vote and consensus interfaces more similar. 2011-12-15 09:18:57 +01:00
Karsten Loesing
228d6564f8 Make consensus parsing a lot more robust. 2011-12-14 19:17:26 +01:00
Karsten Loesing
358b92b019 Remove executable bit from many files. 2011-12-13 20:44:51 +01:00
Karsten Loesing
1f59be94b0 Add a LICENSE. 2011-12-13 20:42:01 +01:00
Karsten Loesing
703ba95627 Add unit tests for parsing consensuses.
The parser doesn't detect many problems yet.  Most of the unit tests check
for the absence of exceptions when they really should test for the
exceptions.  This is more like a TODO list for making the parser better.
2011-12-13 20:39:33 +01:00
Karsten Loesing
d17812139a Distinguish between not recommending anything and recommending nothing. 2011-12-13 12:47:24 +01:00
Karsten Loesing
276e0ef72a Implement parsing of network status votes. 2011-12-13 10:17:34 +01:00
Karsten Loesing
34f4820ac3 Add a work-in-progress note to the README. 2011-12-12 19:15:24 +01:00
Karsten Loesing
b656101ecc Don't forget to set the request timeout value. 2011-12-12 14:42:46 +01:00
Karsten Loesing
c76a017e36 Implement downloading consensuses and votes.
The functionality implemented so far is sufficient to do the downloading
for the consensus-health checker.  It does not, however, implement the
necessary parsing for the consensus-health checker yet.
2011-12-12 11:27:45 +01:00
Karsten Loesing
b3880383ab Switch from descriptor store to an iterator pattern.
Suggested by Damian.
2011-12-10 14:38:01 +01:00
Karsten Loesing
2120e93b7a Update the README based on Damian's comment. 2011-12-05 20:35:48 +01:00
Karsten Loesing
19b192ecf2 Add an initial, non-functional version of the API. 2011-12-05 08:27:50 +01:00