-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathappguard.proto
More file actions
116 lines (96 loc) · 3.09 KB
/
appguard.proto
File metadata and controls
116 lines (96 loc) · 3.09 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
syntax = "proto3";
package appguard;
import "google/protobuf/empty.proto";
import "commands.proto";
service AppGuard {
// Control channel
rpc ControlChannel(stream appguard_commands.ClientMessage)
returns (stream appguard_commands.ServerMessage);
// Logs
rpc HandleLogs (Logs) returns (google.protobuf.Empty);
// TCP
rpc HandleTcpConnection (AppGuardTcpConnection) returns (AppGuardTcpResponse);
// HTTP
rpc HandleHttpRequest (AppGuardHttpRequest) returns (AppGuardResponse);
rpc HandleHttpResponse (AppGuardHttpResponse) returns (AppGuardResponse);
// SMTP
rpc HandleSmtpRequest (AppGuardSmtpRequest) returns (AppGuardResponse);
rpc HandleSmtpResponse (AppGuardSmtpResponse) returns (AppGuardResponse);
// Other
rpc FirewallDefaultsRequest (Token) returns (appguard_commands.FirewallDefaults);
}
// Logs ----------------------------------------------------------------------------------------------------------------
message Logs {
string token = 1;
repeated Log logs = 3;
}
message Log {
string timestamp = 1;
string level = 2;
string message = 3;
}
// TCP -----------------------------------------------------------------------------------------------------------------
message AppGuardTcpConnection {
string token = 1;
optional string source_ip = 2;
optional uint32 source_port = 3;
optional string destination_ip = 4;
optional uint32 destination_port = 5;
string protocol = 6;
}
message AppGuardIpInfo {
string ip = 1;
optional string country = 2;
optional string asn = 3;
optional string org = 4;
optional string continent_code = 5;
optional string city = 6;
optional string region = 7;
optional string postal = 8;
optional string timezone = 9;
// bool blacklist = 100;
}
message AppGuardTcpInfo {
AppGuardTcpConnection connection = 1;
AppGuardIpInfo ip_info = 2;
uint64 tcp_id = 3;
}
// HTTP ----------------------------------------------------------------------------------------------------------------
message AppGuardHttpRequest {
string token = 1;
string original_url = 2;
map<string, string> headers = 3;
string method = 4;
optional string body = 5;
map<string, string> query = 6;
AppGuardTcpInfo tcp_info = 100;
}
message AppGuardHttpResponse {
string token = 1;
uint32 code = 2;
map<string, string> headers = 3;
AppGuardTcpInfo tcp_info = 100;
}
// SMTP ----------------------------------------------------------------------------------------------------------------
message AppGuardSmtpRequest {
string token = 1;
map<string, string> headers = 2;
optional string body = 3;
AppGuardTcpInfo tcp_info = 100;
}
message AppGuardSmtpResponse {
string token = 1;
optional uint32 code = 2;
AppGuardTcpInfo tcp_info = 100;
}
// Response ------------------------------------------------------------------------------------------------------------
message AppGuardResponse {
appguard_commands.FirewallPolicy policy = 2;
}
message AppGuardTcpResponse {
AppGuardTcpInfo tcp_info = 1;
}
// Other --------------------------------------------------------------------------------------
message Token {
string token = 1;
}