| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
Run maint/add_warning
|
| |
|
|
| |
This is part of abolishing the use of "ns" to mean "plain".
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
First, run
```
git grep -l "^edition =" |
xargs perl -i -pe 's/^edition *=.*/edition = "2024"/;'
```
Second, manually verify that all Cargo.toml files have changed,
and nothing else has changed.
Third, run cargo fmt again.
|
| |
|
|
|
|
| |
This entirely removes the requirement on ClientCirc.
Signed-off-by: David Goulet <[email protected]>
|
| | |
|
| |
|
|
|
|
|
|
| |
This suffix is redundant with "Accept-Encoding",
which all Tor directory caches have supported
since 0.3.1.1-alpha.
See torspec#342.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
According to RFC 9110:
A user agent SHOULD send Content-Length in a request when the
method defines a meaning for enclosed content and it is not sending
Transfer-Encoding. For example, a user agent normally sends
Content-Length in a POST request even when the value is 0
(indicating empty content). A user agent SHOULD NOT send a
Content-Length header field when the request message does not
contain content and the method semantics do not anticipate such
data.
Part of #1024
|
| | |
|
| |
|
|
|
|
|
|
| |
Since none of these methods were invoked from outside
`tor-dirclient` (except for debugging), and since we have had a fair
amount of churn on what we actually want them to be, it seems like a
good idea to use this trick to hide them. This will let us make
other changes to the actual behavior of Requestable in the future.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Since not everybody has xz and/or zstd, we don't want to admit
whether we support them when we are uploading or downloading an
onion service descriptor. Similarly, if we aren't advertising
support for an encoding, we shouldn't accept it.
Finally, while we're doing this, it made sense to have the ability
to mark requests based on how anonymized they are, and reject (some)
attempts to send those requests over a one-hop circuit.
Closes #1062
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
It's simpler to always use a `String` to represent directory request bodies.
We no longer need the `StringBody` trait.
|
| | |
|
| |
|
|
|
| |
The hsdir publisher will send the `HsDescUploadRequest`s to the
appropriate directory using `send_request()`.
|
| |
|
|
|
|
|
|
|
| |
Previously, the `Requestable` trait assumed the body of the request
would always be empty (`http::Request<()>`). This change replaces the
hardcoded `()` body type with the `Requestable::Body` associated type
(which will allow implementors to create requests with non-empty
bodies). This will enable us to reuse the `Requestable` trait for
building `POST` requests for uploading descriptors.
|
| | |
|
| |
|
|
|
|
| |
Yes, it's 50 kilobytes, not 50 kibibytes. I double-checked this with
the C implementation and with param-spec.txt's documentation for
`HSV3MaxDescriptorSize`.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
I couldn't find a test vector in C Tor. This test case was generated
from the code here.
I'm fairly sure it's right since I managed to get my descriptor
downloader to work. (That's not an MR yet, but uses this code.)
|
| |
|
|
|
| |
In my tests this seems to do the right thing, but I'm getting 404s.
I'm not sure if actually this URL is wrong.
|
| |
|
|
|
| |
This panics on error, and we're fine with a panic on misbehavior in
tests.
|
| |
|
|
|
|
|
|
|
| |
This is in lieu of upgrading to the latest base64 crate, which has
a different API from the old one. Since we have to migrate either
way, we might as well use base64ct everywhere.
I don't think that most of these cases _require_ constant-time
base64, but it won't hurt.
|
| |
|
|
|
| |
This is precisely the result of running the rune in
maint/adhoc-add-lint-blocks.
|
| | |
|
| |
|
|
| |
This will be used for bridges' descriptors.
|
| |
|
|
|
| |
(It makes sense to use this for things that are not in fact lists of
SHA256 digests of Microdescriptors.)
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
In reviewing !553 I noticed that the empty digest list error had to be
handled in two places. I filed #492 about the duplication.
In fact it turns out to have been quadruplication.
The new code also avoids cloning the underlying objects, instead
sorting a Vec of references.
|
| |
|
|
|
|
| |
I'm not sure this is right. But providing a test case for it before
my next change ensures that my refactoring doesn't change the
behaviour.
|
| | |
|
| |
|
|
| |
This will help implement #466.
|
| | |
|
| |\
| |
| |
| |
| |
| |
| | |
Don't use SystemTime::now()
Closes #306
See merge request tpo/core/arti!365
|
| | | |
|