2023-09-21 12:13:36 +02:00
|
|
|
syntax = "proto3";
|
|
|
|
package rpctypes;
|
|
|
|
|
2023-10-04 18:17:53 +02:00
|
|
|
option go_package = "pkg/rpc";
|
2023-09-21 12:13:36 +02:00
|
|
|
|
|
|
|
service MeshCtrlServer {
|
|
|
|
rpc GetMesh(GetMeshRequest) returns (GetMeshReply) {}
|
|
|
|
rpc JoinMesh(JoinMeshRequest) returns (JoinMeshReply) {}
|
|
|
|
}
|
|
|
|
|
|
|
|
message MeshNode {
|
|
|
|
string publicKey = 1;
|
|
|
|
string wgEndpoint = 2;
|
|
|
|
string endpoint = 3;
|
|
|
|
string wgHost = 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetMeshRequest {
|
|
|
|
string meshId = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetMeshReply {
|
|
|
|
string meshId = 1;
|
|
|
|
repeated MeshNode meshNode = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message JoinMeshRequest {
|
|
|
|
string meshId = 1;
|
|
|
|
int32 hostPort = 2;
|
|
|
|
string publicKey = 3;
|
|
|
|
int32 wgPort = 4;
|
2023-09-21 19:43:29 +02:00
|
|
|
string wgIp = 5;
|
2023-09-21 12:13:36 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
message JoinMeshReply {
|
|
|
|
bool success = 1;
|
|
|
|
optional string meshIp = 2;
|
|
|
|
}
|