summaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
* | Fix a typo in a comment.Nick Mathewson2021-10-251-1/+1
| |
* | Migrate tor-dirmgr from chrono to time 0.3Nick Mathewson2021-10-243-36/+40
| | | | | | | | | | (This appears to be the emerging consensus of how to handle RUSTSEC-2020-0159.)
* | Migrate tor-netdoc from chrono to time 0.3Nick Mathewson2021-10-242-5/+8
| | | | | | | | | | (This appears to be the emerging consensus of how to handle RUSTSEC-2020-0159.)
* | Upgrade to latest tracing-{subscriber,journald}Nick Mathewson2021-10-232-3/+3
| |
* | Upgrade to new version of simple_asn1.Nick Mathewson2021-10-221-1/+1
| |
* | Run "cargo fix --edition-idioms=2018".Nick Mathewson2021-10-224-5/+5
| |
* | Replace references to arti-client in the documentation.Nick Mathewson2021-10-218-11/+11
| |
* | Rename tor_client/arti_tor_client to arti_client.Nick Mathewson2021-10-2111-30/+22
| | | | | | | | | | | | Solves a name conflict with the existing tor_client create. Closes #130.
* | Remove #![allow(clippy::unnecessary_wraps)] in tor-proto.Nick Mathewson2021-10-211-1/+0
| |
* | Remove #![allow(unreachable_pub)] in shared_ref.rsNick Mathewson2021-10-211-7/+5
| |
* | Remove #![allow(clippy::unwrap_used)] in cmdline.rsNick Mathewson2021-10-211-1/+0
| |
* | Remove #![allow_unused] in tor_chanmgr::mgrNick Mathewson2021-10-212-1/+4
| |
* | Remove #![allow(dead_code)] in timeouts.rsNick Mathewson2021-10-212-2/+3
| |
* | Merge branch 'share_state'Nick Mathewson2021-10-2120-330/+718
|\ \
| * | Implement the guard side of shared state directories.Nick Mathewson2021-10-214-3/+51
| | |
| * | Mark consensus as "not-pending" even if its microdescs come from cache.Nick Mathewson2021-10-203-8/+48
| | | | | | | | | | | | | | | | | | | | | Previously our code would clear the 'pending' flag on a consensus only when a _downloaded_ md made it become usable. Closes #199.
| * | Move tor-dirmgr to use a sync::Mutex.Nick Mathewson2021-10-203-45/+36
| | | | | | | | | | | | | | | The futures::lock::Mutex was unnecessary, since we never held it when we were suspending.
| * | Finish the timeout-inference side of shared state.Nick Mathewson2021-10-204-32/+113
| | |
| * | Add a timeout estimator to take estimates from another process.Nick Mathewson2021-10-204-42/+93
| | |
| * | Allow type of timeout estimator to change at runtime.Nick Mathewson2021-10-205-201/+298
| | | | | | | | | | | | | | | | | | This is a big change, but it does simplify the type of Builder a little, and isolates locking across different (potential) timeout estimator types.
| * | Remove try_lock from StorageHandle.Nick Mathewson2021-10-202-8/+2
| | |
| * | Replace the return type of StorageMgr::try_lock with a tristateNick Mathewson2021-10-208-46/+86
| | | | | | | | | | | | | | | It's useful to know now only if we now have the lock, but also if we just got it for the first time.
| * | Initial work on periodically reloading state.Nick Mathewson2021-10-194-28/+54
| | | | | | | | | | | | | | | We can use this in the case where we don't get the lock on the state file, because another process is running.
| * | On startup, try to lock the state file, and log whether we succeed.Nick Mathewson2021-10-191-1/+9
| | | | | | | | | | | | | | | Previously we'd try to grab the lock the first time we wrote to the file.
* | | fallbackdir: Regenerate list for October 2021David Goulet2021-10-211-881/+870
| |/ |/| | | | | | | | | Closes #200 Signed-off-by: David Goulet <[email protected]>
* | Remove unused d_pre from DiffResult.Nick Mathewson2021-10-201-24/+15
| |
* | Implement the "request_loyalty" configuration optionNick Mathewson2021-10-191-2/+1
| |
* | Fix most warnings from nightly.Nick Mathewson2021-10-1911-21/+24
| | | | | | | | (One represents code that I forgot to write.)
* | Fix a broken rustdoc link.Nick Mathewson2021-10-191-1/+1
| |
* | tor-client/examples: add `hyper` exampleeta2021-10-192-0/+165
| | | | | | | | | | | | | | The new `hyper` tor-client example demonstrates integrating arti with the popular Rust `hyper` HTTP library by implementing a custom Hyper "connector" (a type that can initiate connections to HTTP servers) that proxies said connections via the Tor network.
* | Also implement tokio Async{Read,Write} on Data{Reader,Writer}.Nick Mathewson2021-10-191-5/+31
| | | | | | | | | | | | | | | | This will let callers use the tokio traits on these types too, if they call `split()` on the DataStream. (Tokio also has a `tokio::io::split()` method, but it requires a lock whereas `DataStream::split()` doesn't.)
* | Add a little documentation about when you'll need the tokio trait.Nick Mathewson2021-10-191-0/+7
| |
* | Merge remote-tracking branch 'origin/mr/97'Nick Mathewson2021-10-193-1/+38
|\ \
| * | tor-proto: implement tokio Async{Read, Write} traits conditionallyeta2021-10-193-1/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | futures::io::AsyncRead (and Write) isn't the same thing as tokio::io::AsyncRead, which is a somewhat annoying misfeature of the Rust async ecosystem (!). To mitigate this somewhat for people trying to use the `DataStream` struct with tokio, implement the tokio versions of the above traits using `tokio-util`'s compat layer, if a crate feature (`tokio`) is enabled.
* | | Move TorClientBuilder into tor_client::config, for consistency.Nick Mathewson2021-10-193-61/+62
| | |
* | | Make elements of TorClientConfig private.Nick Mathewson2021-10-193-18/+15
|/ /
* / tor-client: refactor TorClient::bootstrap's args into a config objecteta2021-10-198-30/+96
|/ | | | | | | | | | | | | The three arguments TorClient::bootstrap requires by way of configuration have been factored into a new TorClientConfig object. This object gains two associated functions: one which uses `tor_config`'s `CfgPath` machinery to generate sane defaults for the state and cache directories, and one that accepts said directories in order to create a config object with those inserted. (this commit was inspired by trying to use arti as a library and being somewhat overwhelmed by the amount of config stuff there was to do :p)
* Fix some typos in comments.Nick Mathewson2021-10-192-2/+2
| | | | Also, tell the "typos" tool to ignore Cargo.lock.
* Reverse two swapped log messagesNick Mathewson2021-10-191-2/+2
|
* Improve logging when trying to get the lock on the directory cache.Nick Mathewson2021-10-191-3/+20
| | | | | | Previously we'd say that we were "waiting for the other process to bootstrap" even if it was already bootstrapped: and we wouldn't actually declare success when it was done.
* Remove Guard::get_relay(); use Guard::guard_id().get_relay().Nick Mathewson2021-10-191-12/+4
| | | | | | | | | The `get_relay` function was confusing, since it would return None if the relay was present, but wasn't actually a guard. We only used it in one place, and in that one place we used it wrong, leading to a panic bug. Fixes #193.
* Remove special-case for ipv6 in is_valid_hostnameNick Mathewson2021-10-181-10/+2
|
* Use a proper RFC5737 address in tests.Nick Mathewson2021-10-181-2/+2
|
* Add the "clock" feature to chrono in netdoc.Nick Mathewson2021-10-181-1/+1
| | | | | | This seems to fix a bug when running cargo check on netdoc individually. Reported by @janimo
* Move hostname enforcement into TorAddr.Nick Mathewson2021-10-182-97/+132
|
* Change how we connect to target addresses.Nick Mathewson2021-10-185-9/+262
| | | | | | | Now we all both address:port, (address, port), and more. We also allow SocketAddr and IpAddr, but only via a trait labeled as "Dangerous".
* Remove "internal" address checking to its own function.Nick Mathewson2021-10-181-38/+45
|
* Merge branch 'reject_bad_hostnames'Nick Mathewson2021-10-186-3/+144
|\
| * Rename is_localhost to allow_local_addrs, and apply it to IPs too.Nick Mathewson2021-10-183-8/+13
| |
| * Formatting fixesNeel Chauhan2021-10-062-5/+9
| |