@remnawave/node-contract 2.7.0 → 2.9.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.
Files changed (100) hide show
  1. package/build/api/controllers/index.d.ts +0 -1
  2. package/build/api/controllers/index.d.ts.map +1 -1
  3. package/build/api/controllers/index.js +0 -1
  4. package/build/api/routes.d.ts +0 -4
  5. package/build/api/routes.d.ts.map +1 -1
  6. package/build/api/routes.js +0 -4
  7. package/build/commands/handler/add-user.command.d.ts +17 -160
  8. package/build/commands/handler/add-user.command.d.ts.map +1 -1
  9. package/build/commands/handler/add-user.command.js +3 -3
  10. package/build/commands/handler/add-users.command.d.ts +18 -181
  11. package/build/commands/handler/add-users.command.d.ts.map +1 -1
  12. package/build/commands/handler/add-users.command.js +2 -2
  13. package/build/commands/handler/drop-ips.command.d.ts +4 -20
  14. package/build/commands/handler/drop-ips.command.d.ts.map +1 -1
  15. package/build/commands/handler/drop-users-connections.command.d.ts +4 -20
  16. package/build/commands/handler/drop-users-connections.command.d.ts.map +1 -1
  17. package/build/commands/handler/get-inbound-users-count.command.d.ts +3 -19
  18. package/build/commands/handler/get-inbound-users-count.command.d.ts.map +1 -1
  19. package/build/commands/handler/get-inbound-users.command.d.ts +4 -44
  20. package/build/commands/handler/get-inbound-users.command.d.ts.map +1 -1
  21. package/build/commands/handler/remove-user.command.d.ts +5 -35
  22. package/build/commands/handler/remove-user.command.d.ts.map +1 -1
  23. package/build/commands/handler/remove-user.command.js +1 -1
  24. package/build/commands/handler/remove-users.command.d.ts +5 -37
  25. package/build/commands/handler/remove-users.command.d.ts.map +1 -1
  26. package/build/commands/handler/remove-users.command.js +1 -1
  27. package/build/commands/index.d.ts +0 -1
  28. package/build/commands/index.d.ts.map +1 -1
  29. package/build/commands/index.js +0 -1
  30. package/build/commands/plugin/nftables/block-ips.schema.d.ts +5 -33
  31. package/build/commands/plugin/nftables/block-ips.schema.d.ts.map +1 -1
  32. package/build/commands/plugin/nftables/block-ips.schema.js +1 -1
  33. package/build/commands/plugin/nftables/recreate-tables.schema.d.ts +2 -14
  34. package/build/commands/plugin/nftables/recreate-tables.schema.d.ts.map +1 -1
  35. package/build/commands/plugin/nftables/unblock-ips.schema.d.ts +4 -20
  36. package/build/commands/plugin/nftables/unblock-ips.schema.d.ts.map +1 -1
  37. package/build/commands/plugin/nftables/unblock-ips.schema.js +1 -1
  38. package/build/commands/plugin/sync.command.d.ts +5 -37
  39. package/build/commands/plugin/sync.command.d.ts.map +1 -1
  40. package/build/commands/plugin/sync.command.js +2 -2
  41. package/build/commands/plugin/torrent-blocker/collect-reports.schema.d.ts +7 -205
  42. package/build/commands/plugin/torrent-blocker/collect-reports.schema.d.ts.map +1 -1
  43. package/build/commands/stats/get-all-inbounds-stats.command.d.ts +4 -44
  44. package/build/commands/stats/get-all-inbounds-stats.command.d.ts.map +1 -1
  45. package/build/commands/stats/get-all-outbounds-stats.command.d.ts +4 -44
  46. package/build/commands/stats/get-all-outbounds-stats.command.d.ts.map +1 -1
  47. package/build/commands/stats/get-combined-stats.command.d.ts +5 -73
  48. package/build/commands/stats/get-combined-stats.command.d.ts.map +1 -1
  49. package/build/commands/stats/get-inbound-stats.command.d.ts +3 -29
  50. package/build/commands/stats/get-inbound-stats.command.d.ts.map +1 -1
  51. package/build/commands/stats/get-outbound-stats.command.d.ts +3 -29
  52. package/build/commands/stats/get-outbound-stats.command.d.ts.map +1 -1
  53. package/build/commands/stats/get-system-stats.command.d.ts +9 -243
  54. package/build/commands/stats/get-system-stats.command.d.ts.map +1 -1
  55. package/build/commands/stats/get-user-ip-list.command.d.ts +5 -39
  56. package/build/commands/stats/get-user-ip-list.command.d.ts.map +1 -1
  57. package/build/commands/stats/get-user-ip-list.command.js +2 -3
  58. package/build/commands/stats/get-user-online-status.command.d.ts +3 -19
  59. package/build/commands/stats/get-user-online-status.command.d.ts.map +1 -1
  60. package/build/commands/stats/get-users-ip-list.command.d.ts +5 -59
  61. package/build/commands/stats/get-users-ip-list.command.d.ts.map +1 -1
  62. package/build/commands/stats/get-users-ip-list.command.js +1 -2
  63. package/build/commands/stats/get-users-stats.command.d.ts +4 -44
  64. package/build/commands/stats/get-users-stats.command.d.ts.map +1 -1
  65. package/build/commands/xray/get-node-health-check.command.d.ts +2 -26
  66. package/build/commands/xray/get-node-health-check.command.d.ts.map +1 -1
  67. package/build/commands/xray/start.command.d.ts +21 -336
  68. package/build/commands/xray/start.command.d.ts.map +1 -1
  69. package/build/commands/xray/start.command.js +3 -2
  70. package/build/commands/xray/stop.command.d.ts +2 -14
  71. package/build/commands/xray/stop.command.d.ts.map +1 -1
  72. package/build/constants/xray/stats.d.ts +4 -27
  73. package/build/constants/xray/stats.d.ts.map +1 -1
  74. package/build/constants/xray/stats.js +3 -35
  75. package/build/models/index.d.ts +1 -0
  76. package/build/models/index.d.ts.map +1 -1
  77. package/build/models/index.js +1 -0
  78. package/build/models/node-metadata.schema.d.ts +10 -0
  79. package/build/models/node-metadata.schema.d.ts.map +1 -0
  80. package/build/models/node-metadata.schema.js +11 -0
  81. package/build/models/node-system.schema.d.ts +14 -194
  82. package/build/models/node-system.schema.d.ts.map +1 -1
  83. package/build/models/node-system.schema.js +1 -1
  84. package/build/models/torrent-blocker.report.schema.d.ts +5 -95
  85. package/build/models/torrent-blocker.report.schema.d.ts.map +1 -1
  86. package/build/models/xray-webhook.schema.d.ts +1 -29
  87. package/build/models/xray-webhook.schema.d.ts.map +1 -1
  88. package/package.json +17 -17
  89. package/build/api/controllers/vision.d.ts +0 -6
  90. package/build/api/controllers/vision.d.ts.map +0 -1
  91. package/build/api/controllers/vision.js +0 -8
  92. package/build/commands/vision/block-ip.command.d.ts +0 -39
  93. package/build/commands/vision/block-ip.command.d.ts.map +0 -1
  94. package/build/commands/vision/block-ip.command.js +0 -19
  95. package/build/commands/vision/index.d.ts +0 -3
  96. package/build/commands/vision/index.d.ts.map +0 -1
  97. package/build/commands/vision/index.js +0 -18
  98. package/build/commands/vision/unblock-ip.command.d.ts +0 -39
  99. package/build/commands/vision/unblock-ip.command.d.ts.map +0 -1
  100. package/build/commands/vision/unblock-ip.command.js +0 -19
