Commit Graph

1509 Commits

Author SHA1 Message Date
Lennart Kloock 420c00d83f
Fix code snippet in tor-persist docs 2021-08-12 17:01:29 +02:00
Nick Mathewson cac8c29abd Use real network parameter values to tune test circuits.
Finishes #145.
2021-08-12 10:45:51 -04:00
Nick Mathewson 7aa964a141 Periodically launch timeout-testing circuits.
Our path-spec says that, if we don't have enough build-time data to
make a good estimate for our timeouts, we should periodically try
launching testing circuits just to see how long they take to build.

Here we implement that.  The implementation is a bit wonky because
of how our crates are factored; see arti#161 for more info.

Closes #145.

Closes #57.
2021-08-12 10:30:04 -04:00
Lennart Kloock beee8c4626
Fix code snippet in arti docs 2021-08-12 16:08:28 +02:00
Lennart Kloock 5c075be5c4
Fix warning sign emoji in tor-client doc 2021-08-12 16:01:22 +02:00
Lennart Kloock fe462c832c
Reorder doc headlines in tor-circmgr 2021-08-12 15:36:34 +02:00
Lennart Kloock d929ce02ae
Fix typos in tor-chanmgr 2021-08-12 15:30:32 +02:00
Lennart Kloock feccd209a8
Add brackets and remove colon for better consistency 2021-08-12 15:06:28 +02:00
Nick Mathewson d8ad0e4609 WIP: Launch testing circuits as needed to find timeouts
This won't work yet, since it needs directories and doesn't have them.
2021-08-11 15:02:39 -04:00
Lennart Kloock f2063d2810
Rerun readmes.sh 2021-08-11 20:10:36 +02:00
Lennart Kloock 02a5a1c92d
Sync docs with readmes 2021-08-11 20:08:24 +02:00
Lennart Kloock 9ff8a0ff0e
Fix code snippet in tor-socksproto README.md and docs 2021-08-11 19:33:34 +02:00
Nick Mathewson 3dc951193a For timeout testing, support for "useless" circuits.
We need the idea of launching a circuit for timeout testing, and
getting something that either exits someplace or exits noplace at all.
2021-08-11 13:26:33 -04:00
Lennart Kloock c886e7926e
Fix typos in tor-protover README.md and docs 2021-08-11 19:10:56 +02:00
Nick Mathewson 474398a7b4 tor-client: remove workaround now that #155 is in. 2021-08-11 13:06:23 -04:00
Nick Mathewson 100042b85d Add ability to launch a circuit to _some_ exit, without giving ports.
We'll want this for testing circuits and for RESOLVE requests.

Closes #155.
2021-08-11 13:03:24 -04:00
Nick Mathewson b4bb082153 Add functions to check whether port policies are nonempty. 2021-08-11 12:32:21 -04:00
David Goulet f9c23bc376 fallbackdir: Regenerate list
Closes #160

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-08-11 09:15:55 -04:00
Nick Mathewson f2be513fe6 Bump to latest arti-corpora. 2021-08-11 08:51:35 -04:00
Nick Mathewson 648a822e3a Upgrade to latest fslock and use its per-fd exclusion feature.
The latest version of the fslock crate has an optional feature that
allows file-locks to exclude one another even if they are opened
within the same process.  On Windows this behavior comes for free;
on Unix it depends on an internal map of (dev,inode) pairs.

Here we upgrade to the latest version of the fslock crate, and use
this feature.
2021-08-11 07:15:08 -04:00
Lennart Kloock ea21b95dcc
Fix previously fixed typos in docs too 2021-08-10 22:28:11 +02:00
Lennart Kloock 5f202a30fd
Fix a typo in tor-rtmock README.md
Remove a '#'
2021-08-10 21:39:07 +02:00
Lennart Kloock 1186de6df8
Fix a few typos in tor-rtcompat README.md 2021-08-10 21:24:39 +02:00
Lennart Kloock 10226872a0
Fix typo in tor-rtcompat README.md
Change 'if' to 'is'
2021-08-10 21:12:24 +02:00
Nick Mathewson 5f7f845d60 Use the correct unused-circuit timeout when we're learning timeouts. 2021-08-10 15:06:22 -04:00
Nick Mathewson 779e234c4c Make a basic daemon task to close circuits.
The timing is not ideal here; we'll want to refactor it later.

