-
Notifications
You must be signed in to change notification settings - Fork 1
/
rotom.proto
133 lines (118 loc) · 3.16 KB
/
rotom.proto
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
//RotomProtos V2
syntax = "proto3";
package RotomProtos;
message MitmRequest {
enum Method {
UNSET = 0;
LOGIN = 1;
RPC_REQUEST = 2;
}
message LoginRequest {
enum LoginSource {
UNSET = 0;
PTC = 1;
PTC_OAUTH = 2;
FB = 3;
GOOGLE = 4;
N_KIDS = 5;
}
string username = 1;
LoginSource source = 2;
bytes token_proto = 3;
string worker_id = 4;
bool enable_compression = 5;
}
message RpcRequest {
message SingleRpcRequest {
int32 method = 1;
bytes payload = 2;
bool is_compressed = 3;
}
repeated SingleRpcRequest request = 1;
double lat = 2;
double lon = 3;
}
uint32 id = 1;
Method method = 2;
oneof payload {
LoginRequest login_request = 3;
RpcRequest rpc_request = 4;
}
}
message MitmResponse {
enum Status {
UNSET = 0;
SUCCESS = 200;
ERROR_UNKNOWN = 500;
ERROR_RETRY_LATER = 501;
ERROR_WORKER_STOPPED = 502;
ERROR_RECONNECT = 503;
}
message LoginResponse {
string worker_id = 1;
AuthStatus status = 2;
bool supports_compression = 3;
string useragent = 4;
}
message RpcResponse {
message SingleRpcResponse {
int32 method = 1;
bytes payload = 2;
bool is_compressed = 3;
}
RpcStatus rpc_status = 1;
repeated SingleRpcResponse response = 2;
}
uint32 id = 1;
Status status = 2;
oneof payload {
LoginResponse login_response = 3;
RpcResponse rpc_response = 4;
}
string mitm_error = 100;
}
message WelcomeMessage {
string worker_id = 1;
string origin = 2;
int32 version_code = 3;
string version_name = 4;
string useragent = 5;
string device_id = 6;
}
enum AuthStatus {
AUTH_STATUS_UNSET = 0;
AUTH_STATUS_AUTH_TOKEN_REQUEST_FAILED = 1;
AUTH_STATUS_AUTH_TOKEN_REQUESTED = 2;
AUTH_STATUS_GOT_AUTH_TOKEN = 3;
AUTH_STATUS_DEVICE_INCOMPATIBLE = 4;
AUTH_STATUS_USER_NOT_FOUND = 5;
AUTH_STATUS_ACCESS_DENIED = 6;
AUTH_STATUS_ACCESS_SUSPENDED = 7;
AUTH_STATUS_ACCESS_RATE_LIMITED = 8;
AUTH_STATUS_SESSION_TERMINATED = 9;
AUTH_STATUS_SESSION_FAILED = 10;
AUTH_STATUS_LOGIN_TIMEOUT = 20;
}
enum RpcStatus {
RPC_STATUS_UNDEFINED = 0;
RPC_STATUS_SUCCESS = 1;
RPC_STATUS_BAD_RESPONSE = 3;
RPC_STATUS_ACTION_ERROR = 4;
RPC_STATUS_DISPATCH_ERROR = 5;
RPC_STATUS_SERVER_ERROR = 6;
RPC_STATUS_ASSIGNMENT_ERROR = 7;
RPC_STATUS_PROTOCOL_ERROR = 8;
RPC_STATUS_AUTHENTICATION_ERROR = 9;
RPC_STATUS_CANCELLED_REQUEST = 10;
RPC_STATUS_UNKNOWN_ERROR = 11;
RPC_STATUS_NO_RETRIES_ERROR = 12;
RPC_STATUS_UNAUTHORIZED_ERROR = 13;
RPC_STATUS_PARSING_ERROR = 14;
RPC_STATUS_ACCESS_DENIED = 15;
RPC_STATUS_ACCESS_SUSPENDED = 16;
RPC_STATUS_DEVICE_INCOMPATIBLE = 17;
RPC_STATUS_ACCESS_RATE_LIMITED = 18;
RPC_STATUS_GOOGLE_PLAY_NOT_READY = 19;
RPC_STATUS_LOGIN_ERROR_BAIL = 20;
RPC_STATUS_MITM_DISALLOWED_REQUEST = 99;
}