Skip to content

Commit 951b4dd

Browse files
committed
add protobuf definition file
1 parent 3dedca4 commit 951b4dd

File tree

1 file changed

+72
-0
lines changed

1 file changed

+72
-0
lines changed

proto/burrow.proto

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
syntax = "proto3";
2+
package burrow;
3+
4+
import "google/protobuf/timestamp.proto";
5+
6+
service Tunnel {
7+
rpc TunnelConfiguration (Empty) returns (TunnelConfigurationResponse);
8+
rpc TunnelStart (Empty) returns (Empty);
9+
rpc TunnelStop (Empty) returns (Empty);
10+
rpc TunnelStatus (Empty) returns (stream TunnelStatusResponse);
11+
}
12+
13+
service Networks {
14+
rpc NetworkAdd (Empty) returns (Empty);
15+
rpc NetworkList (Empty) returns (stream NetworkListResponse);
16+
rpc NetworkReorder (NetworkReorderRequest) returns (Empty);
17+
rpc NetworkDelete (NetworkDeleteRequest) returns (Empty);
18+
}
19+
20+
message NetworkReorderRequest {
21+
int32 id = 1;
22+
int32 index = 2;
23+
}
24+
25+
message WireGuardPeer {
26+
string endpoint = 1;
27+
repeated string subnet = 2;
28+
}
29+
30+
message WireGuardNetwork {
31+
string address = 1;
32+
string dns = 2;
33+
repeated WireGuardPeer peer = 3;
34+
}
35+
36+
message NetworkDeleteRequest {
37+
int32 id = 1;
38+
}
39+
40+
message Network {
41+
int32 id = 1;
42+
NetworkType type = 2;
43+
bytes payload = 3;
44+
}
45+
46+
enum NetworkType {
47+
WireGuard = 0;
48+
HackClub = 1;
49+
}
50+
51+
message NetworkListResponse {
52+
repeated Network network = 1;
53+
}
54+
55+
message Empty {
56+
57+
}
58+
59+
enum State {
60+
Stopped = 0;
61+
Running = 1;
62+
}
63+
64+
message TunnelStatusResponse {
65+
State state = 1;
66+
optional google.protobuf.Timestamp start = 2;
67+
}
68+
69+
message TunnelConfigurationResponse {
70+
repeated string addresses = 1;
71+
int32 mtu = 2;
72+
}

0 commit comments

Comments
 (0)