Closes #51
2021-08-10 11:13:32 -04:00
Nick Mathewson cb9319c468 Use real network parameters to set unused-circ timeouts. 2021-08-10 10:46:31 -04:00
Nick Mathewson 6b0c93fa81 Initial code to expire unused circuits. 2021-08-10 10:02:14 -04:00
Nick Mathewson 4238ed3ae9 Make MAX_CIRC_DIRTINESS configurable. 2021-08-10 09:37:38 -04:00
Nick Mathewson a81e148b94 Note functionality that maybe could move. 2021-08-10 09:34:40 -04:00
Nick Mathewson e1a2740a45 Have CircMgr::new() return an Arc<>. 2021-08-10 09:32:52 -04:00
Ben Armstead 41a7171581 Update state.rs info message 2021-08-09 20:08:07 +00:00
Nick Mathewson de00b5f512 Merge remote-tracking branch 'origin/mr/51' 2021-08-09 16:00:53 -04:00
Nick Mathewson 173580533f Refactor double_timeout() to make its timeouts futures in advance
Since these futures rely on the current time when they decide when
to expire, we don't want them looking at the current time from
inside the call to runtime.spawn or after that call.  Instead we'd
like them to look immediately on construction.

This approach is based on a comment from janimo on #149.  It doesn't
fix #149, though.
2021-08-09 12:53:45 -04:00
Nick Mathewson abb3e2fad5 Light edits on CONTRIBUTING.md
Mainly, drop the suggestion to fetch submodules, and explain what
more things do.

(The only submodule we have now is the fuzzing corpora, which most
people won't want.)

(I am not 100% convinced that we should keep 100% of the
instructions for working with git in the long term.  Do many other
projects have these?  Is there a tutorial we should link to
instead?)
2021-08-09 12:42:10 -04:00
Nick Mathewson 4edb88b7c2 Merge remote-tracking branch 'origin/mr/54' 2021-08-09 12:38:09 -04:00
Nick Mathewson 5c9aba8b69 Flush persistent state periodically, and on (clean-ish) exit. 2021-08-09 10:07:03 -04:00
Nick Mathewson d01d9643f0 Don't try to lock an already-locked lockfile.
Also, remove a dbg
2021-08-09 10:06:41 -04:00
S0AndS0 dea85e7912 WIP: Add development environment setup tips 2021-08-06 15:31:45 -07:00
Nick Mathewson af750e2010 Implement initial persistence for circuit timeout data
There's more to do here: we never actually store the data we get
here, and we won't work at all when somebody else has the lock.
2021-08-06 16:39:50 -04:00
Nick Mathewson bb6d38cde0 Initial persistent-state-manager code.
This commit defines a crate (tor-persist) that describes an abstract
key-value store using serde, plus an on-disk implementation using
Toml and fslock.
2021-08-06 16:39:50 -04:00
Nick Mathewson 79d9eac58c Add unnecessary_wraps to the big warning list. 2021-08-06 16:20:37 -04:00
Nick Mathewson e0ddb522c7 Update READMEs. 2021-08-06 11:00:34 -04:00
Nick Mathewson db64970202 Update arti-corpora to latest. 2021-08-06 09:45:52 -04:00
Nick Mathewson 6d80e53232 Simplify SqliteStore::from_path 2021-08-06 09:33:09 -04:00
Felipe Lema bf3c422555 shrink result to actual number of bytes read once on return 2021-08-05 20:08:18 -04:00
Nick Mathewson ca6b38d49e Missing tor-circmgr/src/config.rs 2021-08-05 17:16:28 -04:00
Nick Mathewson 80745dffcd Update to rsa 0.5.0. Minor compatibility issues. 2021-08-05 17:11:44 -04:00
Nick Mathewson 460f4d7dc6 Make circuit building and management configurable from the CLI. 2021-08-05 16:50:32 -04:00
Nick Mathewson 38ddf68c8c Add a configuration structure for CircMgr.
This patch makes path configuration and request timing options get
exposed up to the tor-client level.  I'm trying `derive_build` here
so we can eventually get consistent across all our builders.
2021-08-05 16:30:44 -04:00