| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
|
|
|
|
|
|
| |
warning: consider adding a `;` to the last statement for consistent formatting
--> crates/tor-circmgr/src/build.rs:162:13
|
162 | handshake_res = circ.create_firsthop_ntor(ct, params).await
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `handshake_res = circ.create_firsthop_ntor(ct, params).await;`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
|
| | |
|
| |
|
|
|
| |
These messages are very verbose and I doubt anyone will want them,
usually, even when debugging.
|
| | |
|
| | |
|
| |
|
|
|
|
| |
MockSleepRuntime wraps a MockRuntime instead of using
test_with_one_runtime!(), so the tests should be more
deterministic
|
| |
|
|
|
|
|
|
| |
The tests still use MockSleepRuntime for the more complicated tests
where we forcefully make one or both futures time out, but
MockSleepRuntime wraps a MockRuntime instead of using
test_with_all_runtimes!(), so the tests should be more
deterministic
|
| |
|
|
|
| |
The funky thing was getting rid of the Canceled error from the channel
and returning the actual error from build_owned() properly
|
| | |
|
| |
|
|
| |
build_modest_timeout() and build_huge_timeout() don't pass yet
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
cargo fmt, precisely.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This threads the country codes work through the rest of the codebase:
- `tor-dirmgr` will now enable GeoIP with the embedded database when the
`geoip` future is enabled
- This can be extended later using the `DirMgrConfig` to allow
specifying a custom database; this is not done here, though
- `tor-circmgr`'s `SupportedCircUsage` and `TargetCircUsage` fields gain
new `country_code` members to allow filtering circuits by country
- These are `()` in builds where the `geoip` feature is not enabled --
doing it this way means we don't have to copy and paste huge swathes
of code, since we can't use `#[cfg]` in patterns
- `ExitPathBuilder` gains (hacked-in) support for choosing a relay with
the correct country code
- Due to the lack of conjuction, we just copy and paste a small bit,
pending further refactoring
- `StreamPrefs` now lets you specify a country code, letting embedders
make use of the feature
|
| | |
|
| | |
|
| |
|
|
| |
We're about to want this.
|
| |\
| |
| |
| |
| | |
clippy: Allow some of our existing code patterns
See merge request tpo/core/arti!1396
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| | |
Ideally we would be allowed to use vanilla gen_range() here, but there
doesn't seem to be a way to allow a specific clippy-forbidden method
using #[allow] and we probably don't want to make a blanket allow.
|
| | | |
|
| |/
|
|
| |
In each of these, it is locally obvious that the range is nonempty.
|
| |\
| |
| |
| |
| | |
rng ranges: Use inclusive Duration ranges in several places
See merge request tpo/core/arti!1385
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Many of these call sites would panic if, somehow, the upper bound was
zero. In most cases it is very complicated to see if whether this
could happen.
However, there is a better answer:
Durations are (conceptually) dense, so picking the closed set (which
includes its boundary) rather than the open one (which doesn't) will
make little practical difference.
So change four call sites to use `..=` instead of just `..`.
|
| |\ \
| |/
|/|
| |
| | |
Optional tracing support in tor-error for error reporting
See merge request tpo/core/arti!1379
|
| | |
| |
| |
| | |
This simplifies our logging a little, and implements part of
|
| |\ \
| | |
| | |
| | |
| | |
| | |
| | | |
add_warning: Tolerate clippy::missing_panics_doc
Closes #950
See merge request tpo/core/arti!1380
|
| | |/
| |
| |
| | |
Closes #950.
|
| |/
|
|
| |
This appeases clippy-nightly.
|
| | |
|
| |\
| |
| |
| |
| |
| |
| | |
tor-hsclient: Use proper CircParameters
Closes #935
See merge request tpo/core/arti!1340
|
| | |
| |
| |
| |
| |
| |
| |
| | |
As per #935.
I called this "circparameters_from_netparameters" not
"circparameters_from_netparams" because the type is "NetParameters"
not "NetParams".
|
| | |
| |
| |
| |
| | |
These two functions are only slightly different, and benefit from
taking a Fn.
|
| | |
| |
| |
| |
| | |
I looked through the C tor source code and couldn't find any
additional path restrictions.
|
| |/
|
|
| |
One of these is test-related; one is vanguards-related.
|
| |
|
|
|
|
|
| |
I think these should go in `[circuit_timing]`. That section already
has some retry parameters, so is not strictly *timing*.
This is not honoured yet.
|
| |
|
|
|
| |
Previously, this was more likely to select elements that occurred after
other elements that didn't satisfy the predicate.
|
| | |
|
| |\
| |
| |
| |
| |
| |
| | |
tor-circmgr: Fix random_idx_where with empty slice
Closes #918
See merge request tpo/core/arti!1296
|
| | |
| |
| |
| |
| | |
I have verified that this test fails, as expected, when applied
without the corresponding bugfix.
|
| | |
| |
| |
| | |
Fixes #918.
|
| |\ \
| | |
| | |
| | |
| | | |
circmgr: New API to expose estimate-based timeouts.
See merge request tpo/core/arti!1281
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | | |
This will help create good timeout values for various onion-service
operations.
|
| | | | |
|
| | |/
|/| |
|