summaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
| * | proto: new ClientCirc::send_raw_msg function.Nick Mathewson2023-08-213-1/+44
| | | | | | | | | | | | Closes #1010.
* | | Merge branch 'upgrade_num_enum' into 'main'Ian Jackson2023-08-222-2/+2
|\ \ \ | | | | | | | | | | | | | | | | Upgrade num_enum dependency to 0.7 See merge request tpo/core/arti!1530
| * | | Upgrade num_enum dependency to 0.7Nick Mathewson2023-08-212-2/+2
| | |/ | |/|
* | | Merge branch 'redundant_config_links' into 'main'Nick Mathewson2023-08-228-11/+11
|\ \ \ | | | | | | | | | | | | | | | | Resolve warnings about ambiguous/redundant doc links See merge request tpo/core/arti!1531
| * | | Resolve warnings about ambiguous/redundant doc linksNick Mathewson2023-08-228-11/+11
| |/ / | | | | | | | | | | | | Nightly rustdoc now warns if you have a link that isn't necessary, and if you have a link that might refer to two different things.
* | | Merge branch 'hss_ct_from_parts' into 'main'Nick Mathewson2023-08-225-22/+79
|\ \ \ | |/ / |/| | | | | | | | hsservice: Compute rendezvous points correctly. See merge request tpo/core/arti!1521
| * | hsservice: Fix an error message.Nick Mathewson2023-08-221-1/+1
| | |
| * | hsservice: Compute rendezvous points correctly.Nick Mathewson2023-08-222-15/+56
| | | | | | | | | | | | | | | | | | | | | This duplicates some code from hsclient as noted in the comments; it might be good to reduce this, but the remaining nontrivial duplication is small, and the logic flow is slightly different because of the two-step process.
| * | Lower linkspec list parsing into new tor-linkspec method.Nick Mathewson2023-08-223-6/+22
| | |
* | | hashx/bench: Add cachegrind microbenchmarksMicah Elizabeth Scott2023-08-184-0/+102
| |/ |/| | | | | | | | | | | This uses the 'iai' crate and valgrind to measure fine grained cache behavior during program generation and hash computation. Signed-off-by: Micah Elizabeth Scott <[email protected]>
* | Merge branch 'hss-err' into 'main'gabi-2502023-08-186-19/+69
|\ \ | | | | | | | | | | | | tor-hsservice errors: Introduce more error types See merge request tpo/core/arti!1515
| * | tor-hsservice errors: Distinguish operational errors by contextIan Jackson2023-08-175-11/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At the very least, I need FatalError to be distinct: IptEstablisher::new ought not to fail unless everything is terrible. Add a the Spawn variant to FatalError (that we'll need soon) and the Bug variant (which it seems likely we might need). This also gets rid of the crate-level Result alias.
| * | tor-hsservice errors: Return ReconfigureError from reconfigureIan Jackson2023-08-172-1/+3
| | | | | | | | | | | | This is what we do elsewhere.
| * | tor-hsservice errors: Use Bug for methods that oughtn't to failIan Jackson2023-08-172-4/+9
| | | | | | | | | | | | | | | | | | If the service encouters operational errors, surfacing them here is not helpful. So these methods ought to work, if they weren't called erroneously.
| * | tor-hsservice errors: Make stop() infallibleIan Jackson2023-08-171-1/+1
| | | | | | | | | | | | | | | The semantics of an Err return from this are unclear. Was it stopped? And what kind of error might we even return?
| * | tor-hsservice errors: Use `crate::Result` rather than importsIan Jackson2023-08-172-13/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We want to change the error return types of many methods, so we need a way to name `std::result::Result`. We could use `StdResult`, but, actually, properly distinguishing the kinds of errors that can occur in various contexts means we don't actually want a single Error type for the whole crate, so `crate::Result` is going to go away.
* | | Merge branch 'ipt-e-drop' into 'main'gabi-2502023-08-183-2/+32
|\ \ \ | | | | | | | | | | | | | | | | Define drop behaviour of IPT establisher, wrt status watch See merge request tpo/core/arti!1516
| * | | tor-hsservice: Define drop behaviour of IPT establisher statusIan Jackson2023-08-172-0/+20
| | | |
| * | | tor-async-utils: Deprecate DropNotifyEofSignallable::is_eofIan Jackson2023-08-171-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This was introduced in c82cda85d69d tor-basic-utils: DropNotifyWatchSender: use DropNotifyEofSignallable and already, then, the is_eof() method is redundant.
* | | | hsservice: Use correct circparameters_from_netparameters fnNick Mathewson2023-08-181-7/+5
| |_|/ |/| | | | | | | | I had incorrectly thought that this function was private.
* | | Merge branch 'allow_stream_req-hop-num' into 'main'Nick Mathewson2023-08-184-9/+80
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | tor-proto: Make ClientCirc::allow_stream_requests take a HopNum. Closes #1009 See merge request tpo/core/arti!1519
| * | | tor-proto: Add test where an incoming stream comes from an unexpect hop.Gabriela Moldovan2023-08-181-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a test that checks if the reactor is shut down if it receives an incoming stream request from an unexpected hop. Part of #1009
| * | | tor-proto: Make ClientCirc::allow_stream_requests take a HopNum.Gabriela Moldovan2023-08-184-9/+36
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | For consistency with the other `ClientCirc` APIs, `ClientCirc::allow_stream_requests` now takes a `HopNum` argument. Upon receiving an incoming stream request, the reactor now checks if the request came from the hop specified in `allow_stream_requests` (and if it came from a different hop, the circuit is closed). Part of #1009
* / / tor-hsservice: Change IptEstablisher::new to take RelayIdsIan Jackson2023-08-171-3/+3
|/ / | | | | | | | | | | | | | | | | | | The IptEstablisher needs to continuously maintain the IPT even as the netdir is updated. Whereas, the IPT manager just wants to select the relay from the netdir once and then only think about the relay identity. So it makes sense for the establisher to do necessary lookups of the relay's ids in the netdir.
* | Merge branch 'rendezvous_handshake' into 'main'Nick Mathewson2023-08-176-0/+291
|\ \ | | | | | | | | | | | | hsservice: new rend_handshake module See merge request tpo/core/arti!1512
| * | hsservice: new rend_handshake moduleNick Mathewson2023-08-173-0/+257
| | | | | | | | | | | | | | | | | | | | | | | | | | | This code has most of what we need to go from an INTRODUCE2 message we've just received to the point where we've connected to the rendezvous point and we're waiting for a stream of BEGIN messages. Unfinished pieces are marked with TODO HSS. Most of #980.
| * | cell: Add accessors to IntroduceHandshakePayloadNick Mathewson2023-08-162-0/+16
| | |
| * | cell: Add accessors to Introduce2.Nick Mathewson2023-08-162-0/+18
| | |
* | | Merge branch 'always_bug-from' into 'main'gabi-2502023-08-173-2/+13
|\ \ \ | |_|/ |/| | | | | | | | tor-bytes: deprecate always_bug with From trait See merge request tpo/core/arti!1500
| * | tor-bytes: deprecate always_bug with From traitEmil Engler2023-08-173-2/+13
| | | | | | | | | | | | | | | | | | This commit deprecates the `EncodeError::always_bug` function with a `From<EncodeError> for Bug` trait, which is a more semantically correct way to perform this action.
* | | Merge branch 'handshake-tests' into 'main'gabi-2502023-08-171-0/+15
|\ \ \ | |/ / |/| | | | | | | | test: add a test for missing NETINFO cells See merge request tpo/core/arti!1501
| * | test: add a test for missing NETINFO cellsEmil Engler2023-08-121-0/+15
| | | | | | | | | | | | | | | | | | This commit adds a unit test to the `tor_proto::handshake` module, which tests the behavior when no NETINFO cell is present within a channel.
* | | Merge branch 'all_crates_warnings' into 'main'Nick Mathewson2023-08-165-5/+10
|\ \ \ | | | | | | | | | | | | | | | | Resolve all warnings that appear from `maint/every-crate` See merge request tpo/core/arti!1507
| * | | arti-client: fix conditional unused_import and dead_code warningsNick Mathewson2023-08-162-5/+7
| | | |
| * | | guardmgr: Fix a dead-code warning when built without bridge support.Nick Mathewson2023-08-161-0/+1
| | | |
| * | | tor-proto: Fix dead_code when building without experimental-apiNick Mathewson2023-08-162-0/+2
| | | |
* | | | Merge branch 'netdir-todo' into 'main'gabi-2502023-08-162-23/+112
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | tor-netdir: Only select nodes that haven't been used for lower-numbered replicas. See merge request tpo/core/arti!1494
| * | | | tor-netdir: Replace somewhat niche scan() usage with flat_map().Gabriela Moldovan2023-08-161-9/+7
| | | | |
| * | | | tor-netdir: Rework the logic for checking if a node has already been selected.Gabriela Moldovan2023-08-161-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | This just simplifies the expression a little bit. It still has the same behaviour.
| * | | | tor-netdir: Store the hsdir indices in a HashSet instead of a BTreeSet.Gabriela Moldovan2023-08-161-4/+4
| | | | |
| * | | | tor-netdir: Derive Hash for HsDirIndex.Gabriela Moldovan2023-08-161-1/+1
| | | | | | | | | | | | | | | | | | | | This will become useful later when we build a `HashSet` of `HsDirIndex`.
| * | | | tor-netdir: Explain what the ring_items_at filter is for.Gabriela Moldovan2023-08-161-0/+5
| | | | |
| * | | | tor-netdir: Only select nodes that haven't been used for lower-numbered ↵Gabriela Moldovan2023-08-161-15/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | replicas. This implements the part of the spec that says a node that has already been selected for a lowered-numbered replica, shouldn't be considered when choosing `spread` nodes for any other higher-numbered replicas. Note: previously, the test added in this commit wouldn't have passed (because `NetDir::hs_dirs` used to return duplicate relays under some circumstances). Part of #960
| * | | | tor-netdir: Make ring_items_at() filter the items before returning.Gabriela Moldovan2023-08-162-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes `ring_items_at()` take an extra parameter which specifies whether an item is acceptable or not. The newly added filtering capabilities will be used to implement the part of the spec that says that if a node was selected for a replica, then it shouldn't be considered when choosing `spread` nodes for any other higher-numbered replicas.
| * | | | tor-netdir: Update ring_items_at() docs.Gabriela Moldovan2023-08-161-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | This updates the docs to reference the `spread` parameter (rather than `spread_fetch`).
| * | | | tor-netdir: Remove extraneous whitespace.Gabriela Moldovan2023-08-161-1/+1
| | | | |
| * | | | tor-netdir: Use hsdir_spread_store if we're uploading.Gabriela Moldovan2023-08-161-4/+9
| |/ / / | | | | | | | | | | | | | | | | | | | | The spread should be either `hsdir_spread_store` or `hsdir_spread_fetch`, depending on whether we're uploading or downloading descriptors.
* | | | tor-hsservice: Have IptEstablisher::new() return the status watch (fmt)Ian Jackson2023-08-161-2/+1
| | | |
* | | | tor-hsservice: Have IptEstablisher::new() return the status watchIan Jackson2023-08-161-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The IPT manager is going to want to separate the IptEstablisher struct (which contains the Drop signal) from the watch receiver. We could add an accessor to clone the watch, but the copy in the IptEstablisher would be redundant. This makes new()'s signature a bit funky but it's an internal method so I think that's fine.
* | | | Apply some churn from rustfmt (beta)Ian Jackson2023-08-161-1/+1
|/ / /