@ekhein/lamda-node-sdk 1.0.1 → 1.0.2

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 (109) hide show
  1. package/dist/chunk-3HDKHFYE.js +1602 -0
  2. package/dist/chunk-3JBDAA2H.js +439 -0
  3. package/dist/chunk-4AHM55IO.js +1172 -0
  4. package/dist/chunk-6HD35RPW.js +5370 -0
  5. package/dist/chunk-7XF22HAW.js +907 -0
  6. package/dist/chunk-7YGA6EOV.js +109 -0
  7. package/dist/chunk-ADS4GRIL.js +14 -0
  8. package/dist/chunk-FSLE4VGI.js +48 -0
  9. package/dist/chunk-H7Z6XFBF.js +134 -0
  10. package/dist/chunk-KJKSI2WL.js +62 -0
  11. package/dist/chunk-O52JGDU7.js +800 -0
  12. package/dist/chunk-ORXTTWPB.js +379 -0
  13. package/dist/chunk-OZJH6SR7.js +20 -0
  14. package/dist/chunk-P53F45YO.js +64 -0
  15. package/dist/chunk-QXMPY6EE.js +289 -0
  16. package/dist/chunk-SBFKX3ZY.js +1554 -0
  17. package/dist/chunk-WFQEBPE6.js +300 -0
  18. package/dist/chunk-X4LTH2UN.js +983 -0
  19. package/dist/chunk-XAX5BZL3.js +132 -0
  20. package/dist/chunk-ZXF5DGTC.js +45 -0
  21. package/dist/constants/activity.flag.cjs +92 -0
  22. package/dist/constants/activity.flag.d.cts +24 -0
  23. package/dist/constants/activity.flag.d.ts +24 -0
  24. package/dist/constants/activity.flag.js +49 -0
  25. package/dist/constants/android.permission.cjs +116 -0
  26. package/dist/constants/android.permission.d.cts +32 -0
  27. package/dist/constants/android.permission.d.ts +32 -0
  28. package/dist/constants/android.permission.js +65 -0
  29. package/dist/constants/index.cjs +186 -0
  30. package/dist/constants/index.d.cts +2 -0
  31. package/dist/constants/index.d.ts +2 -0
  32. package/dist/constants/index.js +111 -0
  33. package/dist/decorators/inject.decorator.cjs +43 -0
  34. package/dist/decorators/inject.decorator.d.cts +5 -0
  35. package/dist/decorators/inject.decorator.d.ts +5 -0
  36. package/dist/decorators/inject.decorator.js +7 -0
  37. package/dist/main.cjs +1 -2
  38. package/dist/main.d.cts +17 -1152
  39. package/dist/main.d.ts +17 -1152
  40. package/dist/main.js +36 -11873
  41. package/dist/rpc/application.cjs +2019 -0
  42. package/dist/rpc/application.d.cts +138 -0
  43. package/dist/rpc/application.d.ts +138 -0
  44. package/dist/rpc/application.js +50 -0
  45. package/dist/rpc/debug.cjs +86 -0
  46. package/dist/rpc/debug.d.cts +21 -0
  47. package/dist/rpc/debug.d.ts +21 -0
  48. package/dist/rpc/debug.js +9 -0
  49. package/dist/rpc/file.cjs +405 -0
  50. package/dist/rpc/file.d.cts +40 -0
  51. package/dist/rpc/file.d.ts +40 -0
  52. package/dist/rpc/file.js +13 -0
  53. package/dist/rpc/google/protobuf/any.cjs +126 -0
  54. package/dist/rpc/google/protobuf/any.d.cts +22 -0
  55. package/dist/rpc/google/protobuf/any.d.ts +22 -0
  56. package/dist/rpc/google/protobuf/any.js +103 -0
  57. package/dist/rpc/google/protobuf/empty.cjs +69 -0
  58. package/dist/rpc/google/protobuf/empty.d.cts +20 -0
  59. package/dist/rpc/google/protobuf/empty.d.ts +20 -0
  60. package/dist/rpc/google/protobuf/empty.js +9 -0
  61. package/dist/rpc/google/protobuf/struct.cjs +469 -0
  62. package/dist/rpc/google/protobuf/struct.d.cts +65 -0
  63. package/dist/rpc/google/protobuf/struct.d.ts +65 -0
  64. package/dist/rpc/google/protobuf/struct.js +21 -0
  65. package/dist/rpc/policy.cjs +133 -0
  66. package/dist/rpc/policy.d.cts +24 -0
  67. package/dist/rpc/policy.d.ts +24 -0
  68. package/dist/rpc/policy.js +9 -0
  69. package/dist/rpc/proxy.cjs +1109 -0
  70. package/dist/rpc/proxy.d.cts +108 -0
  71. package/dist/rpc/proxy.d.ts +108 -0
  72. package/dist/rpc/proxy.js +49 -0
  73. package/dist/rpc/services.cjs +11898 -0
  74. package/dist/rpc/services.d.cts +1920 -0
  75. package/dist/rpc/services.d.ts +1920 -0
  76. package/dist/rpc/services.js +48 -0
  77. package/dist/rpc/settings.cjs +161 -0
  78. package/dist/rpc/settings.d.cts +31 -0
  79. package/dist/rpc/settings.d.ts +31 -0
  80. package/dist/rpc/settings.js +15 -0
  81. package/dist/rpc/shell.cjs +326 -0
  82. package/dist/rpc/shell.d.cts +36 -0
  83. package/dist/rpc/shell.d.ts +36 -0
  84. package/dist/rpc/shell.js +13 -0
  85. package/dist/rpc/status.cjs +936 -0
  86. package/dist/rpc/status.d.cts +76 -0
  87. package/dist/rpc/status.d.ts +76 -0
  88. package/dist/rpc/status.js +19 -0
  89. package/dist/rpc/storage.cjs +156 -0
  90. package/dist/rpc/storage.d.cts +24 -0
  91. package/dist/rpc/storage.d.ts +24 -0
  92. package/dist/rpc/storage.js +9 -0
  93. package/dist/rpc/types.cjs +317 -0
  94. package/dist/rpc/types.d.cts +36 -0
  95. package/dist/rpc/types.d.ts +36 -0
  96. package/dist/rpc/types.js +17 -0
  97. package/dist/rpc/uiautomator.cjs +5446 -0
  98. package/dist/rpc/uiautomator.d.cts +618 -0
  99. package/dist/rpc/uiautomator.d.ts +618 -0
  100. package/dist/rpc/uiautomator.js +113 -0
  101. package/dist/rpc/util.cjs +1212 -0
  102. package/dist/rpc/util.d.cts +103 -0
  103. package/dist/rpc/util.d.ts +103 -0
  104. package/dist/rpc/util.js +41 -0
  105. package/dist/rpc/wifi.cjs +1015 -0
  106. package/dist/rpc/wifi.d.cts +84 -0
  107. package/dist/rpc/wifi.d.ts +84 -0
  108. package/dist/rpc/wifi.js +25 -0
  109. package/package.json +3 -4
