summaryrefslogtreecommitdiff
path: root/crates/arti-client
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'readme_fixes'Nick Mathewson2021-11-302-2/+7
|\
| * Example needs to be the same as the readmedagon2021-11-302-46/+29
| |
| * MR review feedbackdagon2021-11-302-3/+11
| |
| * fix arti-client doc exampledagon2021-11-301-25/+39
| |
| * run ./maint/readmes.shdagon2021-11-291-2/+2
| |
* | Fix a documentation link.Nick Mathewson2021-11-301-2/+3
| |
* | Fix a bad rustdoc reference.Nick Mathewson2021-11-291-1/+1
| |
* | Merge branch 'simplify_config_helpers' into 'main'eta2021-11-294-37/+32
|\ \ | | | | | | | | | | | | Change sane_defaults() and with_directories() See merge request tpo/core/arti!155
| * | Change sane_defaults() and with_directories()Nick Mathewson2021-11-294-37/+32
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Bump every crate by one patch version.Nick Mathewson2021-11-291-9/+9
|/ /
* | Merge branch 'config-updates-and-tests'Nick Mathewson2021-11-291-28/+109
|\ \
| * | Document StorageConfig defaults better.Nick Mathewson2021-11-291-3/+17
| | | | | | | | | | | | (Also fix a couple of typos)
| * | Add basic tests for high-level buildersNick Mathewson2021-11-251-3/+52
| | | | | | | | | | | | | | | Make sure that we can change elements, and we can reconstruct builders that give us the same thing.
| * | Impl and test Default for high-level configsNick Mathewson2021-11-251-0/+20
| | |
| * | Ensure that all config sections have deny_unknown_fieldsNick Mathewson2021-11-251-0/+1
| | | | | | | | | | | | | | | When we deserialize a configuration, we should reject unknown variables (except when we have an explicit reason to allow them).
| * | Make directory accessors crate-private.Nick Mathewson2021-11-251-4/+2
| | | | | | | | | | | | These don't need to be exposed any longer.
| * | Define defaults for StorageConfigNick Mathewson2021-11-251-19/+18
| |/ | | | | | | | | | | | | | | I'm still not 100% sure this is the right move: should we encourage app developers to always pick their own directories? Or should we make it easy for them to use, well, `sane_defaults`? This patch takes the second approach.
* | add semicolons if nothing returnedDaniel Eades2021-11-252-2/+3
| |
* | deglob some enums, use concise iteration syntaxDaniel Eades2021-11-251-1/+1
|/
* Resolve a pair of rustdoc warnings.Nick Mathewson2021-11-241-1/+1
|
* More typo fixes that I forgot to save :(Nick Mathewson2021-11-242-4/+4
|
* Fix a few typos.Nick Mathewson2021-11-242-2/+2
| | | | Also fix some commonwealth spellings that had slipped in.
* Implement meta-builder pattern for TorClientConfigNick Mathewson2021-11-221-10/+159
| | | | | This should be ergonomic than having to construct every section of the configuration separately.
* Make every Config type implement Eq.Nick Mathewson2021-11-211-3/+3
| | | | | Doing this is necessary for reconfiguration support, and will help a lot with testing, too.
* For every* config type, make defaults consistent.Nick Mathewson2021-11-211-0/+1
| | | | | | | | | | This patch makes sure that for every* config type we have, the defaults you get from a Builder match those you get from Serde, and that both match the value that you get from arti_defaults.toml. Later down the line I'll be adding some tests to keep these in sync. * StorageConfig still has no defaults of its own, since we aren't so sure we want other applications to use Arti's directories by default.
* Rename .gitignore APP_FOO to ARTI_FOO.Nick Mathewson2021-11-211-1/+1
| | | | | | | | Since these shell-variables are hardwired to use org.torproject.Arti as the program name, it isn't appropriate to call them "app-specific". If we someday reinstate APP_FOO, it should be based on a user-provided application name.
* Give CfgPath an alternative inner representation.Nick Mathewson2021-11-211-12/+2
| | | | | | | | In order to handle explicitly specified path buffers directly, we now let CfgPath be either a string (that gets expanded) or a PathBuf (that doesn't). This simplifies TorClientConfig::with_directories()
* Give every ConfigBuilder a From<Config> implementation.Nick Mathewson2021-11-211-0/+16
| | | | This will make it more convenient to reconfigure things.
* Ensure that every section-level config type has a builder() function.Nick Mathewson2021-11-211-0/+7
|
* Make arti-client config object match arti config better.Nick Mathewson2021-11-213-51/+86
| | | | | | | | Now every section that the two configuration objects share has the same type and name. This should help us in documenting our configuration in a way that doesn't confuse people. There is still lots of API work to go.
* Lower StorageConfig to arti-client crateNick Mathewson2021-11-211-3/+39
|
* 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.
* Fold "circuit_timing" and "request_timing" into a single section.Nick Mathewson2021-11-181-1/+1
|
* Move top-level configuration downwards from `arti` to `arti-config`.Nick Mathewson2021-11-182-1/+5
| | | | | | | | To do this at all neatly, I had to split out `tor-config` from `arti-config` again, and putting the lower level stuff (paths, builder errors) into tor-config. I also changed our use of derive_builder to always use a common error type, to avoid error type proliferation.
* Typo fix from reddit thread.Nick Mathewson2021-11-171-1/+1
|
* Remove dependency from arti-client to tor-config.Nick Mathewson2021-11-162-9/+13
| | | | | I'm about to make tor-config a higher-level module, so it can't be a dependency for tor-config.
* Fix typosDimitris Apostolou2021-11-121-1/+1
|
* Document that the "experimental-api" feature is not semver-covered.Nick Mathewson2021-11-111-0/+5
|
* Merge IpVersionPreferences and the optimistic flag into one type.Nick Mathewson2021-11-101-18/+32
| | | | | It seems like a good time to do this, before we add a zillion other arguments to begin_stream.
* Implement optimistic streamYuan Lyu2021-11-091-1/+13
|
* Bump all crate versions to 0.0.1Nick Mathewson2021-10-291-9/+9
|
* Update README.md filesNick Mathewson2021-10-291-6/+10
|
* Improve docs of more (potentially re-exported) arti-client typeseta2021-10-292-12/+45
| | | | | | | | | | | | | | | | | | | | | Most of the structs in `arti-client` have example code now, to give a clearer idea of how they're used. Annoyingly, a lot of the types exposed in `arti-client` are actually re-exports, which makes documentation a bit harder: example code that references other parts of `arti-client` can't actually be run as a doctest, since the crate it's in is a dependency of `arti-client`. We might be able to fix this in future by doing the documentation in `arti-client` itself, but rustdoc seems to have some weird behaviours there that need to be investigated first (for example, it seems to merge the re-export and original documentation, and also put the re-export documentation on the `impl` block for some reason). For now, though, this commit just writes the docs from the point of view of an `arti-client` consumer, removing notes specific to the crate in which they're defined. It's not ideal, but at least the end user experience is decent.
* Try writing a bit more documentation for configuration types.Nick Mathewson2021-10-281-6/+40
|
* Encourage the use of TorClient::clone().Nick Mathewson2021-10-281-1/+2
|
* arti-client example: Try to make the comments a little more clear.Nick Mathewson2021-10-281-6/+10
| | | | | I'm not 100% sure this is better, but it might help the user understand how Arti works a bit better.
* Update README.md filesNick Mathewson2021-10-281-13/+90
|
* Improve top-level arti-client documentation, add example codeeta2021-10-283-16/+146
| | | | | | | | | | | | | | | | | | | | | 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)
* Update our disclaimers and limitations sections.Nick Mathewson2021-10-272-32/+14
|
* TorClient::resolve_ptr should take an IpAddr.Nick Mathewson2021-10-262-9/+1
|