summaryrefslogtreecommitdiff
path: root/crates/arti-client/examples
Commit message (Collapse)AuthorAgeFilesLines
...
* Allow creating unbootstrapped `TorClient`s (and `DirMgr`s)eta2022-02-112-2/+2
| | | | | | | | | | | | | | | This commit changes how the `TorClient` type works, enabling it to be constructed synchronously without initiating the bootstrapping process. Daemon tasks are still started on construction (although some of them won't do anything if the client isn't bootstrapped). The old bootstrap() methods are now reimplemented in terms of the new create_unbootstrapped() and bootstrap_existing() methods. This required refactoring how the `DirMgr` works to enable the same sort of thing there. closes #293
* Make current/create functions into runtime member functions.Nick Mathewson2022-01-261-1/+2
| | | | | This should help avoid some amount of temptation towards API proliferation.
* Rename FooRuntime to FooNativeTlsRuntime for consistency.Nick Mathewson2022-01-261-2/+2
|
* Unify TokioRuntime and TokioRuntimeHandleNick Mathewson2022-01-261-2/+2
| | | | | | | | | Having separate types here doesn't justify the (very limited) benefit of distinguishing between the case where we have created an executor that we own and the case where we have a handle to an already-running tokio executor. Part of #301.
* Use *_with_prefs() for Option<ConnectPrefs> callers in TorClient::connectNeel Chauhan2022-01-082-2/+2
|
* Merge branch 'readme_fixes'Nick Mathewson2021-11-301-0/+5
|\
| * Example needs to be the same as the readmedagon2021-11-301-0/+2
| |
| * MR review feedbackdagon2021-11-301-0/+3
| |
* | Change sane_defaults() and with_directories()Nick Mathewson2021-11-292-4/+4
|/ | | | | | | | The sane_defaults() call is now the same as you get from a default builder: by convention, we just call that method Default::default(). The with_directories() constructor makes more sense as a constructor for the TorClientConfigBuilder than for TorClientConfig.
* Allow type-complexity in hyper.rs exampleNick Mathewson2021-11-211-0/+1
| | | | | This isn't the prettiest, but suppressing the warning does make the example warning free.
* Improve top-level arti-client documentation, add example codeeta2021-10-281-0/+46
| | | | | | | | | | | | | | | | | | | | | This overhauls the top-level `arti-client` documentation significantly: - the "Using arti-client" section walks the user through all of the necessary steps to initiate a Torified TCP connection, and then provides a code example - this example is also available as `examples/readme.rs`; it's not run as a doctest, since it involves connecting to Tor - a "More advanced usage" subheading provides information about stream isolation (and can potentially be used for other interesting features once we get them). - a new "Multiple runtime support" section was added to explain the purpose and usage of the `tor-rtcompat` crate - the section on design and privacy considerations was removed; this is probably okay to keep in a README, but users of the crate aren't going to be interested in this (at least I don't think) (also, the doc comment for `arti_client::Error` was fixed to make actual sense)
* Rename tor_client/arti_tor_client to arti_client.Nick Mathewson2021-10-211-0/+159
Solves a name conflict with the existing tor_client create. Closes #130.