summaryrefslogtreecommitdiff
path: root/tor-client/src
Commit message (Collapse)AuthorAgeFilesLines
* Rename tor-client to arti-tor-client for now.Nick Mathewson2021-06-241-1/+5
|
* Fix some warnings about needless & from nightly clippyNick Mathewson2021-06-181-1/+1
|
* Add noop_method_call warning.Nick Mathewson2021-05-271-0/+1
| | | | | | This would have saved ahf and me a lot of confusion in debugging a situation where we were cloning a reference of a type that didn't implement Clone.
* Use the "typos" tool to fix some spellingNick Mathewson2021-05-261-1/+1
|
* Enable cargo_common_metadata warning.Nick Mathewson2021-05-251-0/+1
|
* Add a link tto the tor website to arti blurb.Nick Mathewson2021-05-241-1/+2
|
* Add tor-proto docs and tweak docs+apis elsewhere.Nick Mathewson2021-05-211-1/+15
|
* improve crate doc for tor-client.Nick Mathewson2021-05-211-3/+59
|
* Add the "unreachable_pub" lint.Nick Mathewson2021-05-181-0/+1
| | | | | | This is a somewhat obnoxious change in its scope and requirements, but it makes it easier to understand what the real public and private parts of our APIs are.
* Check "connection" usage for when stream or channel would be better.Nick Mathewson2021-05-181-5/+6
|
* Remove tor-proto exposure in tor-client API.Nick Mathewson2021-05-181-5/+34
|
* Rename NetDirConfig to DirMgrConfig.Nick Mathewson2021-05-141-2/+2
|
* Add trait_duplication_in_bounds warning.Nick Mathewson2021-05-031-0/+1
|
* Add unseparated_literal_suffix lint, and fix it.Nick Mathewson2021-05-031-0/+1
|
* Add a few more clippy warningsNick Mathewson2021-05-031-0/+5
|
* Fix experimental-api feature after refactoringDavid Goulet2021-05-031-2/+2
| | | | | | | | | Important refactoring happened recently which broke the "experimental-api" feature. Fixes are quite simple. Signed-off-by: David Goulet <[email protected]>
* Add some more clippy warnings to our list.Nick Mathewson2021-04-271-1/+6
|
* Enforce (and obey) clippy lints about exhaustive enums, structs.Nick Mathewson2021-04-271-0/+3
| | | | | | | | These lints force us to declare our exported enums and exhaustive-looking structs as non-exhaustive (so that we can add to them in the future without breaking our API) or to explicitly disable the warning for a given enum/struct (to say that we _intend_ for additions to be a breaking change).
* Refactor and simplify ChanMgr to use AbstractChanMgr.Nick Mathewson2021-04-231-6/+1
|
* Move timer functions into an extension trait.Nick Mathewson2021-04-171-3/+5
|
* Move around the public modules in tor_rtcompat.Nick Mathewson2021-04-171-1/+1
|
* Remove all non-runtime methods in tor_rtcompat.Nick Mathewson2021-04-161-7/+21
|
* Add a "Runtime" parameter to all the manager types.Nick Mathewson2021-04-161-8/+7
| | | | | This is a big change, but it is a step towards our goal of removing tor_rtcompat:: calls directly.
* rtcompat: Make TLS functionality use Runtime traits.Nick Mathewson2021-04-161-1/+6
| | | | | Now there is nothing in principle that you couldn't access from a Runtime implementation.
* circmgr: Add a function to build a circuit by pathDavid Goulet2021-04-071-0/+9
| | | | | | | Public function so an application can use to build a circuit using a custom path. Signed-off-by: David Goulet <[email protected]>
* DirMgr::netdir() is no longer asyncNick Mathewson2021-04-021-1/+1
| | | | | | | | Since we moved to a non-async mutex(*), we no longer need to worry that this function might need to suspend. (*) This is _not_ safe in general, but it's okay in this case, since we never suspend while holding that mutex: see shared_ref.rs.
* Client: Add a function to expose the current dirmgr.Nick Mathewson2021-03-301-0/+9
| | | | | | | | This function sits behind an `experimental-api` feature so that we don't need to worry about exposing the entire surface of DirMgr to our API consumers. This and the other recent patches are based on work from dgoulet.
* Fix Rust-1.51 clippy warnings about acronyms in camel case.Nick Mathewson2021-03-291-5/+5
| | | | This is painful, but we shouldn't have to do it again.
* Move stream timeout logic into tor-client.Nick Mathewson2021-03-241-3/+6
| | | | | | | | | | This is consistent with the other pieces of tor-proto, which do not handle timeouts on their own. It also lets us remove tor-rtcompat as a dependency from tor-proto, and simplify some of the test cases to use async_test. This commit unindents a lot of test code; use git's "-b" flag to read the parts that matter.
* Move responsibility for knowing about TLS into tor_rtcompat.Nick Mathewson2021-03-231-1/+1
| | | | Now we don't need runtime-specific stuff in tor-chanmgr.
* Move our command-line interface into a new crate called "arti".Nick Mathewson2021-03-176-1212/+0
| | | | Closes #106
* Improve implementation of copy_interactiveNick Mathewson2021-03-121-11/+50
| | | | | | | Previously we'd flush after every write. Now we only flush when the reader has nothing more to tell us. This way we can be sure that we're sending out the data as soon as we can, without leaving any cells partially filled unnecessarily.
* Use AsyncRead and AsyncWrite in our proxy implementationNick Mathewson2021-03-101-29/+34
|
* Refactor DataStream constituents a bit.Nick Mathewson2021-03-091-1/+1
| | | | | | | | | These new (internal so far) APIs correspond more closely to what we'll need for AsyncRead and AsyncWrite. We also make write methods take a mutable reference to self, since that seems to be (closer to) what the AsyncRead/AsyncWrite code expects.
* Remove use of unwrap() in tor-client.Nick Mathewson2021-03-042-7/+15
|
* Port to work with tokio or async-std.Nick Mathewson2021-03-021-2/+11
| | | | | | | | | | | | | | | | | | This is fairly ugly and I think I'll need to mess around with the feature configuration a while until we get something that's pleasant to develop with. This still seems like a good idea, though, since we _will_ need to be executor-agnostic in the end, or we'll have no way to handle wasm or embedded environments. Later down the road, we'll probably want to use futures::Executor or futures::Spawn more than having global entry points in tor_rtcompat. That would probably make our feature story simpler. Tokio is the default now, since tokio seems to be more heavily used for performance-critical stuff. This patch breaks tests; the next one will fix them, albeit questionably.
* Move .onion check into TorClient.Nick Mathewson2021-02-252-7/+5
|
* Clean-ups for documentations and lints in tor-clientNick Mathewson2021-02-252-10/+24
|
* Use a ConnectPref type for TorClient::connect, simplify APIs a bit, doc some.Nick Mathewson2021-02-253-23/+90
|
* Restore code in proxy.rs so that socks timeout errors work againNick Mathewson2021-02-252-15/+17
| | | | | This isn't pretty, since it now has to use anyhow::downcast_ref(). I've noted a TODO about maybe not using anyhow::Error for this case.
* Start refactoring the tor-client crate.Nick Mathewson2021-02-254-199/+252
| | | | | This commit splits the proxy and client code into a proper module, and keeps a stripped down version of the main.rs file.
* Make first-level directory retry logic configurable.Nick Mathewson2021-02-171-5/+16
|
* Make our initial bootstrap retry schedule configurarableNick Mathewson2021-02-172-1/+17
|
* Add support to override network parameters in the configuration.Nick Mathewson2021-02-161-0/+8
|
* Apply "deny_unknown_fields" to configuration types.Nick Mathewson2021-02-121-0/+2
|
* Implement storage-directory configuration.Nick Mathewson2021-02-122-0/+28
| | | | | | | This affects the cache_dir and the as-yet-unused state_dir. It uses the shellexpand and directories crates so that the default values can be constant strings that use variables to refer to the right default locations.
* Add comments to default config filesNick Mathewson2021-02-113-5/+14
|
* Make authorities and fallbacks configurable.Nick Mathewson2021-02-113-14/+782
| | | | | | | | | | This commit adds configuration options for these values, with the right defaults, and uses those options instead of built-in functions to set them. We also remove the function to extract information from chutney directories: now that arti is configurable, it can be chutney's job to make its own network configurations.
* Add a test to make sure defaults are parseable.Nick Mathewson2021-02-101-0/+19
|
* Move defaults into a toml file.Nick Mathewson2021-02-102-4/+15
|