@@ -3,6 +3,13 @@ export declare namespace StartXrayCommand {
3
3
  const url: "/node/xray/start";
4
4
  const RequestSchema: z.ZodObject<{
5
5
  internals: z.ZodObject<{
6
+ metadata: z.ZodOptional<z.ZodObject<{
7
+ name: z.ZodString;
8
+ uuid: z.ZodString;
9
+ id: z.ZodNumber;
10
+ tags: z.ZodArray<z.ZodString>;
11
+ countryCode: z.ZodString;
12
+ }, z.core.$strip>>;
6
13
  forceRestart: z.ZodDefault<z.ZodBoolean>;
7
14
  hashes: z.ZodObject<{
8
15
  emptyConfig: z.ZodString;
@@ -10,79 +17,11 @@ export declare namespace StartXrayCommand {
10
17
  usersCount: z.ZodNumber;
11
18
  hash: z.ZodString;
12
19
  tag: z.ZodString;
13
- }, "strip", z.ZodTypeAny, {
14
- tag: string;
15
- usersCount: number;
16
- hash: string;
17
- }, {
18
- tag: string;
19
- usersCount: number;
20
- hash: string;
21
- }>, "many">;
22
- }, "strip", z.ZodTypeAny, {
23
- inbounds: {
24
- tag: string;
25
- usersCount: number;
26
- hash: string;
27
- }[];
28
- emptyConfig: string;
29
- }, {
30
- inbounds: {
31
- tag: string;
32
- usersCount: number;
33
- hash: string;
34
- }[];
35
- emptyConfig: string;
36
- }>;
37
- }, "strip", z.ZodTypeAny, {
38
- forceRestart: boolean;
39
- hashes: {
40
- inbounds: {
41
- tag: string;
42
- usersCount: number;
43
- hash: string;
44
- }[];
45
- emptyConfig: string;
46
- };
47
- }, {
48
- hashes: {
49
- inbounds: {
50
- tag: string;
51
- usersCount: number;
52
- hash: string;
53
- }[];
54
- emptyConfig: string;
55
- };
56
- forceRestart?: boolean | undefined;
57
- }>;
20
+ }, z.core.$strip>>;
21
+ }, z.core.$strip>;
22
+ }, z.core.$strip>;
58
23
  xrayConfig: z.ZodRecord<z.ZodString, z.ZodUnknown>;
