Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Onion routing considerations for libp2p #200

Open
Mikerah opened this issue Aug 1, 2019 · 18 comments
Open

Onion routing considerations for libp2p #200

Mikerah opened this issue Aug 1, 2019 · 18 comments

Comments

@Mikerah
Copy link
Contributor

Mikerah commented Aug 1, 2019

It's been great seeing all the progress in standardizing various aspects of libp2p in the past few months. Great work.

I just want to bring up implementing onion routing over libp2p. Past work has focused mainly on adding Tor onion routing as a libp2p transport (see here). However, Tor is just one way to do onion routing. Recent work by @gpestana has focused on other onion routing protocols like HORNET. Even though every onion routing protocol has its quirks, it would be great to start standardizing onion routing over libp2p.

@raulk
Copy link
Member

raulk commented Aug 1, 2019

@Mikerah ack! Do you have bandwidth to help us assess state of the art and possible design directions? PL could consider funding a small grant for this.

@Mikerah
Copy link
Contributor Author

Mikerah commented Aug 1, 2019

I do! Hit me up on telegram.

@gpestana
Copy link

gpestana commented Aug 1, 2019

@Mikerah nice, I'd love to help with this!

@cheako
Copy link

cheako commented Jan 6, 2022

I've been reviewing Arti, tor implemented in Rust. I'm planing on using tor bridges as relays for #312

@wheresaddie
Copy link

bumping this issue as we currently are discussing implementation and are planning to align during Lisbon on next steps

@mxinden
Copy link
Member

mxinden commented Oct 21, 2022

Cross referencing libp2p/rust-libp2p#2899 by @umgefahren here.

@umgefahren
Copy link

Cross referencing libp2p/rust-libp2p#2899 by @umgefahren here.

This effort however is just an implementation of Tor as a transport for rust-libp2p.

Just for clarification: Is this about standardizing Onion Routers / Mixnets as libp2p transports (relying on non libp2p p2p networks, i.e. I2P, Tor and ones that use libp2p like hoprnet) or defining a general way of using libp2p for Onion Routing? Considering the latter I'm thinking of a mixture between protocol, transport and multiplexer or in other words providing ways to route traffic through other libp2p nodes like Tor nodes do (I know we do something similar for NAT).

Both things are interesting. Although the latter would be really challenging from my point of view. Regardless I would be happy to participate here, since I already developed the Tor transport for rust-libp2p and I will be in Lisbon too.

Finally I want to point out that there is more to Tor than just the onion routing. The ability to do DNS while keeping a Tor client anonymous and hidden services are at least as important as the onion routing. Last but not least the anti-censorship and hole punching capabilities are very important too. There are really good reasons to make these parts also available to libp2p, although there are not directly onion routing.

@TheRook
Copy link

TheRook commented Feb 8, 2023

@umgefahren I agree that privacy and censorship are really separate. Censorship is really about blending in an ibp2p-tls is maybe a little closer to HTTPS than Tor. Have you seen the https://snowflake.torproject.org/ project?

Finally I want to point out that there is more to Tor than just the onion routing. The ability to do DNS while keeping a Tor client anonymous and hidden services are at least as important as the onion routing. Last but not least the anti-censorship and hole punching capabilities are very important too. There are really good reasons to make these parts also available to libp2p, although there are not directly onion routing.

@cheako
Copy link

cheako commented Feb 10, 2023

@TheRook I opened a ticket with snowflake to migrate it to libp2p... but after some research I discovered that the libp2p on wire protocol is insufficient for what I was thinking and stopped as the result would have been another bespoke protocol. Specifically, libp2p applications can't share a signaler where the signal server can mandate clients advertise something like the snowflake protocol.

@TheRook
Copy link

TheRook commented Feb 10, 2023

@cheako I think the existing TLS and webrtc are really the best transports we could be using to avoid deep-packet inspection. Because we have TLS, I was suggesting we just adopt snowflake's bootstrapping system which is a lot easier to do that impalement some kind of onion routing or an exotic protocol, which i don't see helping with the problem of censorship - at least not right away.

If I am not mistaken, I think we can piggyback on snowflake's bootstrapping infrastructure and use it to from connections to the libp2p DHT without using Tor at all.

Certificate pinning to build trusted connections will likely have a much more meaningful important impact on the network, and it doesn't incur additional network overhead as with onion routing. We have observed content filters MITM'ing TLS, and without a certificate authority our options are limited, but cert pinning is a still viable solution to the problem of MITM. We can also use snowflake to make our TLS appear more similar to HTTPS, and I think this is a good feature to support.

@TheRook
Copy link

TheRook commented Feb 13, 2023

@cheako On the privacy front - it looks like we have a libp2p onion router in golang here:
https://github.com/hashmatter/libp2p-onion-routing

There are other privacy preserving features implanted by hashmatter which work together that can be found below:
https://github.com/hashmatter/p3lib

@cheako
Copy link

cheako commented Feb 22, 2023

@TheRook
My interests are regarding nat traversal. I'm interested in small networks ~5nodes where all of them are behind nat. My goal is for the solution to be accessible to my 7year old self, servers and domains should be provided by volunteers.

For example, what if a dozen networks share a signaling server, you'd want advanced routing taking place on the signaling server. I also want things like the signaling server to be able to mandate and enforce well-behaved clients. That is, if the admin wants to only allow clients that support kad-dht that should be possible in a secure way.

For me, this is a big dream.

@TheRook
Copy link

TheRook commented Feb 22, 2023 via email

@randomodbuild
Copy link

Now that browser to browser WebRTC has been implemented in js-libp2p, are there any updates to implementing onion routing? Could help protect privacy as well as evading censorship for those in restrictive networks who need to bootstrap.

@TheRook
Copy link

TheRook commented May 12, 2023

Now that browser to browser WebRTC has been implemented in js-libp2p, are there any updates to implementing onion routing? Could help protect privacy as well as evading censorship for those in restrictive networks who need to bootstrap.

Onion routing has already been implemented, but hasn't been merged. IPFS is a VC scam to get people to pay for data services.

@randomodbuild
Copy link

What? Care to elaborate.

@TheRook
Copy link

TheRook commented May 26, 2023 via email

@AustinFoss
Copy link

I

Now that browser to browser WebRTC has been implemented in js-libp2p, are there any updates to implementing onion routing? Could help protect privacy as well as evading censorship for those in restrictive networks who need to bootstrap.

I just came looking for this sort of open issue after finding that previously mentioned library that "has already been implemented" and the youtube presentation.

IMO i don't think that libp2p will have thing like onion routing ever added as a core part of it's protocol. Could be wrong on that but it's just my intuition. There are ways of tunneling IPFS over Tor from a server node but for a browser context projects like this may be more well suited: https://github.com/Ayms/node-Tor/tree/master

Though both solutions mentioned so far do not seem quite complete. Being able to anonymize libp2p will happen but it is still relatively early days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Triage
Development

No branches or pull requests

10 participants