mirror of
https://github.com/netbirdio/netbird.git
synced 2024-11-25 09:33:24 +01:00
d27eb317aa
* chore: update signal gRpc * chore: add Signal keep alive params and policy * feature: add signal TLS support * refactor: move signal Dockerfile to the corresponding folder Co-authored-by: braginini <m.bragin@wiretrustee.com>
52 lines
1.5 KiB
Protocol Buffer
52 lines
1.5 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
import "google/protobuf/descriptor.proto";
|
|
|
|
option go_package = "/proto";
|
|
|
|
package signalexchange;
|
|
|
|
service SignalExchange {
|
|
// Synchronously connect to the Signal Exchange service offering connection candidates and waiting for connection candidates from the other party (remote peer)
|
|
rpc Send(EncryptedMessage) returns (EncryptedMessage) {}
|
|
// Connect to the Signal Exchange service offering connection candidates and maintain a channel for receiving candidates from the other party (remote peer)
|
|
rpc ConnectStream(stream EncryptedMessage) returns (stream EncryptedMessage) {}
|
|
}
|
|
|
|
// Used for sending through signal.
|
|
// The body of this message is the Body message encrypted with the Wireguard private key and the remote Peer key
|
|
message EncryptedMessage {
|
|
|
|
// Wireguard public key
|
|
string key = 2;
|
|
|
|
// Wireguard public key of the remote peer to connect to
|
|
string remoteKey = 3;
|
|
|
|
// encrypted message Body
|
|
bytes body = 4;
|
|
}
|
|
|
|
// A decrypted representation of the EncryptedMessage. Used locally before/after encryption
|
|
message Message {
|
|
// Wireguard public key
|
|
string key = 2;
|
|
|
|
// Wireguard public key of the remote peer to connect to
|
|
string remoteKey = 3;
|
|
|
|
Body body = 4;
|
|
}
|
|
|
|
// Actual body of the message that can contain credentials (type OFFER/ANSWER) or connection Candidate
|
|
// This part will be encrypted
|
|
message Body {
|
|
// Message type
|
|
enum Type {
|
|
OFFER = 0;
|
|
ANSWER = 1;
|
|
CANDIDATE = 2;
|
|
}
|
|
Type type = 1;
|
|
string payload = 2;
|
|
} |