Exchange proxy mode via signal (#727)

Before defining if we will use direct or proxy connection we will exchange a 
message with the other peer if the modes match we keep the decision 
from the shouldUseProxy function otherwise we skip using direct connection.

Added a feature support message to the signal protocol
This commit is contained in:
Maycon Santos
2023-03-16 16:46:17 +01:00
committed by GitHub
parent 6143b819c5
commit 731d3ae464
9 changed files with 463 additions and 54 deletions

View File

@ -46,10 +46,20 @@ message Body {
OFFER = 0;
ANSWER = 1;
CANDIDATE = 2;
MODE = 4;
}
Type type = 1;
string payload = 2;
// wgListenPort is an actual WireGuard listen port
uint32 wgListenPort = 3;
string netBirdVersion = 4;
Mode mode = 5;
// featuresSupported list of supported features by the client of this protocol
repeated uint32 featuresSupported = 6;
}
// Mode indicates a connection mode
message Mode {
optional bool direct = 1;
}