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

Add the SOCKSv{4,5} support to be able to pass through the Tor network #49

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

dinosaure
Copy link
Owner

This PR breaks our protocol where the identity of peers matters now. The identity is not the IP address of the peer but a seed generated by the relay. The relay send this seed to peers and we use them to initiate then a secure room which does not rely on the public IP address (which can change now via the Tor protocol).

This PR also improve a bit how we handle Bob's packets and events. Now, the sender has an identity generated by the relay and the receiver receive a request from a certain identity. If this identity matches with the sender's identity (which show up into the CLI), the receiver can safely accepts the incoming PACK file now.

We need to test it in real world, this PR is created as a draft.

To be able to use Tor, we must use something else to identify peers.
The identity is only specified by the relay now and peers must
acknowledge what the relay gives. A new event (as the Agreement) appears
mostly to notify up-front (on the CLI) the new identity of the peer via
our spelled word generator.
This function is used to show up a word you can spell from a seed sent
by the relay as your identity (in base64).
This patch factorize also the way to process packets. Currently, a
TCP/IP packet can have multiple Bob's packets. We try to parse all of
them and aggregate events if we go them (`Identity and `Agreement).
According to our protocol, we can not have multiple `Identity or
multiple `Agreement and `Identity can not appear with `Agreement (in
this last case, we raise an error).

The idea is to show up the identity given by the relay to the sender and
the receiver can confirm the reception if the identity of the sender
matches with what the real sender gave to it.

We ensure that the relay can **not** generate the same identity for 2
active peers.
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