Crates.io | libp2p-community-tor |
lib.rs | libp2p-community-tor |
version | 0.3.0-alpha |
source | src |
created_at | 2022-11-24 13:30:51.350638 |
updated_at | 2023-03-30 10:29:15.100861 |
description | Tor transport for libp2p. |
homepage | |
repository | https://github.com/umgefahren/libp2p-tor |
max_upload_size | |
id | 722209 |
size | 155,553 |
Tor based transport for libp2p. Connect through the Tor network to TCP listeners.
Build on top of Arti.
Although the sound of "Tor" might convey a sense of security it is very easy to misuse this crate and leaking private information while using. Study libp2p carefully and try to make sure you fully understand it's current limits regarding privacy. I.e. using identify might already render this transport obsolete.
This transport explicitly doesn't provide any enhanced privacy if it's just used like a regular transport. Use with caution and at your own risk. Don't just blindly advertise Tor without fully understanding what you are dealing with.
This won't work:
cargo add libp2p-community-tor@0.3.0-alpha
You have to choose a TLS provider and a runtime. The TLS providers are:
The runtimes are:
rustls | native-tls | |
---|---|---|
tokio | cargo add libp2p-community-tor@0.3.0-alpha -F tokio,rustls |
cargo add libp2p-community-tor@0.3.0-alpha -F tokio,native-tls |
async-std | cargo add libp2p-community-tor@0.3.0-alpha -F async-std,rustls |
cargo add libp2p-community-tor@0.3.0-alpha -F async-std,native-tls |
let address = "/dns/www.torproject.org/tcp/1000".parse()?;
let mut transport = libp2p_community_tor::AsyncStdNativeTlsTorTransport::bootstrapped().await?;
// we have achieved tor connection
let _conn = transport.dial(address)?.await?;
This crate originates in a PR to bring Tor support too rust-libp2p. Read more about it here: libp2p/rust-libp2p#2899
License: MIT