-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwgrpcd.proto
More file actions
91 lines (73 loc) · 1.94 KB
/
wgrpcd.proto
File metadata and controls
91 lines (73 loc) · 1.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
syntax = "proto3";
package wgrpcd;
option go_package = "github.com/joncooperworks/wgrpcd";
service WireguardRPC {
rpc ChangeListenPort(ChangeListenPortRequest) returns (ChangeListenPortResponse) {}
rpc CreatePeer(CreatePeerRequest) returns (CreatePeerResponse) {}
rpc RekeyPeer(RekeyPeerRequest) returns (RekeyPeerResponse) {}
rpc RemovePeer(RemovePeerRequest) returns (RemovePeerResponse) {}
rpc ListPeers(ListPeersRequest) returns (ListPeersResponse) {}
rpc Devices(DevicesRequest) returns (DevicesResponse) {}
rpc Import(ImportRequest) returns (ImportResponse) {}
}
message ChangeListenPortRequest {
int32 listenPort = 1;
string deviceName = 2;
}
message ChangeListenPortResponse {
int32 newListenPort = 1;
}
message CreatePeerRequest {
repeated string allowedIPs = 1;
string deviceName = 2;
}
message CreatePeerResponse {
string privateKey = 1;
string publicKey = 2;
repeated string allowedIPs = 3;
string serverPublicKey = 4;
}
message RekeyPeerRequest {
string publicKey = 1;
repeated string allowedIPs = 2;
string deviceName = 3;
}
message RekeyPeerResponse {
string privateKey = 1;
string publicKey = 2;
repeated string allowedIPs = 3;
string serverPublicKey = 4;
}
message RemovePeerRequest {
string publicKey = 1;
string deviceName = 2;
}
message RemovePeerResponse {
bool removed = 1;
}
message ListPeersRequest {
string deviceName = 1;
}
message ListPeersResponse {
repeated Peer peers = 1;
}
message Peer {
string publicKey = 1;
repeated string allowedIPs = 2;
int64 receivedBytes = 3;
int64 transmittedBytes = 4;
int64 lastSeen = 5;
}
message DevicesRequest {}
message DevicesResponse {
repeated string devices = 1;
}
message ImportedPeer {
string publicKey = 1;
repeated string allowedIPs = 2;
}
message ImportRequest {
repeated ImportedPeer peers = 1;
string deviceName = 2;
}
message ImportResponse {}