| Commit message (Collapse) | Author | Age |
| | |
|
| |
|
|
| |
Spotted by Sebastian.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Without specifying a file encoding, Java uses the system default, which
may be UTF-8 on Linux systems. But MaxMind's files all use ISO-8859-1.
The effect is that our details files may contain incorrect lines like:
"as_name":"Servi\uFFFDos de Comunica\uFFFD\uFFFDo S.A.",
which should be:
"as_name":"Servi\u00C1os de Comunica\u00C1\u201Eo S.A.",
|
| | |
|
| |
|
|
|
|
|
| |
In particular, if our data is more than 6 hours old, respond with 500
Internal Server Error to all requests, because someone should investigate
the problem. That's much better than serving stale data and either nobody
noticing or relying on clients to check timestamps.
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Implements #5255.
|
| |
|
|
|
| |
"Things you find in server logs when you're looking for something entirely
unrelated."
|
| | |
|
| | |
|
| |
|
|
|
| |
Instead, store advertised bandwidths in weights status files. Prepares
using a parse history for server descriptors.
|
| |
|
|
|
|
|
| |
Instead of parsing all server descriptors of the past 72 hours, we now
cache the most recent server descriptor parts for details documents.
Same applies to bridge pool assignments. Prepares using a parse history
for server descriptors.
|
| |
|
|
|
| |
There was a bug in one of the previous commits which made us write NaN
values to weights status files. Remove those lines when reading files.
|
| | |
|
| | |
|
| |
|
|
|
| |
So far, we parsed the empty string as single flag called "". This is a
bug. We need to omit the "flags" field in this case.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
We say that a bridge is "running" if it's contained in the bridge network
status, but it also needs the "Running" flag.
This worked fine for relays, because only running relays are contained in
the consensus, but bridge network statuses may contain non-running
bridges.
We should require the "Running" flag for both relays and bridges, just in
case we fall back to a consensus method that contains non-running relays.
Fixes #9198.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Introduce a new document type hierarchy for internal text-based status
documents (*Status) and JSON-formatted output documents (*Document).
Prepares moving all formatting and parsing code to DocumentStore or
Document subtypes, so that *Writer classes won't have to worry about
document formats anymore.
- Rename Node to NodeStatus and make it handle its own formatting and
parsing. DocumentStore now returns NodeStatus objects instead of one
large summary status documents containing all nodes. Prepares moving to
a database design where each NodeStatus object will have its own
database entry. DocumentStore still reads and writes a single summary
status document, so that file formats don't change, but keeps a local
NodeStatus cache in memory and writes this file to disk before exiting.
- Don't share CurrentNodes code between back-end and front-end. Move
back-end-only functionality to new NodeDataWriter and front-end-only
functionality to ResourceServlet.
- Rename DetailDataWriter to DetailsDataWriter for consistency with other
document types.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Add new DescriptorSource class that abstracts away details of
configuring metrics-lib's DescriptorReader and handling parse
histories. This moves descriptor file paths to a single place and
makes it easier to test classes that process descriptors.
- Add new DocumentStore class that abstracts away storing,
retrieving, listing, and deleting files produced as output of
processing descriptors. Allows for easier testing of classes that
store results from parsing descriptors, and prepares exchanging
file system storage with a database.
- Write parse history file to disk after all new descriptors are
processed, rather than have the descriptor reader do that after
providing the last descriptor. Avoids edge cases where processing
breaks and we don't re-process descriptors in the next execution
because we think we already processed them last time.
- When overwriting files, write contents to temporary files, delete
original files, and rename written temporary file to original file.
Minimizes effects of concurrent executions changing the same set of
files.
- Print out statistics of parsed descriptors and document store
activity. Can help figuring out performance bottlenecks in the
future.
|
| | |
|
| |
|
|
|
| |
It's yet unclear what causes the back-end to write corrupt details files,
but the front-end shouldn't serve corrupt responses in any case.
|
| | |
|
| |
|
|
|
|
|
|
| |
Right now, relays and bridges have exactly one IPv4 address and at most
one IPv6 address. Due to alphanumerical ordering the primary OR address
is first in the OR address array anyway. But the requirements to IPv4 or
IPv6 addresses might change in the future, so make sure the ordering stays
this way.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Generally, allow digits in flag names.
|
| |
|
|
|
|
|
|
|
|
|
| |
We support searches for relays by hashed fingerprint and for bridges by
hashed hashed fingerprint. The reason is that applications should always
hash full fingerprints in order not to accidentally leak non-hashed bridge
fingerprints.
However, the spec is vague about searching for beginnings of hashed relay
fingerprints and hashed hashed bridge fingerprints. The current code did
not support those, but it should. This commit changes that.
|
| | |
|
| | |
|
| |
|
|
| |
Implements #8678.
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Implements step 3 of #6509.
|
| |
|
|
| |
Implements step 2 of #6509.
|
| |
|
|
| |
When set, respond to all requests with 503 Service Unavailable.
|
| |
|
|
|
|
| |
Also fix a potential bug in the servlet's filtering and sorting code.
It's unclear whether this really was a bug, but let's clean up the code
just in case.
|
| | |
|