Nick Mathewson
962b01ca4e
Do not try to resolve .onion addresses.
2021-07-27 13:19:32 -04:00
Nick Mathewson
be05441cfb
tor-client: rename circ function to a more descriptive name
2021-07-27 13:18:44 -04:00
Nick Mathewson
b40b5d9412
tor_proto: Use iterators and functions to simplify resolve functions.
2021-07-27 13:13:27 -04:00
Nick Mathewson
64daf41a9b
ResolvedVal: Rename answers() to into_answers().
2021-07-27 13:00:25 -04:00
Nick Mathewson
26f00ed396
tor-proto: Tweak documentation for resolve/resolve_ptr
2021-07-27 12:58:33 -04:00
Nick Mathewson
a6a0189449
Merge remote-tracking branch 'origin/mr/39'
2021-07-27 10:38:20 -04:00
Nick Mathewson
a28e088240
Add OSX instructions to CONTRIBUTING.md
...
Closes #151 .
2021-07-23 15:00:35 -04:00
Yuan Lyu
2dfe4b69a0
Add support for RESOLVE and RESOLVE_PTR
2021-07-22 20:51:28 -04:00
dagger
d160c88cc5
[f] fix pareto test not compile issue
...
Signed-off-by: dagger <0xdagger@gmail.com>
2021-07-22 09:11:12 +07:00
Nick Mathewson
3f6b22fa14
adjust WANT_FROM_OTHER_CRATES
2021-07-21 13:11:24 -04:00
Nick Mathewson
a2ca2222b8
Merge remote-tracking branch 'origin/mr/42'
2021-07-21 09:42:16 -04:00
Nick Mathewson
9f61a392be
Use cargo audit with "-D warnings".
2021-07-21 09:33:32 -04:00
Nick Mathewson
c2a0a572b0
Merge remote-tracking branch 'origin/mr/41'
2021-07-21 09:32:26 -04:00
Nick Mathewson
c9841f5b1a
Fix a ocumentation link issue.
2021-07-21 09:19:57 -04:00
Daniel Eades
ed14a7fcf2
address some possibly slightly controversial lints
2021-07-21 07:27:26 +01:00
Daniel Eades
d23256074e
address a bunch of hopefully uncontroversial lints
2021-07-20 22:59:59 +01:00
Trinity Pointard
c6fef98a83
attempt to add cargo audit to CI
2021-07-20 23:39:23 +02:00
Trinity Pointard
594b65fff6
switch to maintained crates for memmap and tmpdir
...
They don't have actual documented security issues but it makes
`cargo audit` complain
https://rustsec.org/advisories/RUSTSEC-2018-0017
https://rustsec.org/advisories/RUSTSEC-2020-0077
2021-07-20 23:35:17 +02:00
Nick Mathewson
888296cca6
Temporarily disable build.rs tests as unreliable :/
2021-07-20 13:46:32 -04:00
Nick Mathewson
bd355d14f3
tor-circmgr: Improve coverage on build.rs.
...
The good news is that this tests the succeeding and failing cases,
and even managed to expose an off-by-one error in our hop counting.
The bad news is that these tests have shown even more ways in which
our wait_for code is unreliable, and forced me to slow it down even
harder.
2021-07-19 14:30:42 -04:00
Nick Mathewson
6bf1f9723a
Fix an actual off-by-one error!
...
This was in deciding when to report a circuit as completed.
2021-07-19 13:49:55 -04:00
Nick Mathewson
37fe255fda
Try refactoring build.rs for testability.
...
I'm adding a local "Buildable" trait here so I can swap out Circuits
for something else. This also lets me refactor Builder<> to be
parameterized on TimeoutEstimator again, and lets us get rid of the
first_hop() accessor on paths.
2021-07-19 12:25:26 -04:00
Nick Mathewson
1821532dd8
Add a test for double_timeout.
...
There is something wrong here, though. I had to rewrite wait_for() a
lot back in the main branch to get this test working right. See
arti#149 for details on that issue.
2021-07-19 12:25:26 -04:00
Nick Mathewson
61d8e5175c
tor-circbuild: use SleepProvider::now() instead of Instant::now()
...
This should make time mockable for testing purposes.
2021-07-19 12:25:26 -04:00
Nick Mathewson
94db617682
Add the ability to reconfigure a running ParetoEstimator
2021-07-19 12:25:26 -04:00
Nick Mathewson
2bc762a3ca
Monomorphize: just use the pareto timeout implementation.
2021-07-19 12:25:26 -04:00
Nick Mathewson
f341e493ea
Allow the pareto estimator to be disabled.
2021-07-19 12:25:26 -04:00
Nick Mathewson
3e894218aa
Connect the timeout estimator code to our circuit builder.
...
This currently leaves a bit to be desired, since the logic is kind
of gnarly. I'm not sure I want to be using so many Arc<>s.
2021-07-19 12:25:26 -04:00
Nick Mathewson
cd51d8bb8b
Implement a circuit timeout estimator backend.
...
This backend uses the kludged-up^W heuristic-enhanced Pareto
estimator from path-spec.txt section 2.4. See path-spec.txt for
full details on the algorithm. I've tried to note with TODO-SPEC
comments all the things that the spec currently leaves out.
Nothing actually uses this code yet. By the time it's in use, I'd
expect that many of these functions will need to have new
visibilities.
2021-07-19 12:25:26 -04:00
Nick Mathewson
379c28b2a8
Implement consensus parameters related to circuit timeout inference.
2021-07-19 12:25:26 -04:00
Nick Mathewson
e5e46e75fd
Implement TryInto<u64> for BoundedInt32
2021-07-19 12:25:26 -04:00
Eugene Lomov
88521287b4
derives for TorVersion and AuthKeyIds
...
Closes tpo/core/arti#147
2021-07-18 13:04:44 +03:00
Nick Mathewson
50691f2a00
Spelling fix.
2021-07-15 13:34:14 -04:00
Nick Mathewson
6838e26307
Merge remote-tracking branch 'origin/mr/38'
2021-07-15 12:36:40 -04:00
Nick Mathewson
438f61f790
Try to re-enable simple_tls test on osx.
...
On #111 , trinity-1686a points me towards a post on the apple dev
forum, suggesting that the problem here is that OSX's
SecureTransport API doesn't support PKCS12 files with empty passwords.
2021-07-15 12:00:35 -04:00
Nick Mathewson
257ab1f665
Refactor MockSleepProvider::wait_for to work better.
...
This is necessary for some tests I'm doing on circuit timeout code.
It doesn't solve the wait_for issues completely; I've opened #149
for those.
2021-07-15 10:15:34 -04:00
Nick Mathewson
20bc4278d9
time mocking: only insert each Sleeping future once.
2021-07-15 10:15:34 -04:00
Nick Mathewson
70bcda78d7
Move wait_for into MockSleepProvider.
...
This function is generally useful for testing functions where we
want time to advance bit by bit.
2021-07-15 10:15:28 -04:00
Trinity Pointard
93347ec80e
remove now invalid doc-comment
2021-07-15 00:08:47 +02:00
Trinity Pointard
74ad265ecb
reexport IsolationToken in tor-client
2021-07-14 19:31:37 +02:00
Trinity Pointard
7eeecf8df5
create new type for isolation_map
...
and make it garbage-collected
2021-07-14 18:30:16 +02:00
Trinity Pointard
402662f09c
make isolation_group optional in SupportedCircUsage
2021-07-14 17:45:01 +02:00
Trinity Pointard
52fab4e3c6
move IsolationToken to circmgr
...
document the behavior of IsolationToken::default
remove From and Into impls between IsolationToken and u64
2021-07-14 16:21:00 +02:00
Nick Mathewson
3a730de601
Revert "Use coarsetime to build an incoming traffic timestamp."
...
This reverts commit f30b22802a
.
It turns out (see torspec#57) that there is no need for us to keep
this timestamp -- at least, not for the use we had in mind in
circuit timeouts.
2021-07-13 13:18:10 -04:00
Trinity Pointard
9e71e2267a
fix clippy lints
2021-07-13 17:54:23 +02:00
Trinity Pointard
dfd8adbb25
implement isolation in arti
...
rules are not configurable, but similar to default rules for Tor
(isolate by client addr, by listening port and by authentication if any)
2021-07-13 17:34:20 +02:00
Trinity Pointard
59434d0ae1
implement stream isolation
2021-07-13 16:47:57 +02:00
Nick Mathewson
f30b22802a
Use coarsetime to build an incoming traffic timestamp.
...
We need this for the circuit timeout estimator (#57 ). It needs to
know "how recently have we got some incoming traffic", so that it
can tell whether a circuit has truly timed out, or whether the
entire network is down.
I'm implementing this with coarsetime, since we need to update these
in response to every single incoming cell, and we need the timestamp
operation to be _fast_.
2021-07-13 10:35:46 -04:00
Nick Mathewson
202420099f
Update WANT_FROM_OTHER_CRATES again.
2021-07-13 10:35:07 -04:00
Nick Mathewson
4678fc0a37
Changes to WANT_FROM_OTHER_CRATES based on discussion on #146
2021-07-12 09:21:58 -04:00