Age | Commit message (Collapse) | Author |
|
Signed-off-by: David Goulet <dgoulet@torproject.org>
|
|
That function is only used to test the global bucket write limit for a
directory connection.
It should _not_ be used for anything else since that function looks to see if
we are a directory authority.
Rename it to something more meaningful. No change in behavior at this commit,
only renaming.
Part of #33029
Signed-off-by: David Goulet <dgoulet@torproject.org>
|
|
Single hop rejection (POST and GET) for HS v3 descriptor now return a 503 code
which is more accurate code from dir-spec.txt and from other rejection case in
the code.
For instance if you are not a relay and you get a POST request, a 503 code is
sent back with a rejection message.
Part of #31958
Signed-off-by: David Goulet <dgoulet@torproject.org>
|
|
|
|
Closes #24964
Signed-off-by: David Goulet <dgoulet@torproject.org>
|
|
|
|
|
|
|
|
|
|
Previously we used time(NULL) to set the Expires: header in our HTTP
responses. This made the actual contents of that header untestable,
since the unit tests have no good way to override time(), or to see
what time() was at the exact moment of the call to time() in
dircache.c.
This gave us a race in dir_handle_get/status_vote_next_bandwidth,
where the time() call in dircache.c got one value, and the call in
the tests got another value.
I'm applying our regular solution here: using approx_time() so that
the value stays the same between the code and the test. Since
approx_time() is updated on every event callback, we shouldn't be
losing any accuracy here.
Fixes bug 30001. Bug introduced in fb4a40c32c4a7e5; not in any
released Tor.
|
|
Implements ticket 29897.
|
|
|
|
|
|
|
|
Increment bw file cache lifetime when serving it by HTTP.
And add a constant to define that lifetime.
|
|
|
|
Before serving it by HTTP.
|
|
Use flag to do not warn when the bandwidth file is missing trying
to serve it by http.
Also remove double space in the assignement.
|
|
When a directory authority is using a bandwidth file to obtain the
bandwidth values that will be included in the next vote, serve this
bandwidth file at /tor/status-vote/next/bandwidth.z.
|
|
|
|
|
|
|
|
|
|
When Tor's clock is behind the clocks on the authorities, allow Tor to
serve future consensuses.
Fixes bug 28654; bugfix on 0.3.0.1-alpha.
|
|
|
|
|
|
|
|
|
|
(Thanks to cyberpunks for noting two of them!)
|
|
Ticket #27367.
|
|
|
|
|
|
This commit just moves the code to two separate files. The geoip
code still has a few needless dependencies on core/* and features/*.
|
|
It differs from the rest of the rephist code in that it's actually
necessary for Tor to operate, so it should probably go somewhere
else. I'm not sure where yet, so I'll leave it in the same
directory, but give it its own file.
|
|
|
|
This is preparation for having a routermode.h as well
|
|
|
|
Parts of this C file naturally belong in dircache, dirclient, and
dircommon: so, move them there.
|
|
The main.c code is responsible for initialization and shutdown;
the mainloop.c code is responsible for running the main loop of Tor.
Splitting the "generic event loop" part of mainloop.c from the
event-loop-specific part is not done as part of this patch.
|
|
In dirauth:
* bwauth.c reads and uses bandwidth files
* guardfraction.c reads and uses the guardfraction file
* reachability.c tests relay reachability
* recommend_pkg.c handles the recommended-packages lines.
* recv_descs.c handles fingerprint files and processing incoming
routerinfos that relays upload to us
* voteflag.c computes flag thresholds and sets those thresholds on
routerstatuses when computing votes
In control:
* fmt_serverstatus.c generates the ancient "v1 server status"
format that controllers expect.
In nodelist:
* routerstatus_fmt.c formats routerstatus entries for a consensus,
a vote, or for the controller.
|
|
There are now separate modules for:
* the list of router descriptors
* the list of authorities and fallbacks
* managing authority certificates
* selecting random nodes
|
|
Implements 27244, and should save a bunch of RAM on clients.
|
|
|
|
This is part of #27244, so that we can safely mmap consensus
documents.
|
|
Existing cached directory information can cause misleadingly high
bootstrap percentages. To improve user experience, defer reporting of
directory information progress until at least one connection has
succeeded to a relay or bridge.
Closes ticket 27169.
|
|
|
|
Remove support for Tor2web in the code and build system. At this commit, tor
doesn't have Tor2web support anymore.
Ref: https://lists.torproject.org/pipermail/tor-dev/2018-July/013295.html
Close #26367
Signed-off-by: David Goulet <dgoulet@torproject.org>
|
|
|
|
|
|
|