| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
This simplifies our logging a little, and implements part of
|
| | |
|
| |
|
|
|
| |
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.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously we'd always try to keep 8 circuits ready. That doesn't
make sense if we are super-busy. Instead, if we run out of
circuits, we double the amount that we try to keep ready, and if we
never go under 80% of our target number, we half the number we try
to keep ready.
We limit the rate of change here, to make sure that we aren't
flapping too much or shrinking too aggressively.
This algorithm is still a mite arbitrary, and will need tuning in
the future.
|
| |
|
|
| |
This will be helpful as we complexify the pool behavior a bit.
|
| |
|
|
|
|
| |
These functions' documentation already says that they don't retry,
and hsclient appears to be where we are concentrating our retry
efforts.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Now ClientCirc is no longer `Clone`, and the things that need it
to be `Clone` instead return and use an Arc<ClientCirc>
We're doing this so that ClientCirc can participate in the RPC
system, and so that its semantics are more obvious.
Closes #846.
Thanks to the type system, this was a much simpler refactoring than
I had feared it would be.
|
| |
|
|
|
|
| |
Previously, we only accepted an OwnedCircTarget, which would have
kept us from getting a circuit that was aimed at a specialized
CircTarget that gave us LinkSpecs in a raw order.
|
| | |
|
| |
|
|
|
| |
thread_rng() isn't Send. We can fix this by not holding it over an
await point.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
The prediction and scheduling logic here is quite primitive;
we should probably refactor it considerably. This should be good
enough for now, though.
|
| |
|
|
|
|
|
|
| |
We now have support for a pool of pre-build circuits that we can use
for HS-related purposes, and we take circuits from this pool as
needed.
Nothing populates or cleans the circuit pool yet.
|
|
|
This is now enough to launch circuits on demand. It still needs to
pre-build the first three hops, and to retry on failure.
|