summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| | * | | | hyper-examples: Remove subdirectories from examplenield2025-07-2010-107/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This example directory had a separate directory for each example. We can simplify this by using binaries.
| | * | | | hyper-examples: Remove unsafe test url form hyper-http-client-examplenield2025-07-201-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | This example made a request to a website which could deanonymize the user. We now use check.torproject.org instead.
| | * | | | hyper-examples: Example creating custom ArtiHttpConnector for hypernield2025-07-204-0/+300
| |/ / / / |/| | | | | | | | | | | | | | | | | | | This example demonstrates how to create a custom connector which can be injected into a hyper client, to use hyper for Tor requests.
* | | | | Merge branch 'flow-ctrl' into 'main'opara2025-07-1715-39/+596
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | tor-proto: Add support for sending XON messages See merge request tpo/core/arti!3099
| * | | | | tor-basic-utils: add `assert_val_impl_trait!` macroSteven Engler2025-07-172-2/+24
| | | | | |
| * | | | | tor-proto: replace `DataReader`Steven Engler2025-07-172-44/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `DataReader` -> `DataReaderInner` `DataReaderNew` -> `DataReader` This means that the `DataReader` now supports XON/XOFF flow control using the `XonXoffReader`. This means that it can receive requests for a new drain rate from the reactor, and can send the new drain rate to the reactor once there is no more stream data queued.
| * | | | | tor-proto: add `DataReaderNew`Steven Engler2025-07-173-5/+75
| | | | | | | | | | | | | | | | | | | | | | | | This will later become `DataReader`.
| * | | | | tor-proto: add `StreamReceiver::is_empty()`Steven Engler2025-07-171-1/+39
| | | | | |
| * | | | | tor-proto: add the `XonXoffReader` and connect it to the reactorSteven Engler2025-07-1711-15/+267
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The idea here is that the reactor builds an `XonXoffReaderCtrl` for the new stream, and the `XonXoffReaderCtrl` can receive notifications from the reactor's `StreamFlowControl`. The `XonXoffReaderCtrl` can be combined with any `AsyncRead` to build a `XonXoffReader`, essentially wrapping the `AsyncRead` with a type that handles XON/XOFF flow control. Essentially, the reactor gives you a type that allows you to add XON/XOFF flow control support to any `AsyncRead`. We will add this `XonXoffReader` to the `DataReader` in a future commit.
| * | | | | tor-proto: add plumbing for sending XONSteven Engler2025-07-176-5/+171
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nothing actually causes an XON to be sent yet. But this adds the code so that anything holding the `StreamTarget` can request to send an XON.
| * | | | | tor-proto: move some code into a `approx_stream_bytes_buffered()` fnSteven Engler2025-07-171-6/+11
|/ / / / /
* | | | | Merge branch 'fix-shellcheck' into 'main'opara2025-07-174-4/+4
|\ \ \ \ \ | |_|_|/ / |/| | | | | | | | | | | | | | maint: Avoid x-prefix in comparisons. See merge request tpo/core/arti!3100
| * | | | maint: Avoid x-prefix in comparisons.Gabriela Moldovan2025-07-174-4/+4
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | This applies the fixes suggested by shellcheck (the x-prefixes were causing the `shellcheck` job to fail; see [SC2268]). [SC2268]: https://www.shellcheck.net/wiki/SC2268
* | | | Merge branch 'flow-ctrl' into 'main'opara2025-07-1624-188/+663
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | tor-proto,tor-cell: Code refactoring and add support for sending XOFF messages See merge request tpo/core/arti!3094
| * | | | tor-cell: add `FlowCtrlVersion::V0`Steven Engler2025-07-162-12/+5
| | | | |
| * | | | tor-proto: send XOFF messages when the queue grows too largeSteven Engler2025-07-166-6/+121
| | | | |
| * | | | tor-proto: add `CongestionControl::uses_xon_xoff()`Steven Engler2025-07-163-0/+19
| | | | |
| * | | | tor-proto: add dedicated types for the incoming stream queueSteven Engler2025-07-1610-24/+275
| | | | | | | | | | | | | | | | | | | | | | | | | XON/XOFF flow control will want to know how many data bytes are queued on a stream, so the new types track that.
| * | | | tor-cell: change `UnparsedRelayMsg::data_len`Steven Engler2025-07-153-9/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It now performs some validation and can return a `Result`. We perform validation here since different cell formats may have different maximum data lengths in the future, and `UnparsedRelayMsg` doesn't expose the cell format so it's difficult to perform this validation at a higher layer.
| * | | | tor-proto: combine some objects into a `StreamComponents`Steven Engler2025-07-152-28/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As we continue adding more functionality to streams like flow control, we'll have more objects to pass around. This tries to group them together.
| * | | | tor-proto: rename `StreamSendFlowControl` and related changesSteven Engler2025-07-155-46/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The plan is to use `StreamSendFlowControl` (now `StreamFlowControl`) for both outgoing and incoming directions, so a name change is needed. This also updates some comments, and renames some related struct fields that have the word "send" in them.
| * | | | tor-proto: adjust `CtrlMsg::SendSendme` and renameSteven Engler2025-07-153-60/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows us to extend the command to implement different flow control methods. We could add new command variants for new flow control methods instead, but I think it makes sense to have them be a single command as they will always have a stream ID / hop location in common. This also helps us keep the flow control logic in one place.
| * | | | tor-cell: remove `flowctl-cc` feature and make XON/XOFF cells stableSteven Engler2025-07-156-13/+3
| | | | | | | | | | | | | | | | | | | | | | | | | I don't see any further changes being needed for these types, and it simplifies a lot of future code in tor-proto that uses these types.
| * | | | tor-cell: add a const constructor for `FlowCtrlVersion`Steven Engler2025-07-151-7/+14
| | | | |
* | | | | Merge branch 'handle-switch-test' into 'main'gabi-2502025-07-162-92/+495
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | conflux: Add conflux tests for client-side SWITCH handling See merge request tpo/core/arti!3091
| * | | | | proto: Add some docs for the conflux stream tests.Gabriela Moldovan2025-07-161-0/+27
| | | | | |
| * | | | | proto: Explain why the test MockRuntime is behind a mutex.Gabriela Moldovan2025-07-161-1/+6
| | | | | |
| * | | | | conflux: Ensure the min-heap is really a min-heap.Gabriela Moldovan2025-07-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `Ord` impl of `OooRelayMsg` already "reverses" the seqno comparison, which means previously we were double-reversing it (leading to the ooo cell heap logic being broken in cases where its size was > 1). Caught by the new conflux switch handling tests.
| * | | | | conflux: Add test for out-of-order cell handling in the client.Gabriela Moldovan2025-07-161-3/+252
| | | | | |
| * | | | | proto: Make the mock exit start writing to the stream.Gabriela Moldovan2025-07-161-1/+84
| | | | | |
| * | | | | proto: Replace oneshot completion channel with event channel.Gabriela Moldovan2025-07-161-18/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The two mock exit legs will use this channel to notify each other of the receipt of BEGIN cells. This will enable us to extend the tests to support writing cells to the stream (but only after the stream is opened).
| * | | | | proto: Give ConfluxStreamState a constructor.Gabriela Moldovan2025-07-161-7/+14
| | | | | |
| * | | | | proto: Replace tuple with struct with named fields for clarity.Gabriela Moldovan2025-07-161-37/+30
| | | | | | | | | | | | | | | | | | | | | | | | This abolishes the overly-long tuple used in these tests.
| * | | | | proto: Move list of expected switches to a separate variable.Gabriela Moldovan2025-07-161-26/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I am moving these out of the `relays` list, in preparation for a minor refactoring around that part.
| * | | | | proto: Clarify docs to say who the receiver of the data_recvd is.Gabriela Moldovan2025-07-161-1/+1
| | | | | |
| * | | | | proto: Remove no-longer accurate comment from test.Gabriela Moldovan2025-07-161-4/+0
| | | | | |
| * | | | | proto: Refactor test loop exit condition.Gabriela Moldovan2025-07-161-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is about to become slightly more complex, as the mock exit will support writing to the stream too.
| * | | | | proto: Rename test for clarity.Gabriela Moldovan2025-07-161-1/+1
|/ / / / / | | | | | | | | | | | | | | | | | | | | I will another test for exit-to-client transmissions, so I am preemptively renaming its counterpart.
* | | | | Merge branch 'nightly-clippy' into 'main'gabi-2502025-07-163-4/+3
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | config-path, dirmgr, general-addr: Remove unnecessary parentheses. See merge request tpo/core/arti!3096
| * | | | | config-path, dirmgr, general-addr: Remove unnecessary parentheses (fmt).Gabriela Moldovan2025-07-151-2/+1
| | | | | |
| * | | | | config-path, dirmgr, general-addr: Remove unnecessary parentheses.Gabriela Moldovan2025-07-153-3/+3
| |/ / / / | | | | | | | | | | | | | | | This resolves some nightly clippy warnings.
* | | | | Merge branch 'rename-remove-by-path' into 'main'opara2025-07-156-29/+32
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | arti: raw: Rename `arti keys-raw remove-by-path` See merge request tpo/core/arti!3095
| * | | | doc: Update keys.mdhjrgrn2025-07-151-3/+3
| | | | |
| * | | | doc: Update `keys-raw.md`hjrgrn2025-07-151-9/+12
| | | | |
| * | | | arti: raw: Rename `arti keys-raw remove-by-path`hjrgrn2025-07-154-17/+17
|/ / / / | | | | | | | | | | | | | | | | * arti: raw: `remove-by-path` is now `remove-by-id` * arti: raw: Adjust integration tests
* | | | Merge branch 'bump-shadow-v2' into 'main'Nick Mathewson2025-07-141-2/+2
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | CI: bump shadow version See merge request tpo/core/arti!3092
| * | | | CI: bump shadow versionJim Newsome2025-07-141-2/+2
|/ / / / | | | | | | | | | | | | | | | | Mostly to get reproducibility fixes for <https://github.com/shadow/shadow/issues/3610>
* | | | Merge branch 'gsoc-plumb' into 'main'gabi-2502025-07-1429-313/+882
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | arti: keys: Add arti keys raw-remove-by-path See merge request tpo/core/arti!3059
| * | | | arti: keys: Add arti keys-rawhjrgrn2025-07-1429-313/+882
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * CLI: Add `keys-raw` and subcommand `remove-by-path` * arti: Add `arti::subcommand::raw` for the CLI `keys-raw` * tor-keymgr: Add `ArtiNativeKeystoreError::UnexpectedRawEntry`, `ArtiEphemeralKeystoreError::NotSupported` * tor-keymgr: Add `tor-keymgr::raw` module * tor-keymgr: Add `Keystore::remove_unchecked` * tor-keymgr: Change `Keystore::list` to return `KeystoreEntry` * tor-keymgr: Add field `KeystoreEntry::raw_id` * doc: Update keys.md * doc: Add raw.md * tor-keymgr: BREAKING: `UnrecognizedEntryError::new` associated function is now only accessible within the crate `tor-keymgr` * tor-keymgr: BREAKING: `UnrecognizedEntryId` is renamed to `UnrecognizedEntry` * tor-keymgr: BREAKING: `KeyMgr::list()` and `Keystore::list()` now return `Result<Vec<KeystoreEntryResult<KeystoreEntry>>>`
* | | | | Merge branch 'flow-ctrl' into 'main'opara2025-07-1012-96/+327
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | tor-proto: Handle incoming XON/XOFF messages See merge request tpo/core/arti!3054