summaryrefslogtreecommitdiff
path: root/crates/tor-chanmgr
Commit message (Collapse)AuthorAgeFilesLines
* Patchlevel bumps for crates whose dependencies just changed.Nick Mathewson2023-03-311-3/+3
| | | | | | | | | | | | | | | | These crates had no changes until just a moment ago. But since we updated the versions on some of their dependents, they have now changed themselves. Thus they get patchlevel bumps. ``` tor-rtmock tor-protover tor-socksproto tor-consdiff tor-chanmgr tor-dirclient tor-hsservice ```
* Bump crate versions that have breaking changesNick Mathewson2023-03-311-2/+2
| | | | | | | | | | These crates have had breaking changes. They are pre-1.0, so they get a minor bump. ``` tor-basic-utils tor-config ```
* Bump patchlevel on crates with non-breaking changesNick Mathewson2023-03-311-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For these crates, the changes are nontrivial, so we _do_ bump the versions on which their dependent crates depend. Fortunately, since they are all pre-1.0, we don't need to distinguish semver-additions from other changes. (Except for arti, which _is_ post-1.0, but gets a patchlevel bump anyway.) These are unstable crates with breaking changes: ``` tor-hscrypto tor-hsclient ``` These have new or extended APIs: ``` safelog tor-bytes tor-cell tor-linkspec tor-llcrypto tor-proto tor-cert arti-client ``` These have new unstable APIs or features: ``` tor-netdoc tor-circmgr (also broke some unstable APIs) arti (is post-1.0) ``` These have bugfixes only: ``` caret tor-dirmgr ```
* Patchlevel bumps for remaining changed crates.Nick Mathewson2023-02-281-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | These crates have had small code changes, but no API additions: tor-config tor-socksproto tor-cert tor-chanmgr tor-ptmgr tor-guardmgr tor-circmgr tor-dirclient tor-dirmgr arti tor-hsservice tor-congestion These crates have had API extensions: fs-mistrust tor-llcrypto tor-bytes tor-checkable tor-linkspec tor-netdoc tor-persist arti-client
* Bump tor-units version for breaking change.Nick Mathewson2023-02-281-1/+1
| | | | | | | | (The breaking change was removing `as_days()` from IntegerMinutes.) We are _not_ calling this a downstream-api breaking change, per discussion at https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1012?commit_id=bb2ab7c2a3e0994bb438188511688b5b039cae29#note_2876819
* Bump minor versions for significant breaking changes.Nick Mathewson2023-02-281-6/+6
| | | | This includes tor-cell, tor-proto, and tor-netdir.
* Merge branch 'logs' into 'main'Nick Mathewson2023-02-013-6/+7
|\ | | | | | | | | | | | | Report causes of errors Closes #680 See merge request tpo/core/arti!997
| * Use ErrorReport for errors in error! in tor-chanmgrIan Jackson2023-01-301-2/+3
| |
| * Use ErrorReport for errors in warn! in tor-chanmgrIan Jackson2023-01-301-2/+2
| |
| * Errors: Mark the type of an error, for clarityIan Jackson2023-01-301-2/+2
| | | | | | | | | | We want to call ErrorReport::report() on Errors, but this isn't an Error but only a string.
* | Bump minor version of tor-cell.Nick Mathewson2023-02-011-2/+2
| | | | | | | | | | | | | | | | | | In !948 we renamed a couple of accessor functions, which is a breaking change in `tor-cell`'s API. In retrospect, perhaps we should have deprecated the old names and added the new ones, so we wouldn't have to break the API. (This is the only API break AFAICT since 1.1.0.)
* | Bump the patch version of every crate that had API additionsNick Mathewson2023-02-011-7/+7
| | | | | | | | | | | | These crates had API or behavior changes that may affect downstream crates. Fortunately, they're all version 0.x, and don't need minor bumps for this.
* | Bump the patch-level version of crates with _minor_ changes.Nick Mathewson2023-02-011-6/+6
|/ | | | | | | These changes influence behavior, but not effect compatibility. (If I messed up, and any crate except for `arti` has non-breaking API changes, that's still fine, since they are all version 0.x.)
* Allow clippy::unchecked_duration_subtraction in testsNick Mathewson2023-01-278-0/+8
| | | | | This panics on error, and we're fine with a panic on misbehavior in tests.
* Disable clippy::unlinlined-format-argsNick Mathewson2023-01-271-0/+1
| | | | | | | | This warning kind of snuck up on us! (See #748) For now, let's disable it. (I've cleaned it up in a couple of examples, since those are meant to be more idiomatic and user-facing.) Closes #748.
* chanmgr: trace-level logs when launching connections.Nick Mathewson2023-01-062-0/+15
| | | | Based on more temporary debugging code. Yet another part of #677.
* Merge branch 'test-lints' into 'main'eta2023-01-064-0/+33
|\ | | | | | | | | Add test lint blocks to all "mod test" See merge request tpo/core/arti!937
| * test lint blocks: Add many many automaticallyIan Jackson2022-12-124-0/+33
| | | | | | | | | | This is precisely the result of running the rune in maint/adhoc-add-lint-blocks.
* | doc: consistent summary line for the READMEsEmil Engler2022-12-201-1/+1
|/ | | | | This commit introduces a consistency to the summary line of all README.md files in each and every crate.
* Remove semver.md files now that 1.1.0 is released.Nick Mathewson2022-11-301-1/+0
|
* Bump the minor version of every crate.Nick Mathewson2022-11-301-18/+18
| | | | | We made this job easy this time around: by incrementing our MSRV, we have forced ourselves to do at least a minor bump everywhere.
* Merge branch 'renaming' into 'main'Nick Mathewson2022-11-305-11/+11
|\ | | | | | | | | | | | | Renaming a couple of items for arti 1.1.0 Closes #623 See merge request tpo/core/arti!916
| * Rename TransportHelper => TransportImplHelper.Nick Mathewson2022-11-305-11/+11
| |
* | Downgrade a "TODO pt-client" commentNick Mathewson2022-11-301-1/+3
|/
* Merge branch 'bridge-addr-2' into 'main'Nick Mathewson2022-11-302-7/+11
|\ | | | | | | | | Separate BridgeAddr and PtTargetAddr See merge request tpo/core/arti!904
| * Separate BridgeAddr and PtTargetAddrIan Jackson2022-11-302-7/+11
| | | | | | | | | | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/issues/668#note_2858220 This commit is difficult to split up. The innards of BridgeAddr and PtTargetAddr are still a bit entangled.
* | Merge branch 'fix_pt_protocol' into 'main'eta2022-11-301-11/+21
|\ \ | | | | | | | | | | | | | | | | | | Resolve two bugs in our pt-socks implementation Closes #676 See merge request tpo/core/arti!913
| * | PT protocol: pt-spec conformance with password fieldNick Mathewson2022-11-301-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pt-spec says: ``` If the encoded argument list is less than 255 bytes in length, the "PLEN" field must be set to "1" and the "PASSWD" field must contain a single NUL character. ``` This is a very silly thing to say, but some PTs enforce it. Fixes #676.
| * | connect_via_proxy: Actually send initial handshake.Nick Mathewson2022-11-301-3/+3
| | | | | | | | | | | | | | | | | | | | | Our previous code would make a TCP connection to the proxy, then wait forever for it to say something. Whoops! Part of a fix for #676.
| * | PT SOCKS tests: add a few more testsIan Jackson2022-11-301-1/+6
| | |
| * | PT SOCKS tests: test name that only fits in V4Ian Jackson2022-11-301-3/+7
| |/
* / Abolish ChanMgr::set_default_transportIan Jackson2022-11-302-19/+0
|/ | | | | | The comment says // TODO pt-client: It's not clear to me that we really need this method. and empirically, deleting it, and its callee, is fine.
* Merge branch 'todos-chanmgr' into 'main'Nick Mathewson2022-11-294-9/+13
|\ | | | | | | | | chanmgr: resolve several remaining "TODO pt-client" issues See merge request tpo/core/arti!897
| * chanmgr: Distinguish failure to connect to proxy from other IO failuresNick Mathewson2022-11-292-6/+12
| |
| * chanmgr: remove a now-stale TODO.Nick Mathewson2022-11-291-2/+0
| |
| * chanmgr: Report Pt errors correctly.Nick Mathewson2022-11-291-1/+1
| | | | | | | | | | We were panicking if the PtMgr gave us an error, which isn't so good.
* | Remove deprecated aliases in tor-linkspec.Nick Mathewson2022-11-292-7/+7
|/
* Fix ChanMgr APIs for setting PtMgr etc to match what TorClient wants.Nick Mathewson2022-11-281-7/+4
|
* tor-chanmgr: Introduce the BootstrapReporter API, publicize ChanBuildereta2022-11-286-41/+111
| | | | | | | | | | | | | | | | | | | | | | | | This commit makes the `ChanBuilder` type in `tor-chanmgr` usable by consumers outside of that crate, like the doc comment for `ChannelFactory` says you need to be able to do in order to turn your `TransportHelper` into something useful. As part of doing this, the `event_sender` its constructor takes needed to be dealt with, since it was a crate-internal type that came from inside the `ChanMgr`. Enter `BootstrapReporter`: an opaque wrapper around that sender, now provided as an additional argument to `ChannelFactory::connect_via_transport`. You can now construct a `ChanBuilder` outside this crate, and it'll still be able to report its bootstrap status by unwrapping this new type that's threaded through from the `ChanMgr`. (This was a fair deal of manually threading the type through all the layers in this crate!) Note that you cannot implement bootstrap updating using something that isn't `ChanBuilder` yet due to the type being entirely opaque (but, of course, we can figure out exactly what API the reporter should have later, and add that capability in).
* Draft: Pluggable transport managereta2022-11-282-14/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | This commit implements `PtMgr`, a pluggable transport manager responsible for keeping track of spawned PTs and spawning them to satisfy client requests on demand. It does this in two parts: the `PtMgr` type exported to the rest of the code, and the background `PtReactor` that actually does the spawning; this design ensures that only one attempt to spawn a PT is active at a time, and will prove useful later for implementing e.g. timeouts. A few changes were necessary to the rest of the code in order to make this all work out. Namely: - `TransportRegistry`'s API didn't make any sense for two reasons: - It wasn't feasible for implementors to implement `ChannelFactory`, since that'd require constructing a `ChanBuilder` (which requires a bootstrap reporting event sender). - Treating the PT manager as a registry is over-general; it's only necessary for it to spawn pluggable transports, so saddling it with other concerns didn't make any sense. - (It's possible to get extensibility for arbitrary user customization by just letting the user swap in a new `ChannelFactory`, anyway.) - Therefore, the `PtMgr` implements the new `AbstractPtMgr` trait, which is far more narrowly focused; this only exists to solve a dependency loop, and is documented as such. - This provides a `TransportHelper` instead of a `ChannelFactory`.
* Make ChannelMethod non-exhaustiveIan Jackson2022-11-241-0/+6
| | | | | | | | | Enums with variants conditional on cargo features must be non-exhaustive, because cargo features are supposed to be additive, meaning that enabling a feature (which might happen due to some random distant thing) ought not to break things using that enum. There were surprisingly few places to fix this.
* tor-chanmgr: Invent [Box]ChanSensitive for two error payloadsIan Jackson2022-11-233-4/+13
| | | | | | | | | | | This 1. Makes the errors smaller (in the case of Io's PtTargetAddr; ChannelBuild's addresses are already indirected in a Vec). 2. Redacts (currently, scrubs) the PtTargetAddr and SocketAddr when safe logging is enabled These are the remaining error variants in tor-chanmgr that contain information that should become sensitive as part of bridge support.
* tor-chanmgr: Replace OwnedChanTarget with LoggedChanTarget in errorsIan Jackson2022-11-232-9/+9
| | | | | | | | | This 1. Makes the errors smaller 2. Redacts (currently, scrubs) the chantarget when safe logging is enabled This commit doesn't treat other should-be-sensitive inforemation in errors just yet. That will come in a moment.
* ChanMgr: Another attempt to build on CI.Nick Mathewson2022-11-231-1/+7
|
* ChanMgr: Rename Factory -> CompoundFactoryNick Mathewson2022-11-232-5/+5
|
* ChanMgr: Fix a few more conditional-compilation issuesNick Mathewson2022-11-233-0/+3
|
* ChanMgr: Remove Arc aliases.Nick Mathewson2022-11-231-12/+6
|
* Mark set-default-factory API as experimental.Nick Mathewson2022-11-232-5/+4
|
* Make ChannelFactory and AbstractPtMgr require Send+SyncNick Mathewson2022-11-232-6/+6
|
* ChanMgr: Implement functions that replace channel factories.Nick Mathewson2022-11-234-21/+113
| | | | | | | This commit makes it possible to replace the default channel factory (used when there is no PtMgr), and to replace the PtMgr. This is part of #659.