-
Notifications
You must be signed in to change notification settings - Fork 4
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
dinosaure
wants to merge
12
commits into
main
Choose a base branch
from
socks
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dinosaure
force-pushed
the
socks
branch
3 times, most recently
from
November 2, 2023 17:11
0e9d633
to
056b9b9
Compare
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.