summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* Don't add non-existent directory to parse history.Karsten Loesing2015-08-20
|
* Change hex strings back to lower-case.Karsten Loesing2015-08-13
| | | | | | Bugfix on 1734d16 where we started using Java's DatatypeConverter class which defaults to upper-case, rather than Apache Commons Codec which returns lower-case strings.
* Remove commons-codec dependency.Karsten Loesing2015-08-05
| | | | | Turns out that Java already comes with default implementations of SHA-1, SHA-256, and Base64 that we can use.
* Minor buffering improvements.leeroy2015-07-12
|
* Prevent blocking after an exception.leeroy2015-07-11
|
* Accept extra-info-digest lines with additional digests.Karsten Loesing2015-05-29
|
* Handle unrecognized crypto blocks in server descriptors.Karsten Loesing2015-05-29
| | | | | This bug was triggered by #16227, but only because that was the first newly introduced crypto block that we don't recognize yet.
* Rename method while it's not in wide use.Karsten Loesing2015-05-29
|
* Add descriptor source to fetch descriptors from CollecTor.Karsten Loesing2015-05-28
| | | | | | Includes some really good suggestions from iwakeh. Implements #16151.
* Update copyright to 2015.Karsten Loesing2015-05-16
|
* Fix blocking in descriptor reader, found by iwakeh.Karsten Loesing2015-01-19
| | | | Fixes #14071.
* Test that we accept any bandwidth history interval.Karsten Loesing2014-12-22
| | | | | | The bandwidth history interval may soon change from 900 seconds to something else. Make sure that this doesn't break the parser. Related to #13838 and 13988.
* Remove circular dependencies between packages.Karsten Loesing2014-09-03
| | | | | | | | | - Use properties to build impl classes in DescriptorSourceFactory. - Move DescriptorParseException out of impl package. For extra backward compatibility, keep a copy of that class in impl, but deprecate it. - Tidy up the build file. Patch by iwakeh. Implements #12868.
* Allow underscore in transport names.Karsten Loesing2014-07-22
| | | | | | Example of a valid line that is now allowed: bridge-ip-transports meek=32,obfs3_websocket=8,websocket=64
* Avoid parsing descriptor contents to Maps.Karsten Loesing2014-06-18
| | | | | | | | | | Extra-info descriptors contain lots of comma-separated key=value lists that we store in SortedMap instances. But those occupy a lot of memory, and it's not certain that we'll ever want to use the contained keys or values. New approach: when parsing a descriptor, use regular expressions to check if lines are valid, and delay parsing into maps until needed.
* Store relay flags more efficiently.Karsten Loesing2014-06-18
|
* Clear sets used to validate at-most-once/exactly-once keywords.Karsten Loesing2014-06-18
| | | | | Related to 5caa384. Similarly, keeping these sets around just wastes heap space.
* Avoid parsing descriptor contents to Lists or Sets.Karsten Loesing2014-06-18
| | | | | | | If we can easily determine the number of List or Set elements, we can as well store their contents in arrays and convert those to List or Set instances when requested. This can save us some memory and doesn't cost much performance.
* Always accept [SP|TAB]+ as delimiter instead of just SP.Karsten Loesing2014-06-17
| | | | Better fix for #12403.
* Add unit tests for 2351cea.Karsten Loesing2014-06-17
|
* Accept [SP|TAB]+ as delimiter in two places.Karsten Loesing2014-06-16
| | | | | | | | | | | | | | There have been at least two relays including an additional SP after their nickname in server and extra-info descriptors. The spec stays vague about whether this is allowed or not, but the directory authorities seem to accept these descriptors just fine. We should also accept these descriptors. We should probably accept [SP|TAB]+ in more places. But right now we're losing data by discarding these descriptors. Let's do the quick fix now and the potentially cleaner fix later. Fixes #12403.
* Store relay flags more efficiently.Karsten Loesing2014-05-28
| | | | | Turns out a TreeSet<String> requires more memory than a String[]. We can put together the TreeSet<String> when we need it.
* Use a single DateFormat per thread and format.Karsten Loesing2014-05-28
| | | | | | DateFormat is not thread-safe, and creating a new instance every time we need one only wastes CPU time. Make sure that there's a single instance per thread and format that the thread can use whenever it wants.
* Clear parsed keywords after verifying them.Karsten Loesing2014-05-28
| | | | No need to keep them around. That's just a waste of heap space.
* Store bandwidth histories more efficiently.Karsten Loesing2014-05-27
| | | | | | | | | We were storing bandwidth histories in TreeMap<Long, Long>() with keys being time in millis and values being bandwidth values. This showed up in profiles. It's far more (memory-)efficient to store bandwidth values in a long[] and put together the TreeMap when the caller requests it. And if the bandwidth history is evaluated exactly once, there should not even be a CPU overhead.
* Make queue size of descriptor reader configurable.Karsten Loesing2014-05-27
| | | | | | | By default, the descriptor reader puts up to 100 parsed descriptor files in a queue in order to hand them out as quickly as possible. But if descriptor files contain hundreds or even thousands of descriptors, that default may be too high. Add a new method to make it configurable.
* Fix encoding problem when parsing multi-descriptor files.Karsten Loesing2014-05-25
| | | | | | | | | | | When we're parsing a descriptor file with potentially more than one descriptor in it, we're converting file contents to String to be able to search for descriptor beginnings using String methods. But we're not passing a character encoding, leaving it up to Java to guess. What we should do is tell it to use "US-ASCII" as encoding, which is sufficient to find keywords marking the beginning of a new descriptor. Fixes #11821.
* Parse micodesc consensuses and microdescriptors.Karsten Loesing2014-01-17
| | | | Required for implementing #2785.
* Fix build errors on Debian systems.Jens-Michael Hoffmann2013-07-31
| | | | | | | | | | | | | | The local lib directory is not used anymore and respective references were removed. The java dependencies are now specified in the build.xml and taken from their installed locations. In addition to git, openjdk-6-jdk and ant the following java packages have to be installed: - libcommons-codec-java - libcommons-compress-java - junit4 Minor tweaks by Karsten Loesing.
* Add tests for published lines containing milliseconds.Karsten Loesing2013-07-18
| | | | | | | | Milliseconds are simply ignored, because SimpleDateFormat only looks at "yyyy-MM-dd HH:mm:ss" and ignores everything after that. Related to #9286 where we discovered that some relays include milliseconds in their descriptors.
* Fast exits read/write more than MAX_INT KiB per day.Karsten Loesing2013-07-08
| | | | | | | | For example, see "other" entry in: exit-kibibytes-read 80=505190490,182=25102395,443=61873906, 6881=47999666,8989=8657674,17173=7910494,21762=9138992, 45682=5154543,50500=6086469,51413=62394452,other=2282907805
* Restrict valid keyword characters to [A-Za-z0-9-]+.Karsten Loesing2013-05-03
| | | | Fixes #8798.
* Support bridge-ip-transports lines in extra-infos.Karsten Loesing2013-04-19
|
* Parse Unmeasured=1 in w lines of consensuses.Karsten Loesing2013-04-09
| | | | Pointed out by atagar.
* guard-tk actually stands for *weighted* time known.Karsten Loesing2013-02-05
|
* Parse the new flag-thresholds line in votes.Karsten Loesing2013-02-05
|
* Add parsing support for ntor-onion-key line.Karsten Loesing2013-01-07
| | | | Spotted by atagar; see #7867.
* Parse ipv6-policy lines in server descriptors.Karsten Loesing2012-12-30
| | | | Spotted by atager in related ticket #7826.
* Add support for parsing bridge-ip-versions lines.Karsten Loesing2012-11-08
|
* Add support for parsing geoip6-db-digest lines.Karsten Loesing2012-11-07
|
* Looks like $fingerprint~nickname is also a valid family line entry.Karsten Loesing2012-11-07
| | | | Support for $fingerprint=nickname was previously added in 6a46f46.
* Allow multiple "m" lines per network status entry.Karsten Loesing2012-09-05
|
* Remove GetTor statistics parsing code.Karsten Loesing2012-08-07
|
* Accept transport lines containing more than just the transport name.Karsten Loesing2012-08-06
| | | | | | | Sanitized bridge descriptors contain transport lines with just the transport name. However, there are now relays including unsanitized transport lines, most likely because of a configuration problem. Don't reject the entire descriptor when encountering those lines.
* Make parse history in descriptor reader more accessible.Karsten Loesing2012-07-21
| | | | | | | | | | | | | | | So far, the only way to prevent files from being parsed repeatedly in distinct runs was to specify a history file that only metrics-lib was supposed to read and write. However, some applications may want to specify the list of files to exclude themselves, or they may want to learn which files have been excluded and which have been parsed. These applications shouldn't be forced to mess with the history file. Add three methods to the descriptor reader for these applications. They should also play nicely together with the history file approach. AFAIK, stem has methods with the same purpose but a slightly different semantic.
* Parse transport lines in bridge extra-infos.Karsten Loesing2012-06-29
|
* We can parse all @type 1.x descriptor versions.Karsten Loesing2012-06-29
|
* Tweak build file a bit.Karsten Loesing2012-06-19
|
* Fix unit tests which were broken in 466725e.Karsten Loesing2012-06-19
|
* Support parsing GetTor statistics files.Karsten Loesing2012-06-01
|