gitscope
← marzneshin / v0.3.0-alpha4 / app/marznode/marznode.proto
https://dev.kronoz.win/r/marzneshin.git
app/marznode/marznode.proto · Protocol Buffer
Blame Raw
 1syntax = "proto3";
 2
 3package marznode;
 4
 5message Empty {}
 6
 7message Inbound {
 8  string tag = 1;
 9  optional string config = 2;
10}
11
12message InboundsResponse {
13  repeated Inbound inbounds = 1;
14}
15
16message User {
17  uint32 id = 1;
18  string username = 2;
19  string key = 3;
20}
21
22message UserData {
23  User user = 1;
24  repeated Inbound inbounds = 2;
25}
26
27message UsersData {
28  repeated UserData users_data = 1;
29}
30
31message UsersStats {
32  message UserStats {
33    uint32 uid = 1;
34    uint64 usage = 2;
35  }
36  repeated UserStats users_stats = 1;
37}
38
39message LogLine {
40  string line = 1;
41}
42
43message XrayConfig {
44  string configuration = 1;
45}
46
47message XrayLogsRequest {
48  bool include_buffer = 1;
49}
50
51service MarzService {
52  rpc SyncUsers(stream UserData) returns (Empty);
53  rpc RepopulateUsers(UsersData) returns (Empty);
54  rpc FetchInbounds(Empty) returns (InboundsResponse);
55  rpc FetchUsersStats(Empty) returns (UsersStats);
56  rpc FetchXrayConfig(Empty) returns (XrayConfig);
57  rpc RestartXray(XrayConfig) returns (InboundsResponse);
58  rpc StreamXrayLogs(XrayLogsRequest) returns(stream LogLine);
59}