@@ -0,0 +1,1109 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/rpc/proxy.ts
20
+ var proxy_exports = {};
21
+ __export(proxy_exports, {
22
+ GproxyConfigRequest: () => GproxyConfigRequest,
23
+ GproxyType: () => GproxyType,
24
+ OpenVPNAuth: () => OpenVPNAuth,
25
+ OpenVPNCipher: () => OpenVPNCipher,
26
+ OpenVPNConfigRequest: () => OpenVPNConfigRequest,
27
+ OpenVPNEncryption: () => OpenVPNEncryption,
28
+ OpenVPNKeyDirection: () => OpenVPNKeyDirection,
29
+ OpenVPNProto: () => OpenVPNProto,
30
+ gproxyTypeFromJSON: () => gproxyTypeFromJSON,
31
+ gproxyTypeToJSON: () => gproxyTypeToJSON,
32
+ openVPNAuthFromJSON: () => openVPNAuthFromJSON,
33
+ openVPNAuthToJSON: () => openVPNAuthToJSON,
34
+ openVPNCipherFromJSON: () => openVPNCipherFromJSON,
35
+ openVPNCipherToJSON: () => openVPNCipherToJSON,
36
+ openVPNEncryptionFromJSON: () => openVPNEncryptionFromJSON,
37
+ openVPNEncryptionToJSON: () => openVPNEncryptionToJSON,
38
+ openVPNKeyDirectionFromJSON: () => openVPNKeyDirectionFromJSON,
39
+ openVPNKeyDirectionToJSON: () => openVPNKeyDirectionToJSON,
40
+ openVPNProtoFromJSON: () => openVPNProtoFromJSON,
41
+ openVPNProtoToJSON: () => openVPNProtoToJSON,
42
+ protobufPackage: () => protobufPackage
43
+ });
44
+ module.exports = __toCommonJS(proxy_exports);
45
+ var import_wire3 = require("@bufbuild/protobuf/wire");
46
+
47
+ // src/rpc/application.ts
48
+ var import_wire2 = require("@bufbuild/protobuf/wire");
49
+
50
+ // src/rpc/google/protobuf/struct.ts
51
+ var import_wire = require("@bufbuild/protobuf/wire");
52
+
53
+ // src/rpc/application.ts
54
+ function createBaseApplicationInfo() {
55
+ return {
56
+ packageName: "",
57
+ uid: 0,
58
+ enabled: false,
59
+ processName: "",
60
+ sourceDir: "",
61
+ dataDir: "",
62
+ baseRevisionCode: 0,
63
+ firstInstallTime: 0,
64
+ lastUpdateTime: 0,
65
+ versionCode: 0,
66
+ versionName: "",
67
+ activity: "",
68
+ user: 0
69
+ };
70
+ }
71
+ var ApplicationInfo = {
72
+ encode(message, writer = new import_wire2.BinaryWriter()) {
73
+ if (message.packageName !== "") {
74
+ writer.uint32(10).string(message.packageName);
75
+ }
76
+ if (message.uid !== 0) {
77
+ writer.uint32(16).uint32(message.uid);
78
+ }
79
+ if (message.enabled !== false) {
80
+ writer.uint32(24).bool(message.enabled);
81
+ }
82
+ if (message.processName !== "") {
83
+ writer.uint32(34).string(message.processName);
84
+ }
85
+ if (message.sourceDir !== "") {
86
+ writer.uint32(42).string(message.sourceDir);
87
+ }
88
+ if (message.dataDir !== "") {
89
+ writer.uint32(50).string(message.dataDir);
90
+ }
91
+ if (message.baseRevisionCode !== 0) {
92
+ writer.uint32(56).uint32(message.baseRevisionCode);
93
+ }
94
+ if (message.firstInstallTime !== 0) {
95
+ writer.uint32(64).int64(message.firstInstallTime);
96
+ }
97
+ if (message.lastUpdateTime !== 0) {
98
+ writer.uint32(72).int64(message.lastUpdateTime);
99
+ }
100
+ if (message.versionCode !== 0) {
101
+ writer.uint32(80).uint32(message.versionCode);
102
+ }
103
+ if (message.versionName !== "") {
104
+ writer.uint32(90).string(message.versionName);
105
+ }
106
+ if (message.activity !== "") {
107
+ writer.uint32(98).string(message.activity);
108
+ }
109
+ if (message.user !== 0) {
110
+ writer.uint32(104).uint32(message.user);
111
+ }
112
+ return writer;
113
+ },
114
+ decode(input, length) {
115
+ const reader = input instanceof import_wire2.BinaryReader ? input : new import_wire2.BinaryReader(input);
116
+ let end = length === void 0 ? reader.len : reader.pos + length;
117
+ const message = createBaseApplicationInfo();
118
+ while (reader.pos < end) {
119
+ const tag = reader.uint32();
120
+ switch (tag >>> 3) {
121
+ case 1: {
122
+ if (tag !== 10) {
123
+ break;
124
+ }
125
+ message.packageName = reader.string();
126
+ continue;
127
+ }
128
+ case 2: {
129
+ if (tag !== 16) {
130
+ break;
131
+ }
132
+ message.uid = reader.uint32();
133
+ continue;
134
+ }
135
+ case 3: {
136
+ if (tag !== 24) {
137
+ break;
138
+ }
139
+ message.enabled = reader.bool();
140
+ continue;
141
+ }
142
+ case 4: {
143
+ if (tag !== 34) {
144
+ break;
145
+ }
146
+ message.processName = reader.string();
147
+ continue;
148
+ }
149
+ case 5: {
150
+ if (tag !== 42) {
151
+ break;
152
+ }
153
+ message.sourceDir = reader.string();
154
+ continue;
155
+ }
156
+ case 6: {
157
+ if (tag !== 50) {
158
+ break;
159
+ }
160
+ message.dataDir = reader.string();
161
+ continue;
162
+ }
163
+ case 7: {
164
+ if (tag !== 56) {
165
+ break;
166
+ }
167
+ message.baseRevisionCode = reader.uint32();
168
+ continue;
169
+ }
170
+ case 8: {
171
+ if (tag !== 64) {
172
+ break;
173
+ }
174
+ message.firstInstallTime = longToNumber(reader.int64());
175
+ continue;
176
+ }
177
+ case 9: {
178
+ if (tag !== 72) {
179
+ break;
180
+ }
181
+ message.lastUpdateTime = longToNumber(reader.int64());
182
+ continue;
183
+ }
184
+ case 10: {
185
+ if (tag !== 80) {
186
+ break;
187
+ }
188
+ message.versionCode = reader.uint32();
189
+ continue;
190
+ }
191
+ case 11: {
192
+ if (tag !== 90) {
193
+ break;
194
+ }
195
+ message.versionName = reader.string();
196
+ continue;
197
+ }
198
+ case 12: {
199
+ if (tag !== 98) {
200
+ break;
201
+ }
202
+ message.activity = reader.string();
203
+ continue;
204
+ }
205
+ case 13: {
206
+ if (tag !== 104) {
207
+ break;
208
+ }
209
+ message.user = reader.uint32();
210
+ continue;
211
+ }
212
+ }
213
+ if ((tag & 7) === 4 || tag === 0) {
214
+ break;
215
+ }
216
+ reader.skip(tag & 7);
217
+ }
218
+ return message;
219
+ },
220
+ fromJSON(object) {
221
+ return {
222
+ packageName: isSet(object.packageName) ? globalThis.String(object.packageName) : "",
223
+ uid: isSet(object.uid) ? globalThis.Number(object.uid) : 0,
224
+ enabled: isSet(object.enabled) ? globalThis.Boolean(object.enabled) : false,
225
+ processName: isSet(object.processName) ? globalThis.String(object.processName) : "",
226
+ sourceDir: isSet(object.sourceDir) ? globalThis.String(object.sourceDir) : "",
227
+ dataDir: isSet(object.dataDir) ? globalThis.String(object.dataDir) : "",
228
+ baseRevisionCode: isSet(object.baseRevisionCode) ? globalThis.Number(object.baseRevisionCode) : 0,
229
+ firstInstallTime: isSet(object.firstInstallTime) ? globalThis.Number(object.firstInstallTime) : 0,
230
+ lastUpdateTime: isSet(object.lastUpdateTime) ? globalThis.Number(object.lastUpdateTime) : 0,
231
+ versionCode: isSet(object.versionCode) ? globalThis.Number(object.versionCode) : 0,
232
+ versionName: isSet(object.versionName) ? globalThis.String(object.versionName) : "",
233
+ activity: isSet(object.activity) ? globalThis.String(object.activity) : "",
234
+ user: isSet(object.user) ? globalThis.Number(object.user) : 0
235
+ };
236
+ },
237
+ toJSON(message) {
238
+ const obj = {};
239
+ if (message.packageName !== "") {
240
+ obj.packageName = message.packageName;
241
+ }
242
+ if (message.uid !== 0) {
243
+ obj.uid = Math.round(message.uid);
244
+ }
245
+ if (message.enabled !== false) {
246
+ obj.enabled = message.enabled;
247
+ }
248
+ if (message.processName !== "") {
249
+ obj.processName = message.processName;
250
+ }
251
+ if (message.sourceDir !== "") {
252
+ obj.sourceDir = message.sourceDir;
253
+ }
254
+ if (message.dataDir !== "") {
255
+ obj.dataDir = message.dataDir;
256
+ }
257
+ if (message.baseRevisionCode !== 0) {
258
+ obj.baseRevisionCode = Math.round(message.baseRevisionCode);
259
+ }
260
+ if (message.firstInstallTime !== 0) {
261
+ obj.firstInstallTime = Math.round(message.firstInstallTime);
262
+ }
263
+ if (message.lastUpdateTime !== 0) {
264
+ obj.lastUpdateTime = Math.round(message.lastUpdateTime);
265
+ }
266
+ if (message.versionCode !== 0) {
267
+ obj.versionCode = Math.round(message.versionCode);
268
+ }
269
+ if (message.versionName !== "") {
270
+ obj.versionName = message.versionName;
271
+ }
272
+ if (message.activity !== "") {
273
+ obj.activity = message.activity;
274
+ }
275
+ if (message.user !== 0) {
276
+ obj.user = Math.round(message.user);
277
+ }
278
+ return obj;
279
+ },
280
+ create(base) {
281
+ return ApplicationInfo.fromPartial(base ?? {});
282
+ },
283
+ fromPartial(object) {
284
+ const message = createBaseApplicationInfo();
285
+ message.packageName = object.packageName ?? "";
286
+ message.uid = object.uid ?? 0;
287
+ message.enabled = object.enabled ?? false;
288
+ message.processName = object.processName ?? "";
289
+ message.sourceDir = object.sourceDir ?? "";
290
+ message.dataDir = object.dataDir ?? "";
291
+ message.baseRevisionCode = object.baseRevisionCode ?? 0;
292
+ message.firstInstallTime = object.firstInstallTime ?? 0;
293
+ message.lastUpdateTime = object.lastUpdateTime ?? 0;
294
+ message.versionCode = object.versionCode ?? 0;
295
+ message.versionName = object.versionName ?? "";
296
+ message.activity = object.activity ?? "";
297
+ message.user = object.user ?? 0;
298
+ return message;
299
+ }
300
+ };
301
+ function longToNumber(int64) {
302
+ const num = globalThis.Number(int64.toString());
303
+ if (num > globalThis.Number.MAX_SAFE_INTEGER) {
304
+ throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
305
+ }
306
+ if (num < globalThis.Number.MIN_SAFE_INTEGER) {
307
+ throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
308
+ }
309
+ return num;
310
+ }
311
+ function isSet(value) {
312
+ return value !== null && value !== void 0;
313
+ }
314
+
315
+ // src/rpc/proxy.ts
316
+ var protobufPackage = "lamda.rpc";
317
+ var GproxyType = /* @__PURE__ */ ((GproxyType2) => {
318
+ GproxyType2[GproxyType2["SOCKS5"] = 0] = "SOCKS5";
319
+ GproxyType2[GproxyType2["HTTP_CONNECT"] = 1] = "HTTP_CONNECT";
320
+ GproxyType2[GproxyType2["HTTP_RELAY"] = 2] = "HTTP_RELAY";
321
+ GproxyType2[GproxyType2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
322
+ return GproxyType2;
323
+ })(GproxyType || {});
324
+ function gproxyTypeFromJSON(object) {
325
+ switch (object) {
326
+ case 0:
327
+ case "SOCKS5":
328
+ return 0 /* SOCKS5 */;
329
+ case 1:
330
+ case "HTTP_CONNECT":
331
+ return 1 /* HTTP_CONNECT */;
332
+ case 2:
333
+ case "HTTP_RELAY":
334
+ return 2 /* HTTP_RELAY */;
335
+ case -1:
336
+ case "UNRECOGNIZED":
337
+ default:
338
+ return -1 /* UNRECOGNIZED */;
339
+ }
340
+ }
341
+ function gproxyTypeToJSON(object) {
342
+ switch (object) {
343
+ case 0 /* SOCKS5 */:
344
+ return "SOCKS5";
345
+ case 1 /* HTTP_CONNECT */:
346
+ return "HTTP_CONNECT";
347
+ case 2 /* HTTP_RELAY */:
348
+ return "HTTP_RELAY";
349
+ case -1 /* UNRECOGNIZED */:
350
+ default:
351
+ return "UNRECOGNIZED";
352
+ }
353
+ }
354
+ var OpenVPNProto = /* @__PURE__ */ ((OpenVPNProto2) => {
355
+ OpenVPNProto2[OpenVPNProto2["TCP"] = 0] = "TCP";
356
+ OpenVPNProto2[OpenVPNProto2["UDP"] = 1] = "UDP";
357
+ OpenVPNProto2[OpenVPNProto2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
358
+ return OpenVPNProto2;
359
+ })(OpenVPNProto || {});
360
+ function openVPNProtoFromJSON(object) {
361
+ switch (object) {
362
+ case 0:
363
+ case "TCP":
364
+ return 0 /* TCP */;
365
+ case 1:
366
+ case "UDP":
367
+ return 1 /* UDP */;
368
+ case -1:
369
+ case "UNRECOGNIZED":
370
+ default:
371
+ return -1 /* UNRECOGNIZED */;
372
+ }
373
+ }
374
+ function openVPNProtoToJSON(object) {
375
+ switch (object) {
376
+ case 0 /* TCP */:
377
+ return "TCP";
378
+ case 1 /* UDP */:
379
+ return "UDP";
380
+ case -1 /* UNRECOGNIZED */:
381
+ default:
382
+ return "UNRECOGNIZED";
383
+ }
384
+ }
385
+ var OpenVPNAuth = /* @__PURE__ */ ((OpenVPNAuth2) => {
386
+ OpenVPNAuth2[OpenVPNAuth2["SHA1"] = 0] = "SHA1";
387
+ OpenVPNAuth2[OpenVPNAuth2["SHA224"] = 1] = "SHA224";
388
+ OpenVPNAuth2[OpenVPNAuth2["SHA256"] = 2] = "SHA256";
389
+ OpenVPNAuth2[OpenVPNAuth2["SHA384"] = 3] = "SHA384";
390
+ OpenVPNAuth2[OpenVPNAuth2["SHA512"] = 4] = "SHA512";
391
+ OpenVPNAuth2[OpenVPNAuth2["RIPEMD160"] = 5] = "RIPEMD160";
392
+ OpenVPNAuth2[OpenVPNAuth2["RSA_SHA1"] = 6] = "RSA_SHA1";
393
+ OpenVPNAuth2[OpenVPNAuth2["RSA_SHA224"] = 7] = "RSA_SHA224";
394
+ OpenVPNAuth2[OpenVPNAuth2["RSA_SHA256"] = 8] = "RSA_SHA256";
395
+ OpenVPNAuth2[OpenVPNAuth2["RSA_SHA384"] = 9] = "RSA_SHA384";
396
+ OpenVPNAuth2[OpenVPNAuth2["RSA_SHA512"] = 10] = "RSA_SHA512";
397
+ OpenVPNAuth2[OpenVPNAuth2["RSA_RIPEMD160"] = 11] = "RSA_RIPEMD160";
398
+ OpenVPNAuth2[OpenVPNAuth2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
399
+ return OpenVPNAuth2;
400
+ })(OpenVPNAuth || {});
401
+ function openVPNAuthFromJSON(object) {
402
+ switch (object) {
403
+ case 0:
404
+ case "SHA1":
405
+ return 0 /* SHA1 */;
406
+ case 1:
407
+ case "SHA224":
408
+ return 1 /* SHA224 */;
409
+ case 2:
410
+ case "SHA256":
411
+ return 2 /* SHA256 */;
412
+ case 3:
413
+ case "SHA384":
414
+ return 3 /* SHA384 */;
415
+ case 4:
416
+ case "SHA512":
417
+ return 4 /* SHA512 */;
418
+ case 5:
419
+ case "RIPEMD160":
420
+ return 5 /* RIPEMD160 */;
421
+ case 6:
422
+ case "RSA_SHA1":
423
+ return 6 /* RSA_SHA1 */;
424
+ case 7:
425
+ case "RSA_SHA224":
426
+ return 7 /* RSA_SHA224 */;
427
+ case 8:
428
+ case "RSA_SHA256":
429
+ return 8 /* RSA_SHA256 */;
430
+ case 9:
431
+ case "RSA_SHA384":
432
+ return 9 /* RSA_SHA384 */;
433
+ case 10:
434
+ case "RSA_SHA512":
435
+ return 10 /* RSA_SHA512 */;
436
+ case 11:
437
+ case "RSA_RIPEMD160":
438
+ return 11 /* RSA_RIPEMD160 */;
439
+ case -1:
440
+ case "UNRECOGNIZED":
441
+ default:
442
+ return -1 /* UNRECOGNIZED */;
443
+ }
444
+ }
445
+ function openVPNAuthToJSON(object) {
446
+ switch (object) {
447
+ case 0 /* SHA1 */:
448
+ return "SHA1";
449
+ case 1 /* SHA224 */:
450
+ return "SHA224";
451
+ case 2 /* SHA256 */:
452
+ return "SHA256";
453
+ case 3 /* SHA384 */:
454
+ return "SHA384";
455
+ case 4 /* SHA512 */:
456
+ return "SHA512";
457
+ case 5 /* RIPEMD160 */:
458
+ return "RIPEMD160";
459
+ case 6 /* RSA_SHA1 */:
460
+ return "RSA_SHA1";
461
+ case 7 /* RSA_SHA224 */:
462
+ return "RSA_SHA224";
463
+ case 8 /* RSA_SHA256 */:
464
+ return "RSA_SHA256";
465
+ case 9 /* RSA_SHA384 */:
466
+ return "RSA_SHA384";
467
+ case 10 /* RSA_SHA512 */:
468
+ return "RSA_SHA512";
469
+ case 11 /* RSA_RIPEMD160 */:
470
+ return "RSA_RIPEMD160";
471
+ case -1 /* UNRECOGNIZED */:
472
+ default:
473
+ return "UNRECOGNIZED";
474
+ }
475
+ }
476
+ var OpenVPNCipher = /* @__PURE__ */ ((OpenVPNCipher2) => {
477
+ OpenVPNCipher2[OpenVPNCipher2["AES_128_GCM"] = 0] = "AES_128_GCM";
478
+ OpenVPNCipher2[OpenVPNCipher2["AES_256_GCM"] = 1] = "AES_256_GCM";
479
+ OpenVPNCipher2[OpenVPNCipher2["CHACHA20_POLY1305"] = 2] = "CHACHA20_POLY1305";
480
+ OpenVPNCipher2[OpenVPNCipher2["AES_128_CBC"] = 3] = "AES_128_CBC";
481
+ OpenVPNCipher2[OpenVPNCipher2["AES_256_CBC"] = 4] = "AES_256_CBC";
482
+ OpenVPNCipher2[OpenVPNCipher2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
483
+ return OpenVPNCipher2;
484
+ })(OpenVPNCipher || {});
485
+ function openVPNCipherFromJSON(object) {
486
+ switch (object) {
487
+ case 0:
488
+ case "AES_128_GCM":
489
+ return 0 /* AES_128_GCM */;
490
+ case 1:
491
+ case "AES_256_GCM":
492
+ return 1 /* AES_256_GCM */;
493
+ case 2:
494
+ case "CHACHA20_POLY1305":
495
+ return 2 /* CHACHA20_POLY1305 */;
496
+ case 3:
497
+ case "AES_128_CBC":
498
+ return 3 /* AES_128_CBC */;
499
+ case 4:
500
+ case "AES_256_CBC":
501
+ return 4 /* AES_256_CBC */;
502
+ case -1:
503
+ case "UNRECOGNIZED":
504
+ default:
505
+ return -1 /* UNRECOGNIZED */;
506
+ }
507
+ }
508
+ function openVPNCipherToJSON(object) {
509
+ switch (object) {
510
+ case 0 /* AES_128_GCM */:
511
+ return "AES_128_GCM";
512
+ case 1 /* AES_256_GCM */:
513
+ return "AES_256_GCM";
514
+ case 2 /* CHACHA20_POLY1305 */:
515
+ return "CHACHA20_POLY1305";
516
+ case 3 /* AES_128_CBC */:
517
+ return "AES_128_CBC";
518
+ case 4 /* AES_256_CBC */:
519
+ return "AES_256_CBC";
520
+ case -1 /* UNRECOGNIZED */:
521
+ default:
522
+ return "UNRECOGNIZED";
523
+ }
524
+ }
525
+ var OpenVPNKeyDirection = /* @__PURE__ */ ((OpenVPNKeyDirection2) => {
526
+ OpenVPNKeyDirection2[OpenVPNKeyDirection2["KEY_DIRECTION_NONE"] = 0] = "KEY_DIRECTION_NONE";
527
+ OpenVPNKeyDirection2[OpenVPNKeyDirection2["KEY_DIRECTION_0"] = 1] = "KEY_DIRECTION_0";
528
+ OpenVPNKeyDirection2[OpenVPNKeyDirection2["KEY_DIRECTION_1"] = 2] = "KEY_DIRECTION_1";
529
+ OpenVPNKeyDirection2[OpenVPNKeyDirection2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
530
+ return OpenVPNKeyDirection2;
531
+ })(OpenVPNKeyDirection || {});
532
+ function openVPNKeyDirectionFromJSON(object) {
533
+ switch (object) {
534
+ case 0:
535
+ case "KEY_DIRECTION_NONE":
536
+ return 0 /* KEY_DIRECTION_NONE */;
537
+ case 1:
538
+ case "KEY_DIRECTION_0":
539
+ return 1 /* KEY_DIRECTION_0 */;
540
+ case 2:
541
+ case "KEY_DIRECTION_1":
542
+ return 2 /* KEY_DIRECTION_1 */;
543
+ case -1:
544
+ case "UNRECOGNIZED":
545
+ default:
546
+ return -1 /* UNRECOGNIZED */;
547
+ }
548
+ }
549
+ function openVPNKeyDirectionToJSON(object) {
550
+ switch (object) {
551
+ case 0 /* KEY_DIRECTION_NONE */:
552
+ return "KEY_DIRECTION_NONE";
553
+ case 1 /* KEY_DIRECTION_0 */:
554
+ return "KEY_DIRECTION_0";
555
+ case 2 /* KEY_DIRECTION_1 */:
556
+ return "KEY_DIRECTION_1";
557
+ case -1 /* UNRECOGNIZED */:
558
+ default:
559
+ return "UNRECOGNIZED";
560
+ }
561
+ }
562
+ var OpenVPNEncryption = /* @__PURE__ */ ((OpenVPNEncryption2) => {
563
+ OpenVPNEncryption2[OpenVPNEncryption2["TLS_NONE"] = 0] = "TLS_NONE";
564
+ OpenVPNEncryption2[OpenVPNEncryption2["TLS_AUTH"] = 1] = "TLS_AUTH";
565
+ OpenVPNEncryption2[OpenVPNEncryption2["TLS_CRYPT"] = 2] = "TLS_CRYPT";
566
+ OpenVPNEncryption2[OpenVPNEncryption2["TLS_CRYPT_V2"] = 3] = "TLS_CRYPT_V2";
567
+ OpenVPNEncryption2[OpenVPNEncryption2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
568
+ return OpenVPNEncryption2;
569
+ })(OpenVPNEncryption || {});
570
+ function openVPNEncryptionFromJSON(object) {
571
+ switch (object) {
572
+ case 0:
573
+ case "TLS_NONE":
574
+ return 0 /* TLS_NONE */;
575
+ case 1:
576
+ case "TLS_AUTH":
577
+ return 1 /* TLS_AUTH */;
578
+ case 2:
579
+ case "TLS_CRYPT":
580
+ return 2 /* TLS_CRYPT */;
581
+ case 3:
582
+ case "TLS_CRYPT_V2":
583
+ return 3 /* TLS_CRYPT_V2 */;
584
+ case -1:
585
+ case "UNRECOGNIZED":
586
+ default:
587
+ return -1 /* UNRECOGNIZED */;
588
+ }
589
+ }
590
+ function openVPNEncryptionToJSON(object) {
591
+ switch (object) {
592
+ case 0 /* TLS_NONE */:
593
+ return "TLS_NONE";
594
+ case 1 /* TLS_AUTH */:
595
+ return "TLS_AUTH";
596
+ case 2 /* TLS_CRYPT */:
597
+ return "TLS_CRYPT";
598
+ case 3 /* TLS_CRYPT_V2 */:
599
+ return "TLS_CRYPT_V2";
600
+ case -1 /* UNRECOGNIZED */:
601
+ default:
602
+ return "UNRECOGNIZED";
603
+ }
604
+ }
605
+ function createBaseGproxyConfigRequest() {
606
+ return {
607
+ application: void 0,
608
+ type: 0,
609
+ nameserver: "",
610
+ login: "",
611
+ password: "",
612
+ host: "",
613
+ port: 0,
614
+ bypassLocalSubnet: false,
615
+ dropUdp: false,
616
+ udpProxy: false,
617
+ dnsProxy: false
618
+ };
619
+ }
620
+ var GproxyConfigRequest = {
621
+ encode(message, writer = new import_wire3.BinaryWriter()) {
622
+ if (message.application !== void 0) {
623
+ ApplicationInfo.encode(message.application, writer.uint32(10).fork()).join();
624
+ }
625
+ if (message.type !== 0) {
626
+ writer.uint32(16).int32(message.type);
627
+ }
628
+ if (message.nameserver !== "") {
629
+ writer.uint32(26).string(message.nameserver);
630
+ }
631
+ if (message.login !== "") {
632
+ writer.uint32(34).string(message.login);
633
+ }
634
+ if (message.password !== "") {
635
+ writer.uint32(42).string(message.password);
636
+ }
637
+ if (message.host !== "") {
638
+ writer.uint32(50).string(message.host);
639
+ }
640
+ if (message.port !== 0) {
641
+ writer.uint32(56).uint32(message.port);
642
+ }
643
+ if (message.bypassLocalSubnet !== false) {
644
+ writer.uint32(64).bool(message.bypassLocalSubnet);
645
+ }
646
+ if (message.dropUdp !== false) {
647
+ writer.uint32(72).bool(message.dropUdp);
648
+ }
649
+ if (message.udpProxy !== false) {
650
+ writer.uint32(80).bool(message.udpProxy);
651
+ }
652
+ if (message.dnsProxy !== false) {
653
+ writer.uint32(88).bool(message.dnsProxy);
654
+ }
655
+ return writer;
656
+ },
657
+ decode(input, length) {
658
+ const reader = input instanceof import_wire3.BinaryReader ? input : new import_wire3.BinaryReader(input);
659
+ let end = length === void 0 ? reader.len : reader.pos + length;
660
+ const message = createBaseGproxyConfigRequest();
661
+ while (reader.pos < end) {
662
+ const tag = reader.uint32();
663
+ switch (tag >>> 3) {
664
+ case 1: {
665
+ if (tag !== 10) {
666
+ break;
667
+ }
668
+ message.application = ApplicationInfo.decode(reader, reader.uint32());
669
+ continue;
670
+ }
671
+ case 2: {
672
+ if (tag !== 16) {
673
+ break;
674
+ }
675
+ message.type = reader.int32();
676
+ continue;
677
+ }
678
+ case 3: {
679
+ if (tag !== 26) {
680
+ break;
681
+ }
682
+ message.nameserver = reader.string();
683
+ continue;
684
+ }
685
+ case 4: {
686
+ if (tag !== 34) {
687
+ break;
688
+ }
689
+ message.login = reader.string();
690
+ continue;
691
+ }
692
+ case 5: {
693
+ if (tag !== 42) {
694
+ break;
695
+ }
696
+ message.password = reader.string();
697
+ continue;
698
+ }
699
+ case 6: {
700
+ if (tag !== 50) {
701
+ break;
702
+ }
703
+ message.host = reader.string();
704
+ continue;
705
+ }
706
+ case 7: {
707
+ if (tag !== 56) {
708
+ break;
709
+ }
710
+ message.port = reader.uint32();
711
+ continue;
712
+ }
713
+ case 8: {
714
+ if (tag !== 64) {
715
+ break;
716
+ }
717
+ message.bypassLocalSubnet = reader.bool();
718
+ continue;
719
+ }
720
+ case 9: {
721
+ if (tag !== 72) {
722
+ break;
723
+ }
724
+ message.dropUdp = reader.bool();
725
+ continue;
726
+ }
727
+ case 10: {
728
+ if (tag !== 80) {
729
+ break;
730
+ }
731
+ message.udpProxy = reader.bool();
732
+ continue;
733
+ }
734
+ case 11: {
735
+ if (tag !== 88) {
736
+ break;
737
+ }
738
+ message.dnsProxy = reader.bool();
739
+ continue;
740
+ }
741
+ }
742
+ if ((tag & 7) === 4 || tag === 0) {
743
+ break;
744
+ }
745
+ reader.skip(tag & 7);
746
+ }
747
+ return message;
748
+ },
749
+ fromJSON(object) {
750
+ return {
751
+ application: isSet2(object.application) ? ApplicationInfo.fromJSON(object.application) : void 0,
752
+ type: isSet2(object.type) ? gproxyTypeFromJSON(object.type) : 0,
753
+ nameserver: isSet2(object.nameserver) ? globalThis.String(object.nameserver) : "",
754
+ login: isSet2(object.login) ? globalThis.String(object.login) : "",
755
+ password: isSet2(object.password) ? globalThis.String(object.password) : "",
756
+ host: isSet2(object.host) ? globalThis.String(object.host) : "",
757
+ port: isSet2(object.port) ? globalThis.Number(object.port) : 0,
758
+ bypassLocalSubnet: isSet2(object.bypassLocalSubnet) ? globalThis.Boolean(object.bypassLocalSubnet) : false,
759
+ dropUdp: isSet2(object.dropUdp) ? globalThis.Boolean(object.dropUdp) : false,
760
+ udpProxy: isSet2(object.udpProxy) ? globalThis.Boolean(object.udpProxy) : false,
761
+ dnsProxy: isSet2(object.dnsProxy) ? globalThis.Boolean(object.dnsProxy) : false
762
+ };
763
+ },
764
+ toJSON(message) {
765
+ const obj = {};
766
+ if (message.application !== void 0) {
767
+ obj.application = ApplicationInfo.toJSON(message.application);
768
+ }
769
+ if (message.type !== 0) {
770
+ obj.type = gproxyTypeToJSON(message.type);
771
+ }
772
+ if (message.nameserver !== "") {
773
+ obj.nameserver = message.nameserver;
774
+ }
775
+ if (message.login !== "") {
776
+ obj.login = message.login;
777
+ }
778
+ if (message.password !== "") {
779
+ obj.password = message.password;
780
+ }
781
+ if (message.host !== "") {
782
+ obj.host = message.host;
783
+ }
784
+ if (message.port !== 0) {
785
+ obj.port = Math.round(message.port);
786
+ }
787
+ if (message.bypassLocalSubnet !== false) {
788
+ obj.bypassLocalSubnet = message.bypassLocalSubnet;
789
+ }
790
+ if (message.dropUdp !== false) {
791
+ obj.dropUdp = message.dropUdp;
792
+ }
793
+ if (message.udpProxy !== false) {
794
+ obj.udpProxy = message.udpProxy;
795
+ }
796
+ if (message.dnsProxy !== false) {
797
+ obj.dnsProxy = message.dnsProxy;
798
+ }
799
+ return obj;
800
+ },
801
+ create(base) {
802
+ return GproxyConfigRequest.fromPartial(base ?? {});
803
+ },
804
+ fromPartial(object) {
805
+ const message = createBaseGproxyConfigRequest();
806
+ message.application = object.application !== void 0 && object.application !== null ? ApplicationInfo.fromPartial(object.application) : void 0;
807
+ message.type = object.type ?? 0;
808
+ message.nameserver = object.nameserver ?? "";
809
+ message.login = object.login ?? "";
810
+ message.password = object.password ?? "";
811
+ message.host = object.host ?? "";
812
+ message.port = object.port ?? 0;
813
+ message.bypassLocalSubnet = object.bypassLocalSubnet ?? false;
814
+ message.dropUdp = object.dropUdp ?? false;
815
+ message.udpProxy = object.udpProxy ?? false;
816
+ message.dnsProxy = object.dnsProxy ?? false;
817
+ return message;
818
+ }
819
+ };
820
+ function createBaseOpenVPNConfigRequest() {
821
+ return {
822
+ allTraffic: false,
823
+ proto: 0,
824
+ host: "",
825
+ port: 0,
826
+ cipher: 0,
827
+ ca: "",
828
+ cert: "",
829
+ key: "",
830
+ tlsEncryption: 0,
831
+ tlsKeyDirection: 0,
832
+ tlsKey: "",
833
+ auth: 0,
834
+ login: "",
835
+ password: ""
836
+ };
837
+ }
838
+ var OpenVPNConfigRequest = {
839
+ encode(message, writer = new import_wire3.BinaryWriter()) {
840
+ if (message.allTraffic !== false) {
841
+ writer.uint32(8).bool(message.allTraffic);
842
+ }
843
+ if (message.proto !== 0) {
844
+ writer.uint32(16).int32(message.proto);
845
+ }
846
+ if (message.host !== "") {
847
+ writer.uint32(26).string(message.host);
848
+ }
849
+ if (message.port !== 0) {
850
+ writer.uint32(32).uint32(message.port);
851
+ }
852
+ if (message.cipher !== 0) {
853
+ writer.uint32(40).int32(message.cipher);
854
+ }
855
+ if (message.ca !== "") {
856
+ writer.uint32(50).string(message.ca);
857
+ }
858
+ if (message.cert !== "") {
859
+ writer.uint32(58).string(message.cert);
860
+ }
861
+ if (message.key !== "") {
862
+ writer.uint32(66).string(message.key);
863
+ }
864
+ if (message.tlsEncryption !== 0) {
865
+ writer.uint32(72).int32(message.tlsEncryption);
866
+ }
867
+ if (message.tlsKeyDirection !== 0) {
868
+ writer.uint32(80).int32(message.tlsKeyDirection);
869
+ }
870
+ if (message.tlsKey !== "") {
871
+ writer.uint32(90).string(message.tlsKey);
872
+ }
873
+ if (message.auth !== 0) {
874
+ writer.uint32(96).int32(message.auth);
875
+ }
876
+ if (message.login !== "") {
877
+ writer.uint32(106).string(message.login);
878
+ }
879
+ if (message.password !== "") {
880
+ writer.uint32(114).string(message.password);
881
+ }
882
+ return writer;
883
+ },
884
+ decode(input, length) {
885
+ const reader = input instanceof import_wire3.BinaryReader ? input : new import_wire3.BinaryReader(input);
886
+ let end = length === void 0 ? reader.len : reader.pos + length;
887
+ const message = createBaseOpenVPNConfigRequest();
888
+ while (reader.pos < end) {
889
+ const tag = reader.uint32();
890
+ switch (tag >>> 3) {
891
+ case 1: {
892
+ if (tag !== 8) {
893
+ break;
894
+ }
895
+ message.allTraffic = reader.bool();
896
+ continue;
897
+ }
898
+ case 2: {
899
+ if (tag !== 16) {
900
+ break;
901
+ }
902
+ message.proto = reader.int32();
903
+ continue;
904
+ }
905
+ case 3: {
906
+ if (tag !== 26) {
907
+ break;
908
+ }
909
+ message.host = reader.string();
910
+ continue;
911
+ }
912
+ case 4: {
913
+ if (tag !== 32) {
914
+ break;
915
+ }
916
+ message.port = reader.uint32();
917
+ continue;
918
+ }
919
+ case 5: {
920
+ if (tag !== 40) {
921
+ break;
922
+ }
923
+ message.cipher = reader.int32();
924
+ continue;
925
+ }
926
+ case 6: {
927
+ if (tag !== 50) {
928
+ break;
929
+ }
930
+ message.ca = reader.string();
931
+ continue;
932
+ }
933
+ case 7: {
934
+ if (tag !== 58) {
935
+ break;
936
+ }
937
+ message.cert = reader.string();
938
+ continue;
939
+ }
940
+ case 8: {
941
+ if (tag !== 66) {
942
+ break;
943
+ }
944
+ message.key = reader.string();
945
+ continue;
946
+ }
947
+ case 9: {
948
+ if (tag !== 72) {
949
+ break;
950
+ }
951
+ message.tlsEncryption = reader.int32();
952
+ continue;
953
+ }
954
+ case 10: {
955
+ if (tag !== 80) {
956
+ break;
957
+ }
958
+ message.tlsKeyDirection = reader.int32();
959
+ continue;
960
+ }
961
+ case 11: {
962
+ if (tag !== 90) {
963
+ break;
964
+ }
965
+ message.tlsKey = reader.string();
966
+ continue;
967
+ }
968
+ case 12: {
969
+ if (tag !== 96) {
970
+ break;
971
+ }
972
+ message.auth = reader.int32();
973
+ continue;
974
+ }
975
+ case 13: {
976
+ if (tag !== 106) {
977
+ break;
978
+ }
979
+ message.login = reader.string();
980
+ continue;
981
+ }
982
+ case 14: {
983
+ if (tag !== 114) {
984
+ break;
985
+ }
986
+ message.password = reader.string();
987
+ continue;
988
+ }
989
+ }
990
+ if ((tag & 7) === 4 || tag === 0) {
991
+ break;
992
+ }
993
+ reader.skip(tag & 7);
994
+ }
995
+ return message;
996
+ },
997
+ fromJSON(object) {
998
+ return {
999
+ allTraffic: isSet2(object.allTraffic) ? globalThis.Boolean(object.allTraffic) : false,
1000
+ proto: isSet2(object.proto) ? openVPNProtoFromJSON(object.proto) : 0,
1001
+ host: isSet2(object.host) ? globalThis.String(object.host) : "",
1002
+ port: isSet2(object.port) ? globalThis.Number(object.port) : 0,
1003
+ cipher: isSet2(object.cipher) ? openVPNCipherFromJSON(object.cipher) : 0,
1004
+ ca: isSet2(object.ca) ? globalThis.String(object.ca) : "",
1005
+ cert: isSet2(object.cert) ? globalThis.String(object.cert) : "",
1006
+ key: isSet2(object.key) ? globalThis.String(object.key) : "",
1007
+ tlsEncryption: isSet2(object.tlsEncryption) ? openVPNEncryptionFromJSON(object.tlsEncryption) : 0,
1008
+ tlsKeyDirection: isSet2(object.tlsKeyDirection) ? openVPNKeyDirectionFromJSON(object.tlsKeyDirection) : 0,
1009
+ tlsKey: isSet2(object.tlsKey) ? globalThis.String(object.tlsKey) : "",
1010
+ auth: isSet2(object.auth) ? openVPNAuthFromJSON(object.auth) : 0,
1011
+ login: isSet2(object.login) ? globalThis.String(object.login) : "",
1012
+ password: isSet2(object.password) ? globalThis.String(object.password) : ""
1013
+ };
1014
+ },
1015
+ toJSON(message) {
1016
+ const obj = {};
1017
+ if (message.allTraffic !== false) {
1018
+ obj.allTraffic = message.allTraffic;
1019
+ }
1020
+ if (message.proto !== 0) {
1021
+ obj.proto = openVPNProtoToJSON(message.proto);
1022
+ }
1023
+ if (message.host !== "") {
1024
+ obj.host = message.host;
1025
+ }
1026
+ if (message.port !== 0) {
1027
+ obj.port = Math.round(message.port);
1028
+ }
1029
+ if (message.cipher !== 0) {
1030
+ obj.cipher = openVPNCipherToJSON(message.cipher);
1031
+ }
1032
+ if (message.ca !== "") {
1033
+ obj.ca = message.ca;
1034
+ }
1035
+ if (message.cert !== "") {
1036
+ obj.cert = message.cert;
1037
+ }
1038
+ if (message.key !== "") {
1039
+ obj.key = message.key;
1040
+ }
1041
+ if (message.tlsEncryption !== 0) {
1042
+ obj.tlsEncryption = openVPNEncryptionToJSON(message.tlsEncryption);
1043
+ }
1044
+ if (message.tlsKeyDirection !== 0) {
1045
+ obj.tlsKeyDirection = openVPNKeyDirectionToJSON(message.tlsKeyDirection);
1046
+ }
1047
+ if (message.tlsKey !== "") {
1048
+ obj.tlsKey = message.tlsKey;
1049
+ }
1050
+ if (message.auth !== 0) {
1051
+ obj.auth = openVPNAuthToJSON(message.auth);
1052
+ }
1053
+ if (message.login !== "") {
1054
+ obj.login = message.login;
1055
+ }
1056
+ if (message.password !== "") {
1057
+ obj.password = message.password;
1058
+ }
1059
+ return obj;
1060
+ },
1061
+ create(base) {
1062
+ return OpenVPNConfigRequest.fromPartial(base ?? {});
1063
+ },
1064
+ fromPartial(object) {
1065
+ const message = createBaseOpenVPNConfigRequest();
1066
+ message.allTraffic = object.allTraffic ?? false;
1067
+ message.proto = object.proto ?? 0;
1068
+ message.host = object.host ?? "";
1069
+ message.port = object.port ?? 0;
1070
+ message.cipher = object.cipher ?? 0;
1071
+ message.ca = object.ca ?? "";
1072
+ message.cert = object.cert ?? "";
1073
+ message.key = object.key ?? "";
1074
+ message.tlsEncryption = object.tlsEncryption ?? 0;
1075
+ message.tlsKeyDirection = object.tlsKeyDirection ?? 0;
1076
+ message.tlsKey = object.tlsKey ?? "";
1077
+ message.auth = object.auth ?? 0;
1078
+ message.login = object.login ?? "";
1079
+ message.password = object.password ?? "";
1080
+ return message;
1081
+ }
1082
+ };
1083
+ function isSet2(value) {
1084
+ return value !== null && value !== void 0;
1085
+ }
1086
+ // Annotate the CommonJS export names for ESM import in node:
1087
+ 0 && (module.exports = {
1088
+ GproxyConfigRequest,
1089
+ GproxyType,
1090
+ OpenVPNAuth,
1091
+ OpenVPNCipher,
1092
+ OpenVPNConfigRequest,
1093
+ OpenVPNEncryption,
1094
+ OpenVPNKeyDirection,
1095
+ OpenVPNProto,
1096
+ gproxyTypeFromJSON,
1097
+ gproxyTypeToJSON,
1098
+ openVPNAuthFromJSON,
1099
+ openVPNAuthToJSON,
1100
+ openVPNCipherFromJSON,
1101
+ openVPNCipherToJSON,
1102
+ openVPNEncryptionFromJSON,
1103
+ openVPNEncryptionToJSON,
1104
+ openVPNKeyDirectionFromJSON,
1105
+ openVPNKeyDirectionToJSON,
1106
+ openVPNProtoFromJSON,
1107
+ openVPNProtoToJSON,
1108
+ protobufPackage
1109
+ });