libp2p / specs

Technical specifications for the libp2p networking stack
https://libp2p.io
1.53k stars 272 forks source link

Onion Routing for libp2p #472

Open umgefahren opened 1 year ago

umgefahren commented 1 year ago

This might be a duplicate of #200.

Proposal

I would like to propose defining and implementing a way of doing onion routing through libp2p. This is explicitly not about integrating onion routing based transports like Tor or I2P into libp2p but rather about a onion router in libp2p that can be used as well as a behaviour and a transport.

Since there are many different opinions on how to do onion routing right I would suggest only defining the onion routing itself, i.e. the key agreement as well as traffic forwarding. Other aspects like how the route is built, the list of available entry, exit and middle nodes is retrieved should be left to the user of libp2p as it's sometimes highly specific to the use case. Furthermore there should be a way of letting behaviors know that they should use the onion router for something.

Related issues / PRs

marten-seemann commented 1 year ago

I would like to propose defining and implementing a way of doing onion routing through libp2p. This is explicitly not about integrating onion routing based transports like Tor or I2P into libp2p but rather about a onion router in libp2p that can be used as well as a behaviour and a transport.

I'm not sure I understand this correctly. Can you please elaborate on the difference between through and over?

umgefahren commented 1 year ago

I'm not sure I understand this correctly. Can you please elaborate on the difference between through and over?

Through means utilizing libp2p itself to do onion routing with other libp2p nodes. I.e. using libp2p transports, behaviors etc to build an onion router.

In other words: Using libp2p to build an onion router and integrating it into libp2p. I hope that clarifies.