@ekhein/lamda-node-sdk 2.2.3 → 10.8.1

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.
@@ -1,10 +1,31 @@
1
1
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
2
  import { ApplicationInfo } from "./application";
3
3
  export declare const protobufPackage = "lamda.rpc";
4
+ export declare enum ShadowCipher {
5
+ SS_AES_128_CFB = 0,
6
+ SS_AES_192_CFB = 1,
7
+ SS_AES_256_CFB = 2,
8
+ SS_AES_128_CTR = 3,
9
+ SS_AES_192_CTR = 4,
10
+ SS_AES_256_CTR = 5,
11
+ SS_CAMELLIA_128_CFB = 6,
12
+ SS_CAMELLIA_192_CFB = 7,
13
+ SS_CAMELLIA_256_CFB = 8,
14
+ SS_DES_CFB = 9,
15
+ SS_AES_128_GCM = 20,
16
+ SS_AES_192_GCM = 21,
17
+ SS_AES_256_GCM = 22,
18
+ SS_CHACHA20_IETF_POLY1305 = 23,
19
+ UNRECOGNIZED = -1
20
+ }
21
+ export declare function shadowCipherFromJSON(object: any): ShadowCipher;
22
+ export declare function shadowCipherToJSON(object: ShadowCipher): string;
4
23
  export declare enum GproxyType {
5
24
  SOCKS5 = 0,
6
25
  HTTP_CONNECT = 1,
7
26
  HTTP_RELAY = 2,
27
+ HTTPS_CONNECT = 3,
28
+ SHADOWSOCKS = 4,
8
29
  UNRECOGNIZED = -1
9
30
  }
10
31
  export declare function gproxyTypeFromJSON(object: any): GproxyType;
@@ -72,6 +93,7 @@ export interface GproxyConfigRequest {
72
93
  dropUdp: boolean;
73
94
  udpProxy: boolean;
74
95
  dnsProxy: boolean;
96
+ interface: string;
75
97
  }
76
98
  export interface OpenVPNConfigRequest {
77
99
  allTraffic: boolean;
package/dist/rpc/proxy.js CHANGED
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.OpenVPNConfigRequest = exports.GproxyConfigRequest = exports.OpenVPNEncryption = exports.OpenVPNKeyDirection = exports.OpenVPNCipher = exports.OpenVPNAuth = exports.OpenVPNProto = exports.GproxyType = exports.protobufPackage = void 0;
3
+ exports.OpenVPNConfigRequest = exports.GproxyConfigRequest = exports.OpenVPNEncryption = exports.OpenVPNKeyDirection = exports.OpenVPNCipher = exports.OpenVPNAuth = exports.OpenVPNProto = exports.GproxyType = exports.ShadowCipher = exports.protobufPackage = void 0;
4
+ exports.shadowCipherFromJSON = shadowCipherFromJSON;
5
+ exports.shadowCipherToJSON = shadowCipherToJSON;
4
6
  exports.gproxyTypeFromJSON = gproxyTypeFromJSON;
5
7
  exports.gproxyTypeToJSON = gproxyTypeToJSON;
6
8
  exports.openVPNProtoFromJSON = openVPNProtoFromJSON;
@@ -16,11 +18,116 @@ exports.openVPNEncryptionToJSON = openVPNEncryptionToJSON;
16
18
  const wire_1 = require("@bufbuild/protobuf/wire");
17
19
  const application_1 = require("./application");
18
20
  exports.protobufPackage = "lamda.rpc";
21
+ var ShadowCipher;
22
+ (function (ShadowCipher) {
23
+ ShadowCipher[ShadowCipher["SS_AES_128_CFB"] = 0] = "SS_AES_128_CFB";
24
+ ShadowCipher[ShadowCipher["SS_AES_192_CFB"] = 1] = "SS_AES_192_CFB";
25
+ ShadowCipher[ShadowCipher["SS_AES_256_CFB"] = 2] = "SS_AES_256_CFB";
26
+ ShadowCipher[ShadowCipher["SS_AES_128_CTR"] = 3] = "SS_AES_128_CTR";
27
+ ShadowCipher[ShadowCipher["SS_AES_192_CTR"] = 4] = "SS_AES_192_CTR";
28
+ ShadowCipher[ShadowCipher["SS_AES_256_CTR"] = 5] = "SS_AES_256_CTR";
29
+ ShadowCipher[ShadowCipher["SS_CAMELLIA_128_CFB"] = 6] = "SS_CAMELLIA_128_CFB";
30
+ ShadowCipher[ShadowCipher["SS_CAMELLIA_192_CFB"] = 7] = "SS_CAMELLIA_192_CFB";
31
+ ShadowCipher[ShadowCipher["SS_CAMELLIA_256_CFB"] = 8] = "SS_CAMELLIA_256_CFB";
32
+ ShadowCipher[ShadowCipher["SS_DES_CFB"] = 9] = "SS_DES_CFB";
33
+ ShadowCipher[ShadowCipher["SS_AES_128_GCM"] = 20] = "SS_AES_128_GCM";
34
+ ShadowCipher[ShadowCipher["SS_AES_192_GCM"] = 21] = "SS_AES_192_GCM";
35
+ ShadowCipher[ShadowCipher["SS_AES_256_GCM"] = 22] = "SS_AES_256_GCM";
36
+ ShadowCipher[ShadowCipher["SS_CHACHA20_IETF_POLY1305"] = 23] = "SS_CHACHA20_IETF_POLY1305";
37
+ ShadowCipher[ShadowCipher["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
38
+ })(ShadowCipher || (exports.ShadowCipher = ShadowCipher = {}));
39
+ function shadowCipherFromJSON(object) {
40
+ switch (object) {
41
+ case 0:
42
+ case "SS_AES_128_CFB":
43
+ return ShadowCipher.SS_AES_128_CFB;
44
+ case 1:
45
+ case "SS_AES_192_CFB":
46
+ return ShadowCipher.SS_AES_192_CFB;
47
+ case 2:
48
+ case "SS_AES_256_CFB":
49
+ return ShadowCipher.SS_AES_256_CFB;
50
+ case 3:
51
+ case "SS_AES_128_CTR":
52
+ return ShadowCipher.SS_AES_128_CTR;
53
+ case 4:
54
+ case "SS_AES_192_CTR":
55
+ return ShadowCipher.SS_AES_192_CTR;
56
+ case 5:
57
+ case "SS_AES_256_CTR":
58
+ return ShadowCipher.SS_AES_256_CTR;
59
+ case 6:
60
+ case "SS_CAMELLIA_128_CFB":
61
+ return ShadowCipher.SS_CAMELLIA_128_CFB;
62
+ case 7:
63
+ case "SS_CAMELLIA_192_CFB":
64
+ return ShadowCipher.SS_CAMELLIA_192_CFB;
65
+ case 8:
66
+ case "SS_CAMELLIA_256_CFB":
67
+ return ShadowCipher.SS_CAMELLIA_256_CFB;
68
+ case 9:
69
+ case "SS_DES_CFB":
70
+ return ShadowCipher.SS_DES_CFB;
71
+ case 20:
72
+ case "SS_AES_128_GCM":
73
+ return ShadowCipher.SS_AES_128_GCM;
74
+ case 21:
75
+ case "SS_AES_192_GCM":
76
+ return ShadowCipher.SS_AES_192_GCM;
77
+ case 22:
78
+ case "SS_AES_256_GCM":
79
+ return ShadowCipher.SS_AES_256_GCM;
80
+ case 23:
81
+ case "SS_CHACHA20_IETF_POLY1305":
82
+ return ShadowCipher.SS_CHACHA20_IETF_POLY1305;
83
+ case -1:
84
+ case "UNRECOGNIZED":
85
+ default:
86
+ return ShadowCipher.UNRECOGNIZED;
87
+ }
88
+ }
89
+ function shadowCipherToJSON(object) {
90
+ switch (object) {
91
+ case ShadowCipher.SS_AES_128_CFB:
92
+ return "SS_AES_128_CFB";
93
+ case ShadowCipher.SS_AES_192_CFB:
94
+ return "SS_AES_192_CFB";
95
+ case ShadowCipher.SS_AES_256_CFB:
96
+ return "SS_AES_256_CFB";
97
+ case ShadowCipher.SS_AES_128_CTR:
98
+ return "SS_AES_128_CTR";
99
+ case ShadowCipher.SS_AES_192_CTR:
100
+ return "SS_AES_192_CTR";
101
+ case ShadowCipher.SS_AES_256_CTR:
102
+ return "SS_AES_256_CTR";
103
+ case ShadowCipher.SS_CAMELLIA_128_CFB:
104
+ return "SS_CAMELLIA_128_CFB";
105
+ case ShadowCipher.SS_CAMELLIA_192_CFB:
106
+ return "SS_CAMELLIA_192_CFB";
107
+ case ShadowCipher.SS_CAMELLIA_256_CFB:
108
+ return "SS_CAMELLIA_256_CFB";
109
+ case ShadowCipher.SS_DES_CFB:
110
+ return "SS_DES_CFB";
111
+ case ShadowCipher.SS_AES_128_GCM:
112
+ return "SS_AES_128_GCM";
113
+ case ShadowCipher.SS_AES_192_GCM:
114
+ return "SS_AES_192_GCM";
115
+ case ShadowCipher.SS_AES_256_GCM:
116
+ return "SS_AES_256_GCM";
117
+ case ShadowCipher.SS_CHACHA20_IETF_POLY1305:
118
+ return "SS_CHACHA20_IETF_POLY1305";
119
+ case ShadowCipher.UNRECOGNIZED:
120
+ default:
121
+ return "UNRECOGNIZED";
122
+ }
123
+ }
19
124
  var GproxyType;
20
125
  (function (GproxyType) {
21
126
  GproxyType[GproxyType["SOCKS5"] = 0] = "SOCKS5";
22
127
  GproxyType[GproxyType["HTTP_CONNECT"] = 1] = "HTTP_CONNECT";
23
128
  GproxyType[GproxyType["HTTP_RELAY"] = 2] = "HTTP_RELAY";
129
+ GproxyType[GproxyType["HTTPS_CONNECT"] = 3] = "HTTPS_CONNECT";
130
+ GproxyType[GproxyType["SHADOWSOCKS"] = 4] = "SHADOWSOCKS";
24
131
  GproxyType[GproxyType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
25
132
  })(GproxyType || (exports.GproxyType = GproxyType = {}));
26
133
  function gproxyTypeFromJSON(object) {
@@ -34,6 +141,12 @@ function gproxyTypeFromJSON(object) {
34
141
  case 2:
35
142
  case "HTTP_RELAY":
36
143
  return GproxyType.HTTP_RELAY;
144
+ case 3:
145
+ case "HTTPS_CONNECT":
146
+ return GproxyType.HTTPS_CONNECT;
147
+ case 4:
148
+ case "SHADOWSOCKS":
149
+ return GproxyType.SHADOWSOCKS;
37
150
  case -1:
38
151
  case "UNRECOGNIZED":
39
152
  default:
@@ -48,6 +161,10 @@ function gproxyTypeToJSON(object) {
48
161
  return "HTTP_CONNECT";
49
162
  case GproxyType.HTTP_RELAY:
50
163
  return "HTTP_RELAY";
164
+ case GproxyType.HTTPS_CONNECT:
165
+ return "HTTPS_CONNECT";
166
+ case GproxyType.SHADOWSOCKS:
167
+ return "SHADOWSOCKS";
51
168
  case GproxyType.UNRECOGNIZED:
52
169
  default:
53
170
  return "UNRECOGNIZED";
@@ -317,6 +434,7 @@ function createBaseGproxyConfigRequest() {
317
434
  dropUdp: false,
318
435
  udpProxy: false,
319
436
  dnsProxy: false,
437
+ interface: "",
320
438
  };
321
439
  }
322
440
  exports.GproxyConfigRequest = {
@@ -354,6 +472,9 @@ exports.GproxyConfigRequest = {
354
472
  if (message.dnsProxy !== false) {
355
473
  writer.uint32(88).bool(message.dnsProxy);
356
474
  }
475
+ if (message.interface !== "") {
476
+ writer.uint32(98).string(message.interface);
477
+ }
357
478
  return writer;
358
479
  },
359
480
  decode(input, length) {
@@ -440,6 +561,13 @@ exports.GproxyConfigRequest = {
440
561
  message.dnsProxy = reader.bool();
441
562
  continue;
442
563
  }
564
+ case 12: {
565
+ if (tag !== 98) {
566
+ break;
567
+ }
568
+ message.interface = reader.string();
569
+ continue;
570
+ }
443
571
  }
444
572
  if ((tag & 7) === 4 || tag === 0) {
445
573
  break;
@@ -461,6 +589,7 @@ exports.GproxyConfigRequest = {
461
589
  dropUdp: isSet(object.dropUdp) ? globalThis.Boolean(object.dropUdp) : false,
462
590
  udpProxy: isSet(object.udpProxy) ? globalThis.Boolean(object.udpProxy) : false,
463
591
  dnsProxy: isSet(object.dnsProxy) ? globalThis.Boolean(object.dnsProxy) : false,
592
+ interface: isSet(object.interface) ? globalThis.String(object.interface) : "",
464
593
  };
465
594
  },
466
595
  toJSON(message) {
@@ -498,6 +627,9 @@ exports.GproxyConfigRequest = {
498
627
  if (message.dnsProxy !== false) {
499
628
  obj.dnsProxy = message.dnsProxy;
500
629
  }
630
+ if (message.interface !== "") {
631
+ obj.interface = message.interface;
632
+ }
501
633
  return obj;
502
634
  },
503
635
  create(base) {
@@ -518,6 +650,7 @@ exports.GproxyConfigRequest = {
518
650
  message.dropUdp = object.dropUdp ?? false;
519
651
  message.udpProxy = object.udpProxy ?? false;
520
652
  message.dnsProxy = object.dnsProxy ?? false;
653
+ message.interface = object.interface ?? "";
521
654
  return message;
522
655
  },
523
656
  };