summaryrefslogtreecommitdiff
path: root/crates/arti-client/examples
Commit message (Collapse)AuthorAgeFilesLines
* arti-client: Add one-hop circuit examplejuga2024-05-151-0/+65
| | | | Co-authored-by: gabi-250 <[email protected]>
* Adjust examples lints using add_warningNick Mathewson2024-05-076-18/+18
|
* tor-rtcompat: CompoundRuntime: Add a CoarseTimeProvider, and implIan Jackson2024-03-251-1/+1
| | | | | | In all the uses in-crate, this is just a RealCoarseTimeProvider. Now all the compound runtimes impl CoarseTimeProvider.
* Rename ManagedTransportConfig to TransportConfig.Nick Mathewson2024-03-141-2/+2
| | | | We're going to start using this type for _every_ kind of transport.
* Add unknown-lints exception to examplesNick Mathewson2024-03-136-1/+6
| | | | | We need this to avoid warnings when runnning non-nightly clippy on these examples.
* Run maint/add_warning.Nick Mathewson2024-03-136-0/+6
|
* Run maint/add_warning to add lint block everywhereIan Jackson2023-08-236-0/+6
|
* arti-client: fix conditional unused_import and dead_code warningsNick Mathewson2023-08-161-2/+2
|
* Run maint/add_warning to actually apply new lint allowsIan Jackson2023-07-106-0/+6
|
* make snowflake example feature-gatedtrinity-1686a2023-06-141-5/+13
|
* Merge branch 'pt-snowflake' into 'main'Nick Mathewson2023-06-111-0/+100
|\ | | | | | | | | | | | | add documentation for configuring snowflake pt Closes #879 and #875 See merge request tpo/core/arti!1216
| * change path to snowflake clienttrinity-1686a2023-06-081-1/+2
| |
| * remove forgoten debug linetrinity-1686a2023-06-081-1/+0
| |
| * add anchor to amp-cache linktrinity-1686a2023-06-081-1/+1
| |
| * complement general documentation on bridges and pttrinity-1686a2023-06-071-0/+2
| |
| * move snowflake example to dedicated file and comment it moretrinity-1686a2023-06-071-0/+98
| |
* | Add separate example with ReportSaksham Mittal2023-06-081-0/+67
|/
* Allow clippy::unchecked_duration_subtraction in testsNick Mathewson2023-01-274-0/+4
| | | | | This panics on error, and we're fine with a panic on misbehavior in tests.
* Disable clippy::unlinlined-format-argsNick Mathewson2023-01-272-8/+4
| | | | | | | | 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.
* Spelling fixes and normalizations on some high-level cratesNick Mathewson2022-11-071-2/+2
|
* Allow "clippy::single_char_pattern" in tests.Ian Jackson2022-10-124-0/+4
| | | | | | | This lint exists for perf reasons, and this is rarely relevant in tests. Using double quoted str is generally cognitively less burdensome.
* clippy: Consolidate many lints in maint/add_warningIan Jackson2022-06-244-0/+12
| | | | | | Found these by disabling the nightly dbg macro special case. Now, we have a mechanism for globally adding suppressions to tests, we can use that instead.
* clippy: Add standard test lint block to several examplesIan Jackson2022-06-244-0/+24
|
* rt-compat: Make all the individual runtime traits Clone+Send etc.Ian Jackson2022-06-081-0/+1
| | | | | | | | This will make it much more convenient for code that only wants one of these traits (or a subset of them). This is a good thing to support because it will allow us to use a ZST in places that do not need an actual async runtime handle (typically, the runtime handle is needed only for spawn).
* Merge branch 'isolation-example' into 'main'Nick Mathewson2022-05-241-0/+198
|\ | | | | | | | | | | | | add example for Isolation Closes #414 See merge request tpo/core/arti!524
| * mention isolation is an advanced topic and most usage don't require ↵trinity-1686a2022-05-241-0/+3
| | | | | | | | implementing the trait
| * add example for Isolationtrinity-1686a2022-05-231-0/+195
| |
* | Resolve the new `derive_partial_eq_without_eq` lint.Nick Mathewson2022-05-231-1/+1
|/ | | | It's a little overzealous sometimes, but it's mostly to the good.
* add udp to runtimetrinity-1686a2022-03-141-1/+1
|
* arti-client: use PreferredRuntime by default, doc cleanupseta2022-02-283-17/+14
| | | | | | | | | | | | | | | | | | | | | | This makes using the `PreferredRuntime` the first-class option inside `arti-client`, freeing users who don't want to think about runtimes from having to do so. `TorClient::create_unbootstrapped` and `builder` now automatically use this runtime, leaving only `builder_custom` for users who wish to manually specify a runtime. This lets us clean up the docs a lot: mentions of using custom runtimes are now relegated to nearer the end of the crate-level documentation, and we mostly just link to `tor_rtcompat`'s docs to explain more there. Instead, we take some more time to explain how you use the builder API to create clients synchronously. Other doc cleanups included getting rid of the explanation of `TorAddr` in the main crate-level doc; this is already well-documented elsewhere, and is something users should discover organically later. fixes arti#326
* use runtime TlsProvider in tcp-hook exampletrinity-1686a2022-02-251-2/+1
|
* Merge branch 'http-layer' into 'main'eta2022-02-241-160/+0
|\ | | | | | | | | Initial cut of hyper bindings as a library crate See merge request tpo/core/arti!342
| * arti-hyper: Move hyper example from arti-clientIan Jackson2022-02-231-160/+0
| | | | | | | | Code motion and consequential dependency adjustments.
* | Fix typosDimitris Apostolou2022-02-231-3/+3
| |
* | Merge branch 'custom-tcp-hook' into 'main'eta2022-02-231-0/+339
|\ \ | | | | | | | | | | | | add example of tcp hook See merge request tpo/core/arti!341
| * | add one more comment to hook-tcptrinity-1686a2022-02-231-0/+1
| | |
| * | examples/hook-tcp: add some comments, rework lifetimes a biteta2022-02-231-28/+73
| | | | | | | | | | | | | | | | | | Try to make the `hook-tcp` example a bit easier to read by adding/changing comments, and renaming the lifetimes for `async_trait`-generated trait methods.
| * | implement correct handling of connection close and add comment explaining ↵trinity-1686a2022-02-231-9/+54
| | | | | | | | | | | | goal of the example
| * | add drop on CustomTcpStream to catch disconnection without closetrinity-1686a2022-02-231-0/+13
| | |
| * | add example of tcp hooktrinity-1686a2022-02-231-0/+235
| |/ | | | | | | this required to make additional types public
* / Make a TorClientBuilder API.Nick Mathewson2022-02-181-7/+5
|/ | | | | | | | This is a defensive API choice to protect against the possibility that we'll want to add a bunch of other non-config options in the future. Closes #350
* arti-client: add ability to automatically bootstrapeta2022-02-161-0/+76
| | | | | | | | | | | | | The new `BootstrapBehavior` enum controls whether an unbootstrapped `TorClient` will bootstrap itself automatically (`Ondemand`) when an attempt is made to use it, or whether the user must perform bootstrapping themselves (`Manual`). The `lazy-init` example shows how you could write a simple `get_tor_client()` function that used a global `OnceCell` to share a Tor client across an entire application with this API. closes arti#278
* 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
| |