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

Adapt route encryption for old visors #507

Merged
merged 16 commits into from
Sep 3, 2020
Merged

Adapt route encryption for old visors #507

merged 16 commits into from
Sep 3, 2020

Conversation

Darkren
Copy link
Contributor

@Darkren Darkren commented Sep 1, 2020

Did you run make format && make check?
Yes
Fixes #501

Changes:

  • Handshake packet type was added;
  • Visor now exchange handshake packets while creating route groups. Initiator sends it first, remote visor responds. There are 3 possible cases here:
  1. both visors support route encryption. in this case handshake packets are exchanged, visors start communicating with the traffic encrypted;
  2. initiator supports encryption, while remote visor is not. in this case initiator sends handshake and waits for response. either it gets no response during timeout interval (2 seconds now) or it gets data packet. in both cases remote visor is known to not support the encryption, communication goes without it;
  3. initiator doesn't support encryption, while remote visor does. in this case remote visor waits for the handshake packet to come in. again, either 2 seconds timeout passes or data packet arrives. in both cases initiator is known to not support the encryption, communication goes without it.

How to test this PR:

  1. Setup 2 visors with some apps (VPN server and client, for example).
  2. Try to communicate. Should work for all visors supporting encryption and not.

@Darkren Darkren changed the title [WIP] Adapt route encryption for old visors Adapt route encryption for old visors Sep 1, 2020
@Darkren Darkren requested a review from nkryuchkov September 1, 2020 17:12
pkg/router/route_group.go Outdated Show resolved Hide resolved
@jdknives jdknives merged commit 68bd46f into skycoin:develop Sep 3, 2020
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.

3 participants