summaryrefslogtreecommitdiff
path: root/crates/arti-client
Commit message (Collapse)AuthorAgeFilesLines
* Patchlevel bumps for crates whose dependencies just changed.Nick Mathewson2023-03-311-1/+1
| | | | | | | | | | | | | | | | 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-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ```
* Merge branch 'plumb' into 'main'Alexander Færøy2023-03-302-7/+17
|\ | | | | | | | | More plumbing for hs connections See merge request tpo/core/arti!1098
| * Run rustfmtIan Jackson2023-03-301-8/+4
| | | | | | | | Apply this churn, which I deferred for ease of review.
| * arti-client: Call HsCircPool::launch_background_tasksIan Jackson2023-03-301-4/+13
| | | | | | | | | | | | | | | | I found that I had the bug where I forgot to call this function, and reached bad_api_usage!("The circuit launcher wasn't initialized") The possibility of such a bug is a hazard of this API pattern.
| * tor-hsconn: Rename ConnError (from HsClientConnError)Ian Jackson2023-03-301-2/+2
| | | | | | | | | | The old name was unwieldy and other crates can just as well name it by the crate scope.
| * arti-client: When making hs conn, wait for bootstrapIan Jackson2023-03-301-0/+3
| | | | | | | | | | Not doing this was a bug. The bug was possible because of some code duplication between the exit and hs paths. Add a comment about that.
| * tor-client: Pass a netdir for each requestIan Jackson2023-03-301-1/+3
| | | | | | | | | | This will be more convenient inside tor-hsclient. In arti-client, this mirrors the way TorClient::get_or_launch_exit_circ works.
* | Move functionality from tor_basic_utils to tor_async_utilsNick Mathewson2023-03-292-4/+3
|/ | | | | This commit is mostly code movement; I'd recommend reviewing it with git's `--color-moved` option.
* Merge branch 'hspre' into 'main'Ian Jackson2023-03-292-4/+9
|\ | | | | | | | | Miscellanious tidying up (pursuant to HS client work) See merge request tpo/core/arti!1086
| * Tidy up an unused import warningIan Jackson2023-03-281-1/+3
| | | | | | | | | | | | Now cargo +stable clippy --locked --offline --workspace --all-targets is clean.
| * Pass HsCircPool to hsclient connect function, not CircMgr (fmt)Ian Jackson2023-03-281-5/+5
| |
| * Pass HsCircPool to hsclient connect function, not CircMgrIan Jackson2023-03-281-2/+5
| | | | | | | | | | We separated this out in the circmgr API. This is what the HS client needs. It doesn't want to participate in the general circuit pool.
* | arti-client: add accessors for `Blockage`eta2023-03-281-1/+13
|/ | | | Fixes #800.
* tor_client: Add some example code for BridgeConfig.Nick Mathewson2023-03-241-0/+49
| | | | Closes #791
* arti-client: Make TransportConfigListBuilder public.Nick Mathewson2023-03-241-1/+8
| | | | | | | Without this there's no convenient way to add a transport without messing with serde/toml. Found while working on #791
* Merge branch 'upgrade_dirs' into 'main'Alexander Færøy2023-03-231-1/+1
|\ | | | | | | | | Bump to the lastest versions of dirs and directories. See merge request tpo/core/arti!1072
| * Bump to the lastest versions of dirs and directories.Nick Mathewson2023-03-221-1/+1
| |
* | Apply deferred rustfmt churnIan Jackson2023-03-231-1/+4
| |
* | arti-client: Include redacted HsId in ObtainHsCircuit errorIan Jackson2023-03-232-4/+4
| | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1071/diffs?commit_id=580fe1118dbbbfa086d11b28e3e26d7c91afe21c#fbd7ab2d6d0a5b515697d4f9f99a42ebd508aa4b_153_165
* | arti-client: Fix wording of docs for TorClient::isolationIan Jackson2023-03-231-1/+1
| |
* | arti-client: Strengthen an HS todoNick Mathewson2023-03-231-1/+1
| |
* | arti-client: Call tor-hsclient to create HS connectionsIan Jackson2023-03-232-4/+27
| | | | | | | | | | Obviously this still doesn't work because the actual impl in hsclient is just a todo!().
* | arti-client: Create an HsClientConnectorIan Jackson2023-03-233-1/+24
| |
* | arti-client: Move client stream creation out of match, in connectIan Jackson2023-03-231-16/+17
| | | | | | | | We want this part for HS too.
* | arti-client: Break out TorClient::isolation(prefs)Ian Jackson2023-03-231-17/+32
|/ | | | | | | | We're going to want to reuse this. Also: rename StreamPrefs::isolation and update the docs, to better reflect its rather limited functionality. The new TorClient::isolation is the only call site.
* Discuss in comment why we're not using a newtype for the Strings in HostIan Jackson2023-03-091-0/+8
|
* Classify OnionAddressResolveRequest as NotImplementedIan Jackson2023-03-091-2/+1
| | | | | | | | We have a theory about how this ought to work, so it's noit an API usage error - it's an unimplemented feature. As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1060#note_2884757
* Reject invalid hostnamesIan Jackson2023-03-091-2/+5
| | | | | | Reject them both for .onion and for "exit" hostnames This prevents a `Host` from having an invalid hostname in it.
* Fix reference to no-longer-contemplated Host variantIan Jackson2023-03-091-1/+1
| | | | | Reported in https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1060#note_2884755
* Dummy HsId::from_str on .onion: Return Bug, rather than panickingIan Jackson2023-03-091-5/+4
| | | | | Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1060#note_2884754
* Improve error from HsId parse of "www.B32.onion"Ian Jackson2023-03-092-0/+3
| | | | And add some clarity and todos about address errors.
* Avoid arti_client::ErrorDetail::Address for TorAddrError::InvalidHostnameIan Jackson2023-03-091-1/+19
| | | | Provide an explicit From impl isntead.
* arti-client: Parse .onion addresses and dispatch to client.rsIan Jackson2023-03-094-26/+163
| | | | | | | Now, a Host has a separate variant for `.onion` which is always used, even when HS is disabled. Currently it ends in a todo!.
* arti-client: DoThingInstructions: Make error returns consistentIan Jackson2023-03-092-9/+10
| | | | This is more comprehensible, and will be more convenient.
* arti-client: Host: Use Display::fmt rather than write!Ian Jackson2023-03-091-2/+3
| | | | | write! is less good because the `{}` overwrites stuff like "did the caller ask for padding".
* Merge branch 'suffix' into 'main'Nick Mathewson2023-03-081-1/+1
|\ | | | | | | | | Introduce and use ends_with_ignore_ascii_case See merge request tpo/core/arti!1058
| * Introduce and use ends_with_ignore_ascii_caseIan Jackson2023-03-081-1/+1
| | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1056#note_2884428
* | Merge branch 'host2' into 'main'Ian Jackson2023-03-082-47/+140
|\ \ | |/ |/| | | | | arti-client: Do not send resolve requests for IP addrs to exits See merge request tpo/core/arti!1057
| * arti-client: Host: Be more explicit about what is allowed in HostnameIan Jackson2023-03-081-1/+11
| |
| * RustfmtIan Jackson2023-03-082-4/+16
| |
| * Abolish Host::into_string_and_portIan Jackson2023-03-081-23/+0
| | | | | | | | | | | | | | | | | | When I was trying to add HS support to these layers, I found I could add a new variant to the `Host` enum but everything would still compile even though I hadn't written the necessary implementation! This method is a liability: when using it, one inevitably writes such latent bugs.
| * arti-client: Do not send resolve requests for IP addrs to exitsIan Jackson2023-03-082-13/+58
| | | | | | | | | | | | | | | | Doing so doesn't seem like a good idea. It might even be some kind of leak? Found because I added a variant to `address::Host` for hidden services, and noticed that the resolve code still compiled.
| * arti-client addr handling: Introduce StreamInstructionsIan Jackson2023-03-082-22/+71
| |
* | arti-client: Reject .onion, when we should, without allocatingIan Jackson2023-03-081-1/+2
|/ | | | Use new strip_suffix_ignore_ascii_case
* Patchlevel bumps for remaining changed crates.Nick Mathewson2023-02-281-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 patch-versions for breaking changes in tor-hs{crypto,client}Nick Mathewson2023-02-281-1/+1
| | | | | | These are API breaks, but the crates themselves are currently 100% experimental, so there's no need to bump the minor versions according to our semver rules.
* Bump minor versions for significant breaking changes.Nick Mathewson2023-02-281-3/+3
| | | | This includes tor-cell, tor-proto, and tor-netdir.
* Rename onion-* cargo features to hs-* in tor-* cratesIan Jackson2023-02-282-2/+2
| | | | Fixes #756