59
- }, "strip", z.ZodTypeAny, {
60
- internals: {
61
- forceRestart: boolean;
62
- hashes: {
63
- inbounds: {
64
- tag: string;
65
- usersCount: number;
66
- hash: string;
67
- }[];
68
- emptyConfig: string;
69
- };
70
- };
71
- xrayConfig: Record<string, unknown>;
72
- }, {
73
- internals: {
74
- hashes: {
75
- inbounds: {
76
- tag: string;
77
- usersCount: number;
78
- hash: string;
79
- }[];
80
- emptyConfig: string;
81
- };
82
- forceRestart?: boolean | undefined;
83
- };
84
- xrayConfig: Record<string, unknown>;
85
- }>;
24
+ }, z.core.$strip>;
86
25
  type Request = z.infer<typeof RequestSchema>;
87
26
  const ResponseSchema: z.ZodObject<{
88
27
  response: z.ZodObject<{
@@ -91,15 +30,11 @@ export declare namespace StartXrayCommand {
91
30
  error: z.ZodNullable<z.ZodString>;
92
31
  nodeInformation: z.ZodObject<{
93
32
  version: z.ZodNullable<z.ZodString>;
94
- }, "strip", z.ZodTypeAny, {
95
- version: string | null;
96
- }, {
97
- version: string | null;
98
- }>;
33
+ }, z.core.$strip>;
99
34
  system: z.ZodObject<{
100
35
  info: z.ZodObject<{
101
36
  arch: z.ZodString;
102
- cpus: z.ZodNumber;
37
+ cpus: z.ZodInt;
103
38
  cpuModel: z.ZodString;
104
39
  memoryTotal: z.ZodNumber;
105
40
  hostname: z.ZodString;
@@ -107,274 +42,24 @@ export declare namespace StartXrayCommand {
107
42
  release: z.ZodString;
108
43
  type: z.ZodString;
109
44
  version: z.ZodString;
110
- networkInterfaces: z.ZodArray<z.ZodString, "many">;
111
- }, "strip", z.ZodTypeAny, {
112
- type: string;
113
- arch: string;
114
- cpus: number;
115
- cpuModel: string;
116
- memoryTotal: number;
117
- hostname: string;
118
- platform: string;
119
- release: string;
120
- version: string;
121
- networkInterfaces: string[];
122
- }, {
123
- type: string;
124
- arch: string;
125
- cpus: number;
126
- cpuModel: string;
127
- memoryTotal: number;
128
- hostname: string;
129
- platform: string;
130
- release: string;
131
- version: string;
132
- networkInterfaces: string[];
133
- }>;
45
+ networkInterfaces: z.ZodArray<z.ZodString>;
46
+ }, z.core.$strip>;
134
47
  stats: z.ZodObject<{
135
48
  memoryFree: z.ZodNumber;
136
49
  memoryUsed: z.ZodNumber;
137
50
  uptime: z.ZodNumber;
138
- loadAvg: z.ZodArray<z.ZodNumber, "many">;
51
+ loadAvg: z.ZodArray<z.ZodNumber>;
139
52
  interface: z.ZodNullable<z.ZodObject<{
140
53
  interface: z.ZodString;
141
54
  rxBytesPerSec: z.ZodNumber;
142
55
  txBytesPerSec: z.ZodNumber;
143
56
  rxTotal: z.ZodNumber;
144
57
  txTotal: z.ZodNumber;
145
- }, "strip", z.ZodTypeAny, {
146
- interface: string;
147
- rxBytesPerSec: number;
148
- txBytesPerSec: number;
149
- rxTotal: number;
150
- txTotal: number;
151
- }, {
152
- interface: string;
153
- rxBytesPerSec: number;
154
- txBytesPerSec: number;
155
- rxTotal: number;
156
- txTotal: number;
157
- }>>;
158
- }, "strip", z.ZodTypeAny, {
159
- interface: {
160
- interface: string;
161
- rxBytesPerSec: number;
162
- txBytesPerSec: number;
163
- rxTotal: number;
164
- txTotal: number;
165
- } | null;
166
- memoryFree: number;
167
- memoryUsed: number;
168
- uptime: number;
169
- loadAvg: number[];
170
- }, {
171
- interface: {
172
- interface: string;
173
- rxBytesPerSec: number;
174
- txBytesPerSec: number;
175
- rxTotal: number;
176
- txTotal: number;
177
- } | null;
178
- memoryFree: number;
179
- memoryUsed: number;
180
- uptime: number;
181
- loadAvg: number[];
182
- }>;
183
- }, "strip", z.ZodTypeAny, {
184
- stats: {
185
- interface: {
186
- interface: string;
187
- rxBytesPerSec: number;
188
- txBytesPerSec: number;
189
- rxTotal: number;
190
- txTotal: number;
191
- } | null;
192
- memoryFree: number;
193
- memoryUsed: number;
194
- uptime: number;
195
- loadAvg: number[];
196
- };
197
- info: {
198
- type: string;
199
- arch: string;
200
- cpus: number;
201
- cpuModel: string;
202
- memoryTotal: number;
203
- hostname: string;
204
- platform: string;
205
- release: string;
206
- version: string;
207
- networkInterfaces: string[];
208
- };
209
- }, {
210
- stats: {
211
- interface: {
212
- interface: string;
213
- rxBytesPerSec: number;
214
- txBytesPerSec: number;
215
- rxTotal: number;
216
- txTotal: number;
217
- } | null;
218
- memoryFree: number;
219
- memoryUsed: number;
220
- uptime: number;
221
- loadAvg: number[];
222
- };
223
- info: {
224
- type: string;
225
- arch: string;
226
- cpus: number;
227
- cpuModel: string;
228
- memoryTotal: number;
229
- hostname: string;
230
- platform: string;
231
- release: string;
232
- version: string;
233
- networkInterfaces: string[];
234
- };
235
- }>;
236
- }, "strip", z.ZodTypeAny, {
237
- error: string | null;
238
- version: string | null;
239
- system: {
240
- stats: {
241
- interface: {
242
- interface: string;
243
- rxBytesPerSec: number;
244
- txBytesPerSec: number;
245
- rxTotal: number;
246
- txTotal: number;
247
- } | null;
248
- memoryFree: number;
249
- memoryUsed: number;
250
- uptime: number;
251
- loadAvg: number[];
252
- };
253
- info: {
254
- type: string;
255
- arch: string;
256
- cpus: number;
257
- cpuModel: string;
258
- memoryTotal: number;
259
- hostname: string;
260
- platform: string;
261
- release: string;
262
- version: string;
263
- networkInterfaces: string[];
264
- };
265
- };
266
- isStarted: boolean;
267
- nodeInformation: {
268
- version: string | null;
269
- };
270
- }, {
271
- error: string | null;
272
- version: string | null;
273
- system: {
274
- stats: {
275
- interface: {
276
- interface: string;
277
- rxBytesPerSec: number;
278
- txBytesPerSec: number;
279
- rxTotal: number;
280
- txTotal: number;
281
- } | null;
282
- memoryFree: number;
283
- memoryUsed: number;
284
- uptime: number;
285
- loadAvg: number[];
286
- };
287
- info: {
288
- type: string;
289
- arch: string;
290
- cpus: number;
291
- cpuModel: string;
292
- memoryTotal: number;
293
- hostname: string;
294
- platform: string;
295
- release: string;
296
- version: string;
297
- networkInterfaces: string[];
298
- };
299
- };
300
- isStarted: boolean;
301
- nodeInformation: {
302
- version: string | null;
303
- };
304
- }>;
305
- }, "strip", z.ZodTypeAny, {
306
- response: {
307
- error: string | null;
308
- version: string | null;
309
- system: {
310
- stats: {
311
- interface: {
312
- interface: string;
313
- rxBytesPerSec: number;
314
- txBytesPerSec: number;
315
- rxTotal: number;
316
- txTotal: number;
317
- } | null;
318
- memoryFree: number;
319
- memoryUsed: number;
320
- uptime: number;
321
- loadAvg: number[];
322
- };
323
- info: {
324
- type: string;
325
- arch: string;
326
- cpus: number;
327
- cpuModel: string;
328
- memoryTotal: number;
329
- hostname: string;
330
- platform: string;
331
- release: string;
332
- version: string;
333
- networkInterfaces: string[];
334
- };
335
- };
336
- isStarted: boolean;
337
- nodeInformation: {
338
- version: string | null;
339
- };
340
- };
341
- }, {
342
- response: {
343
- error: string | null;
344
- version: string | null;
345
- system: {
346
- stats: {
347
- interface: {
348
- interface: string;
349
- rxBytesPerSec: number;
350
- txBytesPerSec: number;
351
- rxTotal: number;
352
- txTotal: number;
353
- } | null;
354
- memoryFree: number;
355
- memoryUsed: number;
356
- uptime: number;
357
- loadAvg: number[];
358
- };
359
- info: {
360
- type: string;
361
- arch: string;
362
- cpus: number;
363
- cpuModel: string;
364
- memoryTotal: number;
365
- hostname: string;
366
- platform: string;
367
- release: string;
368
- version: string;
369
- networkInterfaces: string[];
370
- };
371
- };
372
- isStarted: boolean;
373
- nodeInformation: {
374
- version: string | null;
375
- };
376
- };
377
- }>;
58
+ }, z.core.$strip>>;
59
+ }, z.core.$strip>;
60
+ }, z.core.$strip>;
61
+ }, z.core.$strip>;
62
+ }, z.core.$strip>;
378
63
  type Response = z.infer<typeof ResponseSchema>;
