@ekhein/lamda-node-sdk 1.0.3 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (159) hide show
  1. package/dist/src/constants/activity.flag.d.ts +22 -0
  2. package/dist/src/constants/activity.flag.js +22 -0
  3. package/dist/src/constants/android.intent.d.ts +56 -0
  4. package/dist/src/constants/android.intent.js +56 -0
  5. package/dist/src/constants/android.permission.d.ts +30 -0
  6. package/dist/src/constants/android.permission.js +30 -0
  7. package/dist/src/constants/index.d.ts +3 -0
  8. package/dist/src/constants/index.js +3 -0
  9. package/dist/src/decorators/inject.decorator.d.ts +2 -0
  10. package/dist/src/decorators/inject.decorator.js +15 -0
  11. package/dist/src/exceptions/remoteCall.exception.d.ts +7 -0
  12. package/dist/src/exceptions/remoteCall.exception.js +12 -0
  13. package/dist/src/exceptions/timeout.exception.d.ts +4 -0
  14. package/dist/src/exceptions/timeout.exception.js +6 -0
  15. package/dist/src/interceptor/remoteException.Interceptor.d.ts +2 -0
  16. package/dist/src/interceptor/remoteException.Interceptor.js +13 -0
  17. package/dist/{main.d.ts → src/main.d.ts} +9 -21
  18. package/dist/src/main.js +135 -0
  19. package/dist/src/rpc/application.d.ts +136 -0
  20. package/dist/src/rpc/application.js +1537 -0
  21. package/dist/src/rpc/debug.d.ts +19 -0
  22. package/dist/src/rpc/debug.js +56 -0
  23. package/dist/{rpc → src/rpc}/file.d.ts +11 -13
  24. package/dist/src/rpc/file.js +373 -0
  25. package/dist/src/rpc/google/protobuf/any.d.ts +20 -0
  26. package/dist/src/rpc/google/protobuf/any.js +98 -0
  27. package/dist/src/rpc/google/protobuf/empty.d.ts +18 -0
  28. package/dist/src/rpc/google/protobuf/empty.js +39 -0
  29. package/dist/{rpc → src/rpc}/google/protobuf/struct.d.ts +19 -21
  30. package/dist/src/rpc/google/protobuf/struct.js +438 -0
  31. package/dist/src/rpc/policy.d.ts +22 -0
  32. package/dist/src/rpc/policy.js +103 -0
  33. package/dist/src/rpc/proxy.d.ts +106 -0
  34. package/dist/src/rpc/proxy.js +774 -0
  35. package/dist/{rpc → src/rpc}/services.d.ts +421 -424
  36. package/dist/src/rpc/services.js +1493 -0
  37. package/dist/src/rpc/settings.d.ts +29 -0
  38. package/dist/src/rpc/settings.js +125 -0
  39. package/dist/src/rpc/shell.d.ts +34 -0
  40. package/dist/src/rpc/shell.js +294 -0
  41. package/dist/{rpc → src/rpc}/status.d.ts +17 -19
  42. package/dist/src/rpc/status.js +896 -0
  43. package/dist/src/rpc/storage.d.ts +22 -0
  44. package/dist/src/rpc/storage.js +128 -0
  45. package/dist/src/rpc/types.d.ts +34 -0
  46. package/dist/src/rpc/types.js +281 -0
  47. package/dist/{rpc → src/rpc}/uiautomator.d.ts +87 -89
  48. package/dist/src/rpc/uiautomator.js +5350 -0
  49. package/dist/src/rpc/util.d.ts +101 -0
  50. package/dist/src/rpc/util.js +1158 -0
  51. package/dist/{rpc → src/rpc}/wifi.d.ts +23 -25
  52. package/dist/src/rpc/wifi.js +971 -0
  53. package/package.json +4 -9
  54. package/dist/chunk-3JBDAA2H.js +0 -439
  55. package/dist/chunk-4AHM55IO.js +0 -1172
  56. package/dist/chunk-4NKGYNMS.js +0 -116
  57. package/dist/chunk-6HD35RPW.js +0 -5370
  58. package/dist/chunk-76Y3OVVH.js +0 -1602
  59. package/dist/chunk-7XF22HAW.js +0 -907
  60. package/dist/chunk-7YGA6EOV.js +0 -109
  61. package/dist/chunk-ADS4GRIL.js +0 -14
  62. package/dist/chunk-FSLE4VGI.js +0 -48
  63. package/dist/chunk-H7Z6XFBF.js +0 -134
  64. package/dist/chunk-KJKSI2WL.js +0 -62
  65. package/dist/chunk-O52JGDU7.js +0 -800
  66. package/dist/chunk-ORXTTWPB.js +0 -379
  67. package/dist/chunk-OZJH6SR7.js +0 -20
  68. package/dist/chunk-P53F45YO.js +0 -64
  69. package/dist/chunk-QXMPY6EE.js +0 -289
  70. package/dist/chunk-SBFKX3ZY.js +0 -1554
  71. package/dist/chunk-WFQEBPE6.js +0 -300
  72. package/dist/chunk-X4LTH2UN.js +0 -983
  73. package/dist/chunk-XAX5BZL3.js +0 -132
  74. package/dist/chunk-ZXF5DGTC.js +0 -45
  75. package/dist/constants/activity.flag.cjs +0 -92
  76. package/dist/constants/activity.flag.d.cts +0 -24
  77. package/dist/constants/activity.flag.d.ts +0 -24
  78. package/dist/constants/activity.flag.js +0 -49
  79. package/dist/constants/android.intent.cjs +0 -194
  80. package/dist/constants/android.intent.d.cts +0 -58
  81. package/dist/constants/android.intent.d.ts +0 -58
  82. package/dist/constants/android.intent.js +0 -117
  83. package/dist/constants/android.permission.cjs +0 -116
  84. package/dist/constants/android.permission.d.cts +0 -32
  85. package/dist/constants/android.permission.d.ts +0 -32
  86. package/dist/constants/android.permission.js +0 -65
  87. package/dist/constants/index.cjs +0 -356
  88. package/dist/constants/index.d.cts +0 -3
  89. package/dist/constants/index.d.ts +0 -3
  90. package/dist/constants/index.js +0 -225
  91. package/dist/decorators/inject.decorator.cjs +0 -43
  92. package/dist/decorators/inject.decorator.d.cts +0 -5
  93. package/dist/decorators/inject.decorator.d.ts +0 -5
  94. package/dist/decorators/inject.decorator.js +0 -7
  95. package/dist/main.cjs +0 -11969
  96. package/dist/main.d.cts +0 -37
  97. package/dist/main.js +0 -112
  98. package/dist/rpc/application.cjs +0 -2019
  99. package/dist/rpc/application.d.cts +0 -138
  100. package/dist/rpc/application.d.ts +0 -138
  101. package/dist/rpc/application.js +0 -50
  102. package/dist/rpc/debug.cjs +0 -86
  103. package/dist/rpc/debug.d.cts +0 -21
  104. package/dist/rpc/debug.d.ts +0 -21
  105. package/dist/rpc/debug.js +0 -9
  106. package/dist/rpc/file.cjs +0 -405
  107. package/dist/rpc/file.d.cts +0 -40
  108. package/dist/rpc/file.js +0 -13
  109. package/dist/rpc/google/protobuf/any.cjs +0 -126
  110. package/dist/rpc/google/protobuf/any.d.cts +0 -22
  111. package/dist/rpc/google/protobuf/any.d.ts +0 -22
  112. package/dist/rpc/google/protobuf/any.js +0 -103
  113. package/dist/rpc/google/protobuf/empty.cjs +0 -69
  114. package/dist/rpc/google/protobuf/empty.d.cts +0 -20
  115. package/dist/rpc/google/protobuf/empty.d.ts +0 -20
  116. package/dist/rpc/google/protobuf/empty.js +0 -9
  117. package/dist/rpc/google/protobuf/struct.cjs +0 -469
  118. package/dist/rpc/google/protobuf/struct.d.cts +0 -65
  119. package/dist/rpc/google/protobuf/struct.js +0 -21
  120. package/dist/rpc/policy.cjs +0 -133
  121. package/dist/rpc/policy.d.cts +0 -24
  122. package/dist/rpc/policy.d.ts +0 -24
  123. package/dist/rpc/policy.js +0 -9
  124. package/dist/rpc/proxy.cjs +0 -1109
  125. package/dist/rpc/proxy.d.cts +0 -108
  126. package/dist/rpc/proxy.d.ts +0 -108
  127. package/dist/rpc/proxy.js +0 -49
  128. package/dist/rpc/services.cjs +0 -11898
  129. package/dist/rpc/services.d.cts +0 -1920
  130. package/dist/rpc/services.js +0 -48
  131. package/dist/rpc/settings.cjs +0 -161
  132. package/dist/rpc/settings.d.cts +0 -31
  133. package/dist/rpc/settings.d.ts +0 -31
  134. package/dist/rpc/settings.js +0 -15
  135. package/dist/rpc/shell.cjs +0 -326
  136. package/dist/rpc/shell.d.cts +0 -36
  137. package/dist/rpc/shell.d.ts +0 -36
  138. package/dist/rpc/shell.js +0 -13
  139. package/dist/rpc/status.cjs +0 -936
  140. package/dist/rpc/status.d.cts +0 -76
  141. package/dist/rpc/status.js +0 -19
  142. package/dist/rpc/storage.cjs +0 -156
  143. package/dist/rpc/storage.d.cts +0 -24
  144. package/dist/rpc/storage.d.ts +0 -24
  145. package/dist/rpc/storage.js +0 -9
  146. package/dist/rpc/types.cjs +0 -317
  147. package/dist/rpc/types.d.cts +0 -36
  148. package/dist/rpc/types.d.ts +0 -36
  149. package/dist/rpc/types.js +0 -17
  150. package/dist/rpc/uiautomator.cjs +0 -5446
  151. package/dist/rpc/uiautomator.d.cts +0 -618
  152. package/dist/rpc/uiautomator.js +0 -113
  153. package/dist/rpc/util.cjs +0 -1212
  154. package/dist/rpc/util.d.cts +0 -103
  155. package/dist/rpc/util.d.ts +0 -103
  156. package/dist/rpc/util.js +0 -41
  157. package/dist/rpc/wifi.cjs +0 -1015
  158. package/dist/rpc/wifi.d.cts +0 -84
  159. package/dist/rpc/wifi.js +0 -25
@@ -1,800 +0,0 @@
1
- import {
2
- ApplicationInfo
3
- } from "./chunk-SBFKX3ZY.js";
4
-
5
- // src/rpc/proxy.ts
6
- import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
7
- var protobufPackage = "lamda.rpc";
8
- var GproxyType = /* @__PURE__ */ ((GproxyType2) => {
9
- GproxyType2[GproxyType2["SOCKS5"] = 0] = "SOCKS5";
10
- GproxyType2[GproxyType2["HTTP_CONNECT"] = 1] = "HTTP_CONNECT";
11
- GproxyType2[GproxyType2["HTTP_RELAY"] = 2] = "HTTP_RELAY";
12
- GproxyType2[GproxyType2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
13
- return GproxyType2;
14
- })(GproxyType || {});
15
- function gproxyTypeFromJSON(object) {
16
- switch (object) {
17
- case 0:
18
- case "SOCKS5":
19
- return 0 /* SOCKS5 */;
20
- case 1:
21
- case "HTTP_CONNECT":
22
- return 1 /* HTTP_CONNECT */;
23
- case 2:
24
- case "HTTP_RELAY":
25
- return 2 /* HTTP_RELAY */;
26
- case -1:
27
- case "UNRECOGNIZED":
28
- default:
29
- return -1 /* UNRECOGNIZED */;
30
- }
31
- }
32
- function gproxyTypeToJSON(object) {
33
- switch (object) {
34
- case 0 /* SOCKS5 */:
35
- return "SOCKS5";
36
- case 1 /* HTTP_CONNECT */:
37
- return "HTTP_CONNECT";
38
- case 2 /* HTTP_RELAY */:
39
- return "HTTP_RELAY";
40
- case -1 /* UNRECOGNIZED */:
41
- default:
42
- return "UNRECOGNIZED";
43
- }
44
- }
45
- var OpenVPNProto = /* @__PURE__ */ ((OpenVPNProto2) => {
46
- OpenVPNProto2[OpenVPNProto2["TCP"] = 0] = "TCP";
47
- OpenVPNProto2[OpenVPNProto2["UDP"] = 1] = "UDP";
48
- OpenVPNProto2[OpenVPNProto2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
49
- return OpenVPNProto2;
50
- })(OpenVPNProto || {});
51
- function openVPNProtoFromJSON(object) {
52
- switch (object) {
53
- case 0:
54
- case "TCP":
55
- return 0 /* TCP */;
56
- case 1:
57
- case "UDP":
58
- return 1 /* UDP */;
59
- case -1:
60
- case "UNRECOGNIZED":
61
- default:
62
- return -1 /* UNRECOGNIZED */;
63
- }
64
- }
65
- function openVPNProtoToJSON(object) {
66
- switch (object) {
67
- case 0 /* TCP */:
68
- return "TCP";
69
- case 1 /* UDP */:
70
- return "UDP";
71
- case -1 /* UNRECOGNIZED */:
72
- default:
73
- return "UNRECOGNIZED";
74
- }
75
- }
76
- var OpenVPNAuth = /* @__PURE__ */ ((OpenVPNAuth2) => {
77
- OpenVPNAuth2[OpenVPNAuth2["SHA1"] = 0] = "SHA1";
78
- OpenVPNAuth2[OpenVPNAuth2["SHA224"] = 1] = "SHA224";
79
- OpenVPNAuth2[OpenVPNAuth2["SHA256"] = 2] = "SHA256";
80
- OpenVPNAuth2[OpenVPNAuth2["SHA384"] = 3] = "SHA384";
81
- OpenVPNAuth2[OpenVPNAuth2["SHA512"] = 4] = "SHA512";
82
- OpenVPNAuth2[OpenVPNAuth2["RIPEMD160"] = 5] = "RIPEMD160";
83
- OpenVPNAuth2[OpenVPNAuth2["RSA_SHA1"] = 6] = "RSA_SHA1";
84
- OpenVPNAuth2[OpenVPNAuth2["RSA_SHA224"] = 7] = "RSA_SHA224";
85
- OpenVPNAuth2[OpenVPNAuth2["RSA_SHA256"] = 8] = "RSA_SHA256";
86
- OpenVPNAuth2[OpenVPNAuth2["RSA_SHA384"] = 9] = "RSA_SHA384";
87
- OpenVPNAuth2[OpenVPNAuth2["RSA_SHA512"] = 10] = "RSA_SHA512";
88
- OpenVPNAuth2[OpenVPNAuth2["RSA_RIPEMD160"] = 11] = "RSA_RIPEMD160";
89
- OpenVPNAuth2[OpenVPNAuth2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
90
- return OpenVPNAuth2;
91
- })(OpenVPNAuth || {});
92
- function openVPNAuthFromJSON(object) {
93
- switch (object) {
94
- case 0:
95
- case "SHA1":
96
- return 0 /* SHA1 */;
97
- case 1:
98
- case "SHA224":
99
- return 1 /* SHA224 */;
100
- case 2:
101
- case "SHA256":
102
- return 2 /* SHA256 */;
103
- case 3:
104
- case "SHA384":
105
- return 3 /* SHA384 */;
106
- case 4:
107
- case "SHA512":
108
- return 4 /* SHA512 */;
109
- case 5:
110
- case "RIPEMD160":
111
- return 5 /* RIPEMD160 */;
112
- case 6:
113
- case "RSA_SHA1":
114
- return 6 /* RSA_SHA1 */;
115
- case 7:
116
- case "RSA_SHA224":
117
- return 7 /* RSA_SHA224 */;
118
- case 8:
119
- case "RSA_SHA256":
120
- return 8 /* RSA_SHA256 */;
121
- case 9:
122
- case "RSA_SHA384":
123
- return 9 /* RSA_SHA384 */;
124
- case 10:
125
- case "RSA_SHA512":
126
- return 10 /* RSA_SHA512 */;
127
- case 11:
128
- case "RSA_RIPEMD160":
129
- return 11 /* RSA_RIPEMD160 */;
130
- case -1:
131
- case "UNRECOGNIZED":
132
- default:
133
- return -1 /* UNRECOGNIZED */;
134
- }
135
- }
136
- function openVPNAuthToJSON(object) {
137
- switch (object) {
138
- case 0 /* SHA1 */:
139
- return "SHA1";
140
- case 1 /* SHA224 */:
141
- return "SHA224";
142
- case 2 /* SHA256 */:
143
- return "SHA256";
144
- case 3 /* SHA384 */:
145
- return "SHA384";
146
- case 4 /* SHA512 */:
147
- return "SHA512";
148
- case 5 /* RIPEMD160 */:
149
- return "RIPEMD160";
150
- case 6 /* RSA_SHA1 */:
151
- return "RSA_SHA1";
152
- case 7 /* RSA_SHA224 */:
153
- return "RSA_SHA224";
154
- case 8 /* RSA_SHA256 */:
155
- return "RSA_SHA256";
156
- case 9 /* RSA_SHA384 */:
157
- return "RSA_SHA384";
158
- case 10 /* RSA_SHA512 */:
159
- return "RSA_SHA512";
160
- case 11 /* RSA_RIPEMD160 */:
161
- return "RSA_RIPEMD160";
162
- case -1 /* UNRECOGNIZED */:
163
- default:
164
- return "UNRECOGNIZED";
165
- }
166
- }
167
- var OpenVPNCipher = /* @__PURE__ */ ((OpenVPNCipher2) => {
168
- OpenVPNCipher2[OpenVPNCipher2["AES_128_GCM"] = 0] = "AES_128_GCM";
169
- OpenVPNCipher2[OpenVPNCipher2["AES_256_GCM"] = 1] = "AES_256_GCM";
170
- OpenVPNCipher2[OpenVPNCipher2["CHACHA20_POLY1305"] = 2] = "CHACHA20_POLY1305";
171
- OpenVPNCipher2[OpenVPNCipher2["AES_128_CBC"] = 3] = "AES_128_CBC";
172
- OpenVPNCipher2[OpenVPNCipher2["AES_256_CBC"] = 4] = "AES_256_CBC";
173
- OpenVPNCipher2[OpenVPNCipher2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
174
- return OpenVPNCipher2;
175
- })(OpenVPNCipher || {});
176
- function openVPNCipherFromJSON(object) {
177
- switch (object) {
178
- case 0:
179
- case "AES_128_GCM":
180
- return 0 /* AES_128_GCM */;
181
- case 1:
182
- case "AES_256_GCM":
183
- return 1 /* AES_256_GCM */;
184
- case 2:
185
- case "CHACHA20_POLY1305":
186
- return 2 /* CHACHA20_POLY1305 */;
187
- case 3:
188
- case "AES_128_CBC":
189
- return 3 /* AES_128_CBC */;
190
- case 4:
191
- case "AES_256_CBC":
192
- return 4 /* AES_256_CBC */;
193
- case -1:
194
- case "UNRECOGNIZED":
195
- default:
196
- return -1 /* UNRECOGNIZED */;
197
- }
198
- }
199
- function openVPNCipherToJSON(object) {
200
- switch (object) {
201
- case 0 /* AES_128_GCM */:
202
- return "AES_128_GCM";
203
- case 1 /* AES_256_GCM */:
204
- return "AES_256_GCM";
205
- case 2 /* CHACHA20_POLY1305 */:
206
- return "CHACHA20_POLY1305";
207
- case 3 /* AES_128_CBC */:
208
- return "AES_128_CBC";
209
- case 4 /* AES_256_CBC */:
210
- return "AES_256_CBC";
211
- case -1 /* UNRECOGNIZED */:
212
- default:
213
- return "UNRECOGNIZED";
214
- }
215
- }
216
- var OpenVPNKeyDirection = /* @__PURE__ */ ((OpenVPNKeyDirection2) => {
217
- OpenVPNKeyDirection2[OpenVPNKeyDirection2["KEY_DIRECTION_NONE"] = 0] = "KEY_DIRECTION_NONE";
218
- OpenVPNKeyDirection2[OpenVPNKeyDirection2["KEY_DIRECTION_0"] = 1] = "KEY_DIRECTION_0";
219
- OpenVPNKeyDirection2[OpenVPNKeyDirection2["KEY_DIRECTION_1"] = 2] = "KEY_DIRECTION_1";
220
- OpenVPNKeyDirection2[OpenVPNKeyDirection2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
221
- return OpenVPNKeyDirection2;
222
- })(OpenVPNKeyDirection || {});
223
- function openVPNKeyDirectionFromJSON(object) {
224
- switch (object) {
225
- case 0:
226
- case "KEY_DIRECTION_NONE":
227
- return 0 /* KEY_DIRECTION_NONE */;
228
- case 1:
229
- case "KEY_DIRECTION_0":
230
- return 1 /* KEY_DIRECTION_0 */;
231
- case 2:
232
- case "KEY_DIRECTION_1":
233
- return 2 /* KEY_DIRECTION_1 */;
234
- case -1:
235
- case "UNRECOGNIZED":
236
- default:
237
- return -1 /* UNRECOGNIZED */;
238
- }
239
- }
240
- function openVPNKeyDirectionToJSON(object) {
241
- switch (object) {
242
- case 0 /* KEY_DIRECTION_NONE */:
243
- return "KEY_DIRECTION_NONE";
244
- case 1 /* KEY_DIRECTION_0 */:
245
- return "KEY_DIRECTION_0";
246
- case 2 /* KEY_DIRECTION_1 */:
247
- return "KEY_DIRECTION_1";
248
- case -1 /* UNRECOGNIZED */:
249
- default:
250
- return "UNRECOGNIZED";
251
- }
252
- }
253
- var OpenVPNEncryption = /* @__PURE__ */ ((OpenVPNEncryption2) => {
254
- OpenVPNEncryption2[OpenVPNEncryption2["TLS_NONE"] = 0] = "TLS_NONE";
255
- OpenVPNEncryption2[OpenVPNEncryption2["TLS_AUTH"] = 1] = "TLS_AUTH";
256
- OpenVPNEncryption2[OpenVPNEncryption2["TLS_CRYPT"] = 2] = "TLS_CRYPT";
257
- OpenVPNEncryption2[OpenVPNEncryption2["TLS_CRYPT_V2"] = 3] = "TLS_CRYPT_V2";
258
- OpenVPNEncryption2[OpenVPNEncryption2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
259
- return OpenVPNEncryption2;
260
- })(OpenVPNEncryption || {});
261
- function openVPNEncryptionFromJSON(object) {
262
- switch (object) {
263
- case 0:
264
- case "TLS_NONE":
265
- return 0 /* TLS_NONE */;
266
- case 1:
267
- case "TLS_AUTH":
268
- return 1 /* TLS_AUTH */;
269
- case 2:
270
- case "TLS_CRYPT":
271
- return 2 /* TLS_CRYPT */;
272
- case 3:
273
- case "TLS_CRYPT_V2":
274
- return 3 /* TLS_CRYPT_V2 */;
275
- case -1:
276
- case "UNRECOGNIZED":
277
- default:
278
- return -1 /* UNRECOGNIZED */;
279
- }
280
- }
281
- function openVPNEncryptionToJSON(object) {
282
- switch (object) {
283
- case 0 /* TLS_NONE */:
284
- return "TLS_NONE";
285
- case 1 /* TLS_AUTH */:
286
- return "TLS_AUTH";
287
- case 2 /* TLS_CRYPT */:
288
- return "TLS_CRYPT";
289
- case 3 /* TLS_CRYPT_V2 */:
290
- return "TLS_CRYPT_V2";
291
- case -1 /* UNRECOGNIZED */:
292
- default:
293
- return "UNRECOGNIZED";
294
- }
295
- }
296
- function createBaseGproxyConfigRequest() {
297
- return {
298
- application: void 0,
299
- type: 0,
300
- nameserver: "",
301
- login: "",
302
- password: "",
303
- host: "",
304
- port: 0,
305
- bypassLocalSubnet: false,
306
- dropUdp: false,
307
- udpProxy: false,
308
- dnsProxy: false
309
- };
310
- }
311
- var GproxyConfigRequest = {
312
- encode(message, writer = new BinaryWriter()) {
313
- if (message.application !== void 0) {
314
- ApplicationInfo.encode(message.application, writer.uint32(10).fork()).join();
315
- }
316
- if (message.type !== 0) {
317
- writer.uint32(16).int32(message.type);
318
- }
319
- if (message.nameserver !== "") {
320
- writer.uint32(26).string(message.nameserver);
321
- }
322
- if (message.login !== "") {
323
- writer.uint32(34).string(message.login);
324
- }
325
- if (message.password !== "") {
326
- writer.uint32(42).string(message.password);
327
- }
328
- if (message.host !== "") {
329
- writer.uint32(50).string(message.host);
330
- }
331
- if (message.port !== 0) {
332
- writer.uint32(56).uint32(message.port);
333
- }
334
- if (message.bypassLocalSubnet !== false) {
335
- writer.uint32(64).bool(message.bypassLocalSubnet);
336
- }
337
- if (message.dropUdp !== false) {
338
- writer.uint32(72).bool(message.dropUdp);
339
- }
340
- if (message.udpProxy !== false) {
341
- writer.uint32(80).bool(message.udpProxy);
342
- }
343
- if (message.dnsProxy !== false) {
344
- writer.uint32(88).bool(message.dnsProxy);
345
- }
346
- return writer;
347
- },
348
- decode(input, length) {
349
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
350
- let end = length === void 0 ? reader.len : reader.pos + length;
351
- const message = createBaseGproxyConfigRequest();
352
- while (reader.pos < end) {
353
- const tag = reader.uint32();
354
- switch (tag >>> 3) {
355
- case 1: {
356
- if (tag !== 10) {
357
- break;
358
- }
359
- message.application = ApplicationInfo.decode(reader, reader.uint32());
360
- continue;
361
- }
362
- case 2: {
363
- if (tag !== 16) {
364
- break;
365
- }
366
- message.type = reader.int32();
367
- continue;
368
- }
369
- case 3: {
370
- if (tag !== 26) {
371
- break;
372
- }
373
- message.nameserver = reader.string();
374
- continue;
375
- }
376
- case 4: {
377
- if (tag !== 34) {
378
- break;
379
- }
380
- message.login = reader.string();
381
- continue;
382
- }
383
- case 5: {
384
- if (tag !== 42) {
385
- break;
386
- }
387
- message.password = reader.string();
388
- continue;
389
- }
390
- case 6: {
391
- if (tag !== 50) {
392
- break;
393
- }
394
- message.host = reader.string();
395
- continue;
396
- }
397
- case 7: {
398
- if (tag !== 56) {
399
- break;
400
- }
401
- message.port = reader.uint32();
402
- continue;
403
- }
404
- case 8: {
405
- if (tag !== 64) {
406
- break;
407
- }
408
- message.bypassLocalSubnet = reader.bool();
409
- continue;
410
- }
411
- case 9: {
412
- if (tag !== 72) {
413
- break;
414
- }
415
- message.dropUdp = reader.bool();
416
- continue;
417
- }
418
- case 10: {
419
- if (tag !== 80) {
420
- break;
421
- }
422
- message.udpProxy = reader.bool();
423
- continue;
424
- }
425
- case 11: {
426
- if (tag !== 88) {
427
- break;
428
- }
429
- message.dnsProxy = reader.bool();
430
- continue;
431
- }
432
- }
433
- if ((tag & 7) === 4 || tag === 0) {
434
- break;
435
- }
436
- reader.skip(tag & 7);
437
- }
438
- return message;
439
- },
440
- fromJSON(object) {
441
- return {
442
- application: isSet(object.application) ? ApplicationInfo.fromJSON(object.application) : void 0,
443
- type: isSet(object.type) ? gproxyTypeFromJSON(object.type) : 0,
444
- nameserver: isSet(object.nameserver) ? globalThis.String(object.nameserver) : "",
445
- login: isSet(object.login) ? globalThis.String(object.login) : "",
446
- password: isSet(object.password) ? globalThis.String(object.password) : "",
447
- host: isSet(object.host) ? globalThis.String(object.host) : "",
448
- port: isSet(object.port) ? globalThis.Number(object.port) : 0,
449
- bypassLocalSubnet: isSet(object.bypassLocalSubnet) ? globalThis.Boolean(object.bypassLocalSubnet) : false,
450
- dropUdp: isSet(object.dropUdp) ? globalThis.Boolean(object.dropUdp) : false,
451
- udpProxy: isSet(object.udpProxy) ? globalThis.Boolean(object.udpProxy) : false,
452
- dnsProxy: isSet(object.dnsProxy) ? globalThis.Boolean(object.dnsProxy) : false
453
- };
454
- },
455
- toJSON(message) {
456
- const obj = {};
457
- if (message.application !== void 0) {
458
- obj.application = ApplicationInfo.toJSON(message.application);
459
- }
460
- if (message.type !== 0) {
461
- obj.type = gproxyTypeToJSON(message.type);
462
- }
463
- if (message.nameserver !== "") {
464
- obj.nameserver = message.nameserver;
465
- }
466
- if (message.login !== "") {
467
- obj.login = message.login;
468
- }
469
- if (message.password !== "") {
470
- obj.password = message.password;
471
- }
472
- if (message.host !== "") {
473
- obj.host = message.host;
474
- }
475
- if (message.port !== 0) {
476
- obj.port = Math.round(message.port);
477
- }
478
- if (message.bypassLocalSubnet !== false) {
479
- obj.bypassLocalSubnet = message.bypassLocalSubnet;
480
- }
481
- if (message.dropUdp !== false) {
482
- obj.dropUdp = message.dropUdp;
483
- }
484
- if (message.udpProxy !== false) {
485
- obj.udpProxy = message.udpProxy;
486
- }
487
- if (message.dnsProxy !== false) {
488
- obj.dnsProxy = message.dnsProxy;
489
- }
490
- return obj;
491
- },
492
- create(base) {
493
- return GproxyConfigRequest.fromPartial(base ?? {});
494
- },
495
- fromPartial(object) {
496
- const message = createBaseGproxyConfigRequest();
497
- message.application = object.application !== void 0 && object.application !== null ? ApplicationInfo.fromPartial(object.application) : void 0;
498
- message.type = object.type ?? 0;
499
- message.nameserver = object.nameserver ?? "";
500
- message.login = object.login ?? "";
501
- message.password = object.password ?? "";
502
- message.host = object.host ?? "";
503
- message.port = object.port ?? 0;
504
- message.bypassLocalSubnet = object.bypassLocalSubnet ?? false;
505
- message.dropUdp = object.dropUdp ?? false;
506
- message.udpProxy = object.udpProxy ?? false;
507
- message.dnsProxy = object.dnsProxy ?? false;
508
- return message;
509
- }
510
- };
511
- function createBaseOpenVPNConfigRequest() {
512
- return {
513
- allTraffic: false,
514
- proto: 0,
515
- host: "",
516
- port: 0,
517
- cipher: 0,
518
- ca: "",
519
- cert: "",
520
- key: "",
521
- tlsEncryption: 0,
522
- tlsKeyDirection: 0,
523
- tlsKey: "",
524
- auth: 0,
525
- login: "",
526
- password: ""
527
- };
528
- }
529
- var OpenVPNConfigRequest = {
530
- encode(message, writer = new BinaryWriter()) {
531
- if (message.allTraffic !== false) {
532
- writer.uint32(8).bool(message.allTraffic);
533
- }
534
- if (message.proto !== 0) {
535
- writer.uint32(16).int32(message.proto);
536
- }
537
- if (message.host !== "") {
538
- writer.uint32(26).string(message.host);
539
- }
540
- if (message.port !== 0) {
541
- writer.uint32(32).uint32(message.port);
542
- }
543
- if (message.cipher !== 0) {
544
- writer.uint32(40).int32(message.cipher);
545
- }
546
- if (message.ca !== "") {
547
- writer.uint32(50).string(message.ca);
548
- }
549
- if (message.cert !== "") {
550
- writer.uint32(58).string(message.cert);
551
- }
552
- if (message.key !== "") {
553
- writer.uint32(66).string(message.key);
554
- }
555
- if (message.tlsEncryption !== 0) {
556
- writer.uint32(72).int32(message.tlsEncryption);
557
- }
558
- if (message.tlsKeyDirection !== 0) {
559
- writer.uint32(80).int32(message.tlsKeyDirection);
560
- }
561
- if (message.tlsKey !== "") {
562
- writer.uint32(90).string(message.tlsKey);
563
- }
564
- if (message.auth !== 0) {
565
- writer.uint32(96).int32(message.auth);
566
- }
567
- if (message.login !== "") {
568
- writer.uint32(106).string(message.login);
569
- }
570
- if (message.password !== "") {
571
- writer.uint32(114).string(message.password);
572
- }
573
- return writer;
574
- },
575
- decode(input, length) {
576
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
577
- let end = length === void 0 ? reader.len : reader.pos + length;
578
- const message = createBaseOpenVPNConfigRequest();
579
- while (reader.pos < end) {
580
- const tag = reader.uint32();
581
- switch (tag >>> 3) {
582
- case 1: {
583
- if (tag !== 8) {
584
- break;
585
- }
586
- message.allTraffic = reader.bool();
587
- continue;
588
- }
589
- case 2: {
590
- if (tag !== 16) {
591
- break;
592
- }
593
- message.proto = reader.int32();
594
- continue;
595
- }
596
- case 3: {
597
- if (tag !== 26) {
598
- break;
599
- }
600
- message.host = reader.string();
601
- continue;
602
- }
603
- case 4: {
604
- if (tag !== 32) {
605
- break;
606
- }
607
- message.port = reader.uint32();
608
- continue;
609
- }
610
- case 5: {
611
- if (tag !== 40) {
612
- break;
613
- }
614
- message.cipher = reader.int32();
615
- continue;
616
- }
617
- case 6: {
618
- if (tag !== 50) {
619
- break;
620
- }
621
- message.ca = reader.string();
622
- continue;
623
- }
624
- case 7: {
625
- if (tag !== 58) {
626
- break;
627
- }
628
- message.cert = reader.string();
629
- continue;
630
- }
631
- case 8: {
632
- if (tag !== 66) {
633
- break;
634
- }
635
- message.key = reader.string();
636
- continue;
637
- }
638
- case 9: {
639
- if (tag !== 72) {
640
- break;
641
- }
642
- message.tlsEncryption = reader.int32();
643
- continue;
644
- }
645
- case 10: {
646
- if (tag !== 80) {
647
- break;
648
- }
649
- message.tlsKeyDirection = reader.int32();
650
- continue;
651
- }
652
- case 11: {
653
- if (tag !== 90) {
654
- break;
655
- }
656
- message.tlsKey = reader.string();
657
- continue;
658
- }
659
- case 12: {
660
- if (tag !== 96) {
661
- break;
662
- }
663
- message.auth = reader.int32();
664
- continue;
665
- }
666
- case 13: {
667
- if (tag !== 106) {
668
- break;
669
- }
670
- message.login = reader.string();
671
- continue;
672
- }
673
- case 14: {
674
- if (tag !== 114) {
675
- break;
676
- }
677
- message.password = reader.string();
678
- continue;
679
- }
680
- }
681
- if ((tag & 7) === 4 || tag === 0) {
682
- break;
683
- }
684
- reader.skip(tag & 7);
685
- }
686
- return message;
687
- },
688
- fromJSON(object) {
689
- return {
690
- allTraffic: isSet(object.allTraffic) ? globalThis.Boolean(object.allTraffic) : false,
691
- proto: isSet(object.proto) ? openVPNProtoFromJSON(object.proto) : 0,
692
- host: isSet(object.host) ? globalThis.String(object.host) : "",
693
- port: isSet(object.port) ? globalThis.Number(object.port) : 0,
694
- cipher: isSet(object.cipher) ? openVPNCipherFromJSON(object.cipher) : 0,
695
- ca: isSet(object.ca) ? globalThis.String(object.ca) : "",
696
- cert: isSet(object.cert) ? globalThis.String(object.cert) : "",
697
- key: isSet(object.key) ? globalThis.String(object.key) : "",
698
- tlsEncryption: isSet(object.tlsEncryption) ? openVPNEncryptionFromJSON(object.tlsEncryption) : 0,
699
- tlsKeyDirection: isSet(object.tlsKeyDirection) ? openVPNKeyDirectionFromJSON(object.tlsKeyDirection) : 0,
700
- tlsKey: isSet(object.tlsKey) ? globalThis.String(object.tlsKey) : "",
701
- auth: isSet(object.auth) ? openVPNAuthFromJSON(object.auth) : 0,
702
- login: isSet(object.login) ? globalThis.String(object.login) : "",
703
- password: isSet(object.password) ? globalThis.String(object.password) : ""
704
- };
705
- },
706
- toJSON(message) {
707
- const obj = {};
708
- if (message.allTraffic !== false) {
709
- obj.allTraffic = message.allTraffic;
710
- }
711
- if (message.proto !== 0) {
712
- obj.proto = openVPNProtoToJSON(message.proto);
713
- }
714
- if (message.host !== "") {
715
- obj.host = message.host;
716
- }
717
- if (message.port !== 0) {
718
- obj.port = Math.round(message.port);
719
- }
720
- if (message.cipher !== 0) {
721
- obj.cipher = openVPNCipherToJSON(message.cipher);
722
- }
723
- if (message.ca !== "") {
724
- obj.ca = message.ca;
725
- }
726
- if (message.cert !== "") {
727
- obj.cert = message.cert;
728
- }
729
- if (message.key !== "") {
730
- obj.key = message.key;
731
- }
732
- if (message.tlsEncryption !== 0) {
733
- obj.tlsEncryption = openVPNEncryptionToJSON(message.tlsEncryption);
734
- }
735
- if (message.tlsKeyDirection !== 0) {
736
- obj.tlsKeyDirection = openVPNKeyDirectionToJSON(message.tlsKeyDirection);
737
- }
738
- if (message.tlsKey !== "") {
739
- obj.tlsKey = message.tlsKey;
740
- }
741
- if (message.auth !== 0) {
742
- obj.auth = openVPNAuthToJSON(message.auth);
743
- }
744
- if (message.login !== "") {
745
- obj.login = message.login;
746
- }
747
- if (message.password !== "") {
748
- obj.password = message.password;
749
- }
750
- return obj;
751
- },
752
- create(base) {
753
- return OpenVPNConfigRequest.fromPartial(base ?? {});
754
- },
755
- fromPartial(object) {
756
- const message = createBaseOpenVPNConfigRequest();
757
- message.allTraffic = object.allTraffic ?? false;
758
- message.proto = object.proto ?? 0;
759
- message.host = object.host ?? "";
760
- message.port = object.port ?? 0;
761
- message.cipher = object.cipher ?? 0;
762
- message.ca = object.ca ?? "";
763
- message.cert = object.cert ?? "";
764
- message.key = object.key ?? "";
765
- message.tlsEncryption = object.tlsEncryption ?? 0;
766
- message.tlsKeyDirection = object.tlsKeyDirection ?? 0;
767
- message.tlsKey = object.tlsKey ?? "";
768
- message.auth = object.auth ?? 0;
769
- message.login = object.login ?? "";
770
- message.password = object.password ?? "";
771
- return message;
772
- }
773
- };
774
- function isSet(value) {
775
- return value !== null && value !== void 0;
776
- }
777
-
778
- export {
779
- protobufPackage,
780
- GproxyType,
781
- gproxyTypeFromJSON,
782
- gproxyTypeToJSON,
783
- OpenVPNProto,
784
- openVPNProtoFromJSON,
785
- openVPNProtoToJSON,
786
- OpenVPNAuth,
787
- openVPNAuthFromJSON,
788
- openVPNAuthToJSON,
789
- OpenVPNCipher,
790
- openVPNCipherFromJSON,
791
- openVPNCipherToJSON,
792
- OpenVPNKeyDirection,
793
- openVPNKeyDirectionFromJSON,
794
- openVPNKeyDirectionToJSON,
795
- OpenVPNEncryption,
796
- openVPNEncryptionFromJSON,
797
- openVPNEncryptionToJSON,
798
- GproxyConfigRequest,
799
- OpenVPNConfigRequest
800
- };