Skip to content

Conversation

@Davidson-Souza
Copy link
Member

Up to now, peers would only use TcpSockets for connecting with others. But it would be nice if we can use other transports, like a SOCKS proxy or Tor's Arti. This WIP refactors Peer to accept any transport.

@Davidson-Souza Davidson-Souza force-pushed the use-tor-peers branch 2 times, most recently from 4792333 to c4bd255 Compare August 31, 2023 20:17
@Davidson-Souza Davidson-Souza marked this pull request as ready for review September 8, 2023 21:21
Up to now, peers would only use TcpSockets for connecting with others.
But it would be nice if we can use other transports, like a SOCKS proxy
or Tor's Arti.

This commit introduces the `Transport` trait, and makes peer generic
over something that implements `Transport`.
This commit introduces a method to create a peer given an (already
established) connection. This will be used by the caller to pass
arbitrary transports to the peer.
This commit adds a module to handle the SOCKS5 handshake over a generic
stream, and yield a valid stream that is ready to be writen as if there
was no proxy at all.

This is useful for proxyed connections and connecting to annonimizing
networks like Tor.
Users of florestad can setup a proxy by using the ``--proxy` cli option
@Davidson-Souza Davidson-Souza changed the title [WIP] Make peer generic over transport Make peer generic over transport Sep 10, 2023
@Davidson-Souza Davidson-Souza merged commit 14026ea into master Sep 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant