summaryrefslogtreecommitdiff
path: root/crates/tor-rtcompat
Commit message (Collapse)AuthorAgeFilesLines
* Bump arti- and tor- crates to 0.23.0Nick Mathewson2024-09-301-2/+2
| | | | | | | | | | | | | | Per our policy, every one of these gets a minor bump. Generated with: ``` for crate in $(./maint/list_crates | grep '^\(tor\|arti\)-' ); do cargo set-version --bump minor -p $crate; done ``` (Note the use of `-` at the end end of the grep pattern to prevent matching the `arti` crate.)
* Merge branch 'msrv-1.77-and-rusqlite-update' into 'main'David Goulet2024-09-261-1/+1
|\ | | | | | | | | Upgrade MSRV to 1.77 , and rusqlite to 0.32.1 See merge request tpo/core/arti!2451
| * Upgrade MSRV to 1.77Nick Mathewson2024-09-251-1/+1
| | | | | | | | This will allow us to upgrade to the latest version of rusqlite.
* | Upgrade to derive_more version 1.0.0Nick Mathewson2024-09-252-4/+3
|/ | | | | | The `derive_more` crate broke backward compatibility with this version, so this change involved quite a few manual fixups. With luck, they'll keep compatibility for some while in the future.
* rtcompat: Finalize names for general::SocketAddr.Nick Mathewson2024-09-242-44/+52
|
* rtcompat: Expose FakeStream and friends; fix compilation in tor-rtmockNick Mathewson2024-09-243-10/+8
| | | | | It turns out that these types are generally useful, and that they are in fact needed for tor-rtmock to compile without a PreferredRuntime.
* rtcompat: Fix some rustdoc links.Nick Mathewson2024-09-244-6/+6
|
* rtcompat: remove async_trait from NetStreamListener.Nick Mathewson2024-09-245-5/+1
| | | | (The trait no longer has any async methods.)
* Make Runtime require NetStreamProvider<unix::SocketAddr>Nick Mathewson2024-09-245-8/+28
|
* rtcompat: initial implementation for "Abstract" addresses.Nick Mathewson2024-09-242-0/+147
| | | | | This is feature-complete, but will need tests. I'm holding off at this point so we can discuss naming on these types.
* rtcompat: Require Sync and 'static for NetStreamListener::IncomingNick Mathewson2024-09-243-2/+7
|
* rtcompat: Add NetStreamProvider<Unix> to CompoundRuntimeNick Mathewson2024-09-243-39/+106
|
* rtcompat: NetStreamProvider<unix::SocketAddr> for non-unix platformsNick Mathewson2024-09-244-0/+108
| | | | | | | Since there is no way to construct a unix::SocketAddr on these platforms, it's harmless to provide an implementation for NetStreamProvider. What's more, doing so greatly simplifies our AbstractAddr implementation.
* Implement NetStramProvider<Unix> for async_std.Nick Mathewson2024-09-241-0/+23
|
* async_std: Perpare macro for use with Unix streams.Nick Mathewson2024-09-242-33/+35
|
* async_std: start a macro to implement wrappers for stream typeNick Mathewson2024-09-241-71/+79
| | | | | As before, this commit does nothing interesting: it's a separate commit because it reindents a lot of code.
* rtcompat: Implement NetStreamProvider<Unix> for tokio.Nick Mathewson2024-09-241-4/+60
|
* tokio: Perpare macro for use with Unix streams.Nick Mathewson2024-09-241-24/+31
|
* tokio: start a macro to implement wrappers for stream typeNick Mathewson2024-09-241-67/+74
| | | | | This commit does nothing interesting yet: it's a separate commit because it reindents a lot of code.
* rtcompat: Add ADDR parameter to NetStream{Provider,Listener}Nick Mathewson2024-09-241-11/+11
| | | | | | | | | This change will let us make a NetStreamProvider that works for AF_UNIX addresses, and for "abstract" addresses. I've decided to let this parameter have a default value of `std::net::SocketAddr` for now. We can remove the default later if we decide it's confusing.
* Documentation updates for "NetStreamProvider" renameNick Mathewson2024-09-243-21/+23
| | | | | | Stop referring to TCP streams in its documentation; update other documentation to refer to NetStreamProvider rather than TcpProvider.
* rtcompat: Rename TcpProvider to NetStreamProvider.Nick Mathewson2024-09-247-41/+41
| | | | | | | | | | | | | | (And similarly rename TcpListener to NetStreamListener, along with their TcpStream/TcpListener associated types.) These types are about to become generic over addresses, and therefore shouldn't be named after TCP. Renaming was done mostly with Rust Analyzer, except for some macros that needed to be hand-edited. (I'll revise the comments in the next commit; this one is all about renaming.)
* rtcompat: Remove accept() from TcpListenerNick Mathewson2024-09-245-11/+3
| | | | | | | | | | It's redundant with the incoming() method (which turns the TcpListener into a Stream of connections), and nothing actually used it outside of tests. Removing this method allows us to simplify our TcpListener code a good deal, as can be seen by some of the implementations we removed from our example and testing code.
* rtcompat: Add definitions for unix::SocketAddr.Nick Mathewson2024-09-243-0/+97
|
* rtcompat: reformat Cargo.tomlNick Mathewson2024-09-241-1/+5
|
* rtcompat: Add an extension trait for building modified RuntimesNick Mathewson2024-09-242-1/+68
| | | | | | | With this extension trait, we no longer need to construct `CompoundRuntime` directly outside of tor-rtcompat. This in turn will make it a little less painful when we have to add more generics to CompoundRuntime.
* Bump MSRV from 1.70 to 1.75.Wesley Aptekar-Cassels2024-09-161-1/+1
|
* Bump all the unstable tor- and arti- crates to 0.22.0.Gabriela Moldovan2024-09-031-2/+2
| | | | | | | | | | Done using: ``` for crate in $(./maint/list_crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.22.0 done ```
* Discourage use of `tor_rtmock_test_with_*` macrosIan Jackson2024-08-281-0/+16
| | | | New tests should usually use tor_rtmock::MockRuntime.
* Don't need to tell docs.rs to enable `docsrs` cfgKunal Mehta2024-08-021-1/+0
| | | | | It now does it automatically, see <https://docs.rs/about/builds#detecting-docsrs>.
* Bump versions for tor- and arti- crates to 0.21.0Nick Mathewson2024-08-011-2/+2
| | | | | | | | | | This is the result of: ``` for crate in $( ./maint/list_crates |grep '^\(tor\|arti-\)' ); do cargo set-version -p $crate 0.21.0 done ```
* Fix new "clippy::needless-maybe-sized" warning on nightlyNick Mathewson2024-07-281-2/+2
| | | | | This warning complains when we say `where T: SomeTrait + ?Sized` when `SomeTrait` is inherently Sized.
* Update versions of 0.x tor-* and arti-* cratesIan Jackson2024-06-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nailing-cargo -uE set-version -p arti-client 0.20.0 nailing-cargo -uE set-version -p arti-relay 0.20.0 nailing-cargo -uE set-version -p arti-rpcserver 0.20.0 nailing-cargo -uE set-version -p tor-async-utils 0.20.0 nailing-cargo -uE set-version -p tor-basic-utils 0.20.0 nailing-cargo -uE set-version -p tor-bytes 0.20.0 nailing-cargo -uE set-version -p tor-cell 0.20.0 nailing-cargo -uE set-version -p tor-cert 0.20.0 nailing-cargo -uE set-version -p tor-chanmgr 0.20.0 nailing-cargo -uE set-version -p tor-checkable 0.20.0 nailing-cargo -uE set-version -p tor-circmgr 0.20.0 nailing-cargo -uE set-version -p tor-config 0.20.0 nailing-cargo -uE set-version -p tor-consdiff 0.20.0 nailing-cargo -uE set-version -p tor-dirclient 0.20.0 nailing-cargo -uE set-version -p tor-dirmgr 0.20.0 nailing-cargo -uE set-version -p tor-error 0.20.0 nailing-cargo -uE set-version -p tor-geoip 0.20.0 nailing-cargo -uE set-version -p tor-guardmgr 0.20.0 nailing-cargo -uE set-version -p tor-hsclient 0.20.0 nailing-cargo -uE set-version -p tor-hscrypto 0.20.0 nailing-cargo -uE set-version -p tor-hsrproxy 0.20.0 nailing-cargo -uE set-version -p tor-hsservice 0.20.0 nailing-cargo -uE set-version -p tor-keymgr 0.20.0 nailing-cargo -uE set-version -p tor-linkspec 0.20.0 nailing-cargo -uE set-version -p tor-llcrypto 0.20.0 nailing-cargo -uE set-version -p tor-log-ratelim 0.20.0 nailing-cargo -uE set-version -p tor-memquota 0.20.0 nailing-cargo -uE set-version -p tor-netdir 0.20.0 nailing-cargo -uE set-version -p tor-netdoc 0.20.0 nailing-cargo -uE set-version -p tor-persist 0.20.0 nailing-cargo -uE set-version -p tor-proto 0.20.0 nailing-cargo -uE set-version -p tor-protover 0.20.0 nailing-cargo -uE set-version -p tor-ptmgr 0.20.0 nailing-cargo -uE set-version -p tor-relay-selection 0.20.0 nailing-cargo -uE set-version -p tor-rpcbase 0.20.0 nailing-cargo -uE set-version -p tor-rtcompat 0.20.0 nailing-cargo -uE set-version -p tor-rtmock 0.20.0 nailing-cargo -uE set-version -p tor-socksproto 0.20.0 nailing-cargo -uE set-version -p tor-units 0.20.0 Each of which runs a rune like cargo set-version --offline -p tor-units 0.20.0
* Run maint/fixup-featuresIan Jackson2024-06-251-1/+1
| | | | | | | | | | | Precisely nailing-cargo -Eu run -p fixup-features Cargo.toml These changes are just `full` propagation. Note the `?` in the arti-relay propagation, which is essential: we don't actually *enable* arti-relay at all, with this. Also, there is a formatting anomaly, which I'll fix in a moment.
* tls: Support export keying material (RFC 5705)David Goulet2024-06-186-0/+52
| | | | | | | | | | | | | Add a function to get the keying material as detailed by RFC 5705. Because native-tls doesn't have such support, there is a place holder panic!() for now. This means that for the forseable future, relay would only work with rustls until we figure out a solution for native-tls. Closes #1432 Signed-off-by: David Goulet <[email protected]>
* rtcompat: Set disable_built_in_roots With native_tls.Nick Mathewson2024-06-131-0/+4
| | | | | | | When using openssl on Linux, this saves us about 1.4 MB due to not loading the default CAs and CRLs (which Tor doesn't use.) Addresses part of #1027.
* Bump all the unstable tor- and arti- crates to 0.19.Gabriela Moldovan2024-06-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The unstable crates are: - tor-error - tor-config - tor-units - tor-geoip - tor-rtcompat - tor-rtmock - tor-log-ratelim - tor-rpcbase - tor-memquota - tor-llcrypto - tor-protover - tor-bytes - tor-hscrypto - tor-socksproto - tor-checkable - tor-cert - tor-linkspec - tor-cell - tor-proto - tor-netdoc - tor-consdiff - tor-netdir - tor-relay-selection - tor-persist - tor-chanmgr - tor-ptmgr - tor-guardmgr - tor-circmgr - tor-dirclient - tor-dirmgr - tor-keymgr - tor-hsclient - tor-hsservice - tor-hsrproxy - arti-client - arti-rpcserver - arti-hyper - tor-basic-utils - tor-async-utils Done using ``` for p in "${unstable[@]}"; do cargo set-version -p $p 0.19; done ``` where `unstable` contains the list above
* Re-run maint/add_warning.Nick Mathewson2024-05-061-2/+2
| | | | This commit is automatically generated.
* Bump versions of 0.x tor-* and arti-* cratesIan Jackson2024-04-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | for p in `cat ../u`; do cargo set-version --locked --offline -p $p; done where u contains tor-basic-utils tor-async-utils tor-error tor-config tor-units tor-geoip tor-rtcompat tor-rtmock tor-log-ratelim tor-rpcbase tor-memquota tor-llcrypto tor-protover tor-bytes tor-hscrypto tor-socksproto tor-checkable tor-cert tor-linkspec tor-cell tor-proto tor-netdoc tor-consdiff tor-netdir tor-relay-selection tor-persist tor-chanmgr tor-ptmgr tor-guardmgr tor-circmgr tor-dirclient tor-dirmgr tor-keymgr tor-hsclient tor-hsservice tor-hsrproxy arti-client arti-rpcserver arti-hyper
* Add a note about CryptoProvicder.Nick Mathewson2024-04-221-0/+4
|
* rustls: Avoid aws-lc-rs for now.Nick Mathewson2024-04-221-1/+1
|
* Upgrade to futures-rustls 0.26.0, rustls 0.23.5.Nick Mathewson2024-04-222-1/+16
| | | | | | | | | The rustls upgrade will solve #1377 and CVE-2024-32650. Note that we've had to patch our RustlsProvider impl a bit in order to keep the tests passing. See comments. Closes #1377.
* tor-rtcompat: Add CoarseTimeProvider to docs for Runtime traitIan Jackson2024-04-151-0/+1
| | | | I overlooked this, apparently.
* Remove semver.md files from arti-1.2.1 releaseNick Mathewson2024-04-021-3/+0
|
* Update unstable `tor/arti-*` crates to 0.17.0.Nick Mathewson2024-04-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Done with: ``` CRATES=" tor-basic-utils tor-async-utils tor-error tor-config tor-events tor-units tor-geoip tor-rtcompat tor-rtmock tor-log-ratelim tor-rpcbase tor-llcrypto tor-protover tor-bytes tor-hscrypto tor-hspow tor-socksproto tor-checkable tor-cert tor-linkspec tor-cell tor-proto tor-netdoc tor-consdiff tor-netdir tor-relay-selection tor-congestion tor-persist tor-chanmgr tor-ptmgr tor-guardmgr tor-circmgr tor-dirclient tor-dirmgr tor-keymgr tor-hsclient tor-hsservice tor-hsrproxy arti-client arti-rpcserver arti-config arti-hyper arti-bench arti-testing " for crate in $CRATES; do cargo set-version -p "$crate" 0.17.0 done ```
* tor-rtcompat: Rename coarsetime module to coarse_timeIan Jackson2024-03-253-3/+3
| | | | | Modules with the same name as external crates don't work well with our MSRV.
* tor-rtcompat: coarsetime: Add a comment about doc statusIan Jackson2024-03-251-0/+4
|
* tor-rtcompat: Make Runtime imply CoarseTimeProvider, etc.Ian Jackson2024-03-252-0/+3
| | | | We must also impl CoarseTimeProvider for mocked runtimes.
* tor-rtcompat: implement_opaque_runtime impls CoarseTimeProviderIan Jackson2024-03-251-0/+7
| | | | Now all our non-mock runtime types impl CoarseTimeProvider.
* tor-rtcompat: CompoundRuntime: Add a CoarseTimeProvider, and impl (fmt)Ian Jackson2024-03-253-8/+29
|