379
64
  }
380
65
  //# sourceMappingURL=start.command.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"start.command.d.ts","sourceRoot":"","sources":["../../../commands/xray/start.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,gBAAgB,CAAC;IACvB,MAAM,GAAG,oBAAsB,CAAC;IAChC,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAexB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAUzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
1
+ {"version":3,"file":"start.command.d.ts","sourceRoot":"","sources":["../../../commands/xray/start.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,gBAAgB,CAAC;IACvB,MAAM,GAAG,oBAAsB,CAAC;IAChC,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;qBAgBxB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAUzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -2,13 +2,14 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.StartXrayCommand = void 0;
4
4
  const zod_1 = require("zod");
5
- const models_1 = require("../../models");
6
5
  const api_1 = require("../../api");
6
+ const models_1 = require("../../models");
7
7
  var StartXrayCommand;
8
8
  (function (StartXrayCommand) {
9
9
  StartXrayCommand.url = api_1.REST_API.XRAY.START;
10
10
  StartXrayCommand.RequestSchema = zod_1.z.object({
11
11
  internals: zod_1.z.object({
12
+ metadata: models_1.NodeMetadataSchema.optional(),
12
13
  forceRestart: zod_1.z.boolean().default(false),
13
14
  hashes: zod_1.z.object({
14
15
  emptyConfig: zod_1.z.string(),
@@ -19,7 +20,7 @@ var StartXrayCommand;
19
20
  })),
20
21
  }),
21
22
  }),
22
- xrayConfig: zod_1.z.record(zod_1.z.unknown()),
23
+ xrayConfig: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()),
23
24
  });
24
25
  StartXrayCommand.ResponseSchema = zod_1.z.object({
25
26
  response: zod_1.z.object({
@@ -4,20 +4,8 @@ export declare namespace StopXrayCommand {
4
4
  const ResponseSchema: z.ZodObject<{
5
5
  response: z.ZodObject<{
6
6
  isStopped: z.ZodBoolean;
7
- }, "strip", z.ZodTypeAny, {
8
- isStopped: boolean;
9
- }, {
10
- isStopped: boolean;
11
- }>;
12
- }, "strip", z.ZodTypeAny, {
13
- response: {
14
- isStopped: boolean;
15
- };
16
- }, {
17
- response: {
18
- isStopped: boolean;
19
- };
20
- }>;
7
+ }, z.core.$strip>;
8
+ }, z.core.$strip>;
21
9
  type Response = z.infer<typeof ResponseSchema>;
22
10
  }
23
11
  //# sourceMappingURL=stop.command.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"stop.command.d.ts","sourceRoot":"","sources":["../../../commands/xray/stop.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,yBAAiB,eAAe,CAAC;IACtB,MAAM,GAAG,mBAAqB,CAAC;IAE/B,MAAM,cAAc;;;;;;;;;;;;;;;;MAIzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
1
+ {"version":3,"file":"stop.command.d.ts","sourceRoot":"","sources":["../../../commands/xray/stop.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,yBAAiB,eAAe,CAAC;IACtB,MAAM,GAAG,mBAAqB,CAAC;IAE/B,MAAM,cAAc;;;;qBAIzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -24,35 +24,12 @@ export declare const XRAY_DEFAULT_API_MODEL: {
24
24
  readonly tag: "REMNAWAVE_API";
25
25
  };
26
26
  };
27
- export declare const XRAY_API_INBOUND_MODEL: ({ port, caCertPem, serverCertPem, serverKeyPem, }: {
28
- port: number;
29
- caCertPem: string;
30
- serverCertPem: string;
31
- serverKeyPem: string;
27
+ export declare const XRAY_API_INBOUND_MODEL: ({ xtlsApiSocketPath }: {
28
+ xtlsApiSocketPath: string;
32
29
  }) => {
33
30
  readonly tag: "REMNAWAVE_API_INBOUND";
34
- readonly port: number;
35
- readonly listen: "127.0.0.1";
36
- readonly protocol: "dokodemo-door";
37
- readonly settings: {
38
- readonly address: "127.0.0.1";
39
- };
40
- readonly streamSettings: {
41
- readonly security: "tls";
42
- readonly tlsSettings: {
43
- readonly alpn: readonly ["h2"];
44
- readonly serverName: "internal.remnawave.local";
45
- readonly disableSystemRoot: true;
46
- readonly rejectUnknownSni: true;
47
- readonly certificates: readonly [{
48
- readonly certificate: string[];
49
- readonly key: string[];
50
- }, {
51
- readonly usage: "verify";
52
- readonly certificate: string[];
53
- }];
54
- };
55
- };
31
+ readonly listen: `@${string}`;
32
+ readonly protocol: "tunnel";
56
33
  };
57
34
  export declare const XRAY_ROUTING_RULES_MODEL: {
58
35
  readonly inboundTag: readonly ["REMNAWAVE_API_INBOUND"];
@@ -1 +1 @@
1
- {"version":3,"file":"stats.d.ts","sourceRoot":"","sources":["../../../constants/xray/stats.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;CAgB5B,CAAC;AAEX,eAAO,MAAM,wBAAwB;;CAE3B,CAAC;AAEX,eAAO,MAAM,sBAAsB;;;;;CAKzB,CAAC;AAEX,eAAO,MAAM,sBAAsB,GAAI,mDAKpC;IACC,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;CACxB;;;;;;;;;;;;;;;;;;;;;;;;CAqCc,CAAC;AAEhB,eAAO,MAAM,wBAAwB;;;CAG3B,CAAC;AAEX,eAAO,MAAM,wCAAwC,GAAI,iBAEtD;IACC,UAAU,EAAE,MAAM,CAAC;CACtB;;;;;;;CAOC,CAAC;AAEH,eAAO,MAAM,mCAAmC;;;CAGtC,CAAC;AAEX,eAAO,MAAM,iCAAiC,yBAAyB,CAAC"}
1
+ {"version":3,"file":"stats.d.ts","sourceRoot":"","sources":["../../../constants/xray/stats.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;CAgB5B,CAAC;AAEX,eAAO,MAAM,wBAAwB;;CAE3B,CAAC;AAEX,eAAO,MAAM,sBAAsB;;;;;CAKzB,CAAC;AAEX,eAAO,MAAM,sBAAsB,GAAI,uBAAuB;IAAE,iBAAiB,EAAE,MAAM,CAAA;CAAE;;;;CAK5E,CAAC;AAEhB,eAAO,MAAM,wBAAwB;;;CAG3B,CAAC;AAEX,eAAO,MAAM,wCAAwC,GAAI,iBAEtD;IACC,UAAU,EAAE,MAAM,CAAC;CACtB;;;;;;;CAOC,CAAC;AAEH,eAAO,MAAM,mCAAmC;;;CAGtC,CAAC;AAEX,eAAO,MAAM,iCAAiC,yBAAyB,CAAC"}
@@ -27,42 +27,10 @@ exports.XRAY_DEFAULT_API_MODEL = {
27
27
  tag: 'REMNAWAVE_API',
28
28
  },
29
29
  };
30
- const XRAY_API_INBOUND_MODEL = ({ port, caCertPem, serverCertPem, serverKeyPem, }) => ({
30
+ const XRAY_API_INBOUND_MODEL = ({ xtlsApiSocketPath }) => ({
31
31
  tag: 'REMNAWAVE_API_INBOUND',
32
- port: port,
33
- listen: '127.0.0.1',
34
- protocol: 'dokodemo-door',
35
- settings: {
36
- address: '127.0.0.1',
37
- },
38
- streamSettings: {
39
- security: 'tls',
40
- tlsSettings: {
41
- alpn: ['h2'],
42
- serverName: 'internal.remnawave.local',
43
- disableSystemRoot: true,
44
- rejectUnknownSni: true,
45
- certificates: [
46
- {
47
- certificate: serverCertPem
48
- .replace(/\r\n/g, '\n')
49
- .split('\n')
50
- .filter((line) => line),
51
- key: serverKeyPem
52
- .replace(/\r\n/g, '\n')
53
- .split('\n')
54
- .filter((line) => line),
55
- },
56
- {
57
- usage: 'verify',
58
- certificate: caCertPem
59
- .replace(/\r\n/g, '\n')
60
- .split('\n')
61
- .filter((line) => line),
62
- },
63
- ],
64
- },
65
- },
32
+ listen: `@${xtlsApiSocketPath}`,
33
+ protocol: 'tunnel',
66
34
  });
67
35
  exports.XRAY_API_INBOUND_MODEL = XRAY_API_INBOUND_MODEL;
68
36
  exports.XRAY_ROUTING_RULES_MODEL = {
@@ -1,4 +1,5 @@
1
1
  export * from './node-system.schema';
2
2
  export * from './torrent-blocker.report.schema';
3
3
  export * from './xray-webhook.schema';
4
+ export * from './node-metadata.schema';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../models/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,iCAAiC,CAAC;AAChD,cAAc,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../models/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,iCAAiC,CAAC;AAChD,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC"}
@@ -17,3 +17,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./node-system.schema"), exports);
18
18
  __exportStar(require("./torrent-blocker.report.schema"), exports);
19
19
  __exportStar(require("./xray-webhook.schema"), exports);
20
+ __exportStar(require("./node-metadata.schema"), exports);
@@ -0,0 +1,10 @@
1
+ import { z } from 'zod';
2
+ export declare const NodeMetadataSchema: z.ZodObject<{
3
+ name: z.ZodString;
4
+ uuid: z.ZodString;
5
+ id: z.ZodNumber;
6
+ tags: z.ZodArray<z.ZodString>;
7
+ countryCode: z.ZodString;
8
+ }, z.core.$strip>;
9
+ export type TNodeMetadata = z.infer<typeof NodeMetadataSchema>;
10
+ //# sourceMappingURL=node-metadata.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node-metadata.schema.d.ts","sourceRoot":"","sources":["../../models/node-metadata.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,kBAAkB;;;;;;iBAM7B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NodeMetadataSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.NodeMetadataSchema = zod_1.z.object({
6
+ name: zod_1.z.string(),
7
+ uuid: zod_1.z.string(),
8
+ id: zod_1.z.number(),
9
+ tags: zod_1.z.array(zod_1.z.string()),
10
+ countryCode: zod_1.z.string(),
11
+ });