Commit Graph

2463 Commits

Author SHA1 Message Date
Ian Jackson e0630fda7e arti cli: Add some anyhow context() calls 2022-02-18 14:05:40 +00:00
Ian Jackson 3f8d566a7a arti cli: socks proxy: Start listening immedately
This makes arti less awkward to use.
2022-02-18 14:04:42 +00:00
Ian Jackson 460b94ef14 arti cli: Do config watch setup before entering future select
IMO this clarifies things a bit, and makes things more deterministic.
2022-02-18 13:55:12 +00:00
eta 74aa16e87a Merge branch 'script-filenames' into 'main'
Remove extension from scripts

See merge request tpo/core/arti!328
2022-02-18 12:50:16 +00:00
Ian Jackson ccb4604237 Merge branch 'no-http-status-err' into 'main'
dirclient: Remove HttpStatus error variant

Closes #349

See merge request tpo/core/arti!329
2022-02-18 12:04:54 +00:00
Ian Jackson d3ab2bb636 maint/add_warning: Remove duplicate argv0 from usage message 2022-02-18 11:46:06 +00:00
Ian Jackson 894944ba5f maint/gen_md_links: Add missing +x bit
This is a program, with a main function, etc.
2022-02-18 11:46:06 +00:00
Ian Jackson 1c301230e4 rename *.py scripts to bare name
Update all references.  There are three remaining hits for
  git-grep '\.py\b'
all of which are scripts in "little-t-tor", not here in arti.
2022-02-18 11:46:06 +00:00
Ian Jackson 9aefbf4227 rename *.sh scripts to bare name
As per #309

Update all references.  There is one remaining hit for
  git-grep '\.sh\b'
namely "build.sh" in maint/reproducible_build, which I think is
the build script for osxcross - ie, an external project.
2022-02-18 11:46:06 +00:00
Nick Mathewson 1572fc520e spelling fix 2022-02-17 15:59:56 -05:00
Nick Mathewson 023ff75a64 Add #[display] annotations for remaining ErrorKinds. 2022-02-17 15:18:19 -05:00
Nick Mathewson 64a0d4dce5 dirclient: Remove HttpStatus error variant
Getting a non-200 status is no longer a failure condition; it's just
a different kind of answer.

Closes #349.
2022-02-17 15:12:00 -05:00
Nick Mathewson 83d001d661 Merge branch 'remaining-errors' 2022-02-17 14:22:47 -05:00
Nick Mathewson 2f6160965d Fix compilation on main 2022-02-17 14:19:21 -05:00
Nick Mathewson 80be59497e Merge branch 'clippy-followup' into 'main'
Remove some needless refs and slicing

See merge request tpo/core/arti!327
2022-02-17 18:25:54 +00:00
Ian Jackson 6503d8ce03 Avoid recursive From impls
These (&foo).into() constructions are needed so we use the
implemnetation of `From<&Foo>`, not a recursive call to this very
function.

This is a partial revert of the previous commit.  I'm making this a
separate commit for the benefit of posterity.
2022-02-17 17:42:12 +00:00
Nick Mathewson a5e4e24537 Use TorConnectionFailed for failure to download directory. 2022-02-17 12:37:07 -05:00
Nick Mathewson 4c08141488 Clarify state vs cache in ErrorKind 2022-02-17 12:35:35 -05:00
Nick Mathewson 024ec61a1a Correct ErrorKinds for some tor-dirclient errors. 2022-02-17 12:26:18 -05:00
Nick Mathewson de86ac0b0f Rename CircuitTimeout to TorNetworkTimeout. 2022-02-17 12:22:51 -05:00
Nick Mathewson 034c5ba9f5 Rename ExitTimeout to RemoteNetworkTimeout. 2022-02-17 12:19:33 -05:00
Nick Mathewson 4db586cf00 tor_circmgr::Error: Sort variants by interesting-ness.
We can't use discriminants here now, but maybe we can in the future.
2022-02-17 12:12:04 -05:00
Nick Mathewson 550eb9e61b Tweak documentation on ErrorKind::Transient 2022-02-17 11:50:42 -05:00
eta a772d02578 Merge branch 'issue-325' into 'main'
Make CircMap open_ent_count O(1)

See merge request tpo/core/arti!302
2022-02-17 14:36:19 +00:00
Ian Jackson ce6fbac0d7 Merge branch 'bootstrap_second' into 'main'
arti: create TorClient first, then bootstrap.

Closes #336

See merge request tpo/core/arti!320
2022-02-17 14:21:04 +00:00
Ian Jackson 516a2a3de8 Merge branch 'typos' into 'main'
Fix typos

See merge request tpo/core/arti!326
2022-02-17 14:19:08 +00:00
Ian Jackson c9aa3b9937 tor-dirmgr: Use Bug type for sqlite-detected bugs
So we get a stack trace
2022-02-17 13:32:47 +00:00
Ian Jackson 1a9a209771 tor-dirmgr: Make sqlite_error_kind take rusqlite::Error
We're about to reuse this and we'll want it to take the higher-level
type.  Also it seems more proper like this.
2022-02-17 13:31:36 +00:00
Ian Jackson 9a6518fb81 tor-error: splitting/lumping guidelines 2022-02-17 13:31:11 +00:00
Ian Jackson 9a55290037 tor-dirclient: Error::HttpError: add a TODO saying to abolish 2022-02-17 13:31:11 +00:00
Ian Jackson 079f7fd1b8 ErrorKind::RemoteRefused: Expand on description, narrowing scope 2022-02-17 13:31:11 +00:00
Ian Jackson cca253ff9f ErrorKind::Csnceled: Expand on description 2022-02-17 13:31:11 +00:00
Ian Jackson 48e3ae6b79 ErrorKind::CircuitTimeout: Expand on description 2022-02-17 13:31:11 +00:00
Ian Jackson de70e15f21 ErrorKind::DirectoryExpired: Add possible deprecation notes 2022-02-17 13:31:11 +00:00
Ian Jackson 2d4901ccde tor-circmgr: errors: Use autoconversion for Bug 2022-02-17 13:31:03 +00:00
Ian Jackson bbcc871105 Remove some needless refs and slicing
Prompted by nightly's clippy (which has some false positives, so is
currently disabled).
2022-02-17 11:16:27 +00:00
Ian Jackson 094ddd7cd7 Add a comment about "&mut [&mut ]" 2022-02-17 11:07:52 +00:00
Ian Jackson 95e081ab44 Merge branch 'ptr_arg_fix' into 'main'
Re-enable clippy::ptr_arg where it had been disabled.

See merge request tpo/core/arti!323
2022-02-17 11:07:45 +00:00
Dimitris Apostolou ea929fd942
Fix typos 2022-02-17 12:55:59 +02:00
Yuan Lyu 7ab840785e Replace as_mut with deref impl for MutCircEnt 2022-02-16 17:23:16 -05:00
Yuan Lyu cc7023fb75 Make CircMap open_ent_count O(1) 2022-02-16 16:48:49 -05:00
Nick Mathewson 36314ad364 tor_error: a couple of spelling/formatting issues 2022-02-16 16:43:13 -05:00
Nick Mathewson 990753ca92 Finally remove ErrorKind::TODO.
Closes #322.
2022-02-16 16:40:57 -05:00
Nick Mathewson 0bdef96897 arti_client: provide Kinds for all errors. 2022-02-16 16:38:22 -05:00
Nick Mathewson 2a7087ff93 dirmgr: Remember where netdocs came from.
This isn't complete (see TODO), but it's enough to let us report the
right ErrorKind if something fails to parse.
2022-02-16 16:28:23 -05:00
Nick Mathewson 4bb7c97399 dirmgr: eliminate StringParsingError.
It had too many possible Kinds depending on what kind of string had
failed to parse.

I decided to use #[source] here instead of #[from], so that we
would have to explicitly convert these errors where they show up.
2022-02-16 16:02:28 -05:00
Nick Mathewson f71473cf73 dirmgr: HasKind for internal and sqlite errors
At first I had thought that all sqlite errors would be internal, but that's
not the case.
2022-02-16 15:48:24 -05:00
Nick Mathewson 9e03643f65 dirmgr: implement HasKind for the easier variants 2022-02-16 15:22:21 -05:00
eta 30439f9dc2 Merge branch 'eta/lazy-init' into 'main'
arti-client: add ability to automatically bootstrap

Closes #278

See merge request tpo/core/arti!322
2022-02-16 20:08:38 +00:00
Nick Mathewson 49c87fa8f9 Implement HasKind for tor_dirclient::Error 2022-02-16 14:53:58 -05:00