@remnawave/node-contract 2.6.10 → 2.6.11
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.
- package/build/api/routes.d.ts +0 -1
- package/build/api/routes.d.ts.map +1 -1
- package/build/api/routes.js +0 -1
- package/build/commands/stats/get-system-stats.command.d.ts +145 -55
- package/build/commands/stats/get-system-stats.command.d.ts.map +1 -1
- package/build/commands/stats/get-system-stats.command.js +21 -11
- package/build/commands/xray/index.d.ts +0 -1
- package/build/commands/xray/index.d.ts.map +1 -1
- package/build/commands/xray/index.js +0 -1
- package/build/commands/xray/start.command.d.ts +140 -33
- package/build/commands/xray/start.command.d.ts.map +1 -1
- package/build/commands/xray/start.command.js +4 -17
- package/build/constants/xray/stats.js +1 -1
- package/build/models/host-info.schema.d.ts +48 -0
- package/build/models/host-info.schema.d.ts.map +1 -0
- package/build/models/host-info.schema.js +20 -0
- package/build/models/index.d.ts +1 -0
- package/build/models/index.d.ts.map +1 -1
- package/build/models/index.js +1 -0
- package/package.json +1 -1
- package/build/commands/xray/get-status-and-version.command.d.ts +0 -28
- package/build/commands/xray/get-status-and-version.command.d.ts.map +0 -1
- package/build/commands/xray/get-status-and-version.command.js +0 -15
package/build/api/routes.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../api/routes.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,EAAG,OAAgB,CAAC;AAErC,eAAO,MAAM,QAAQ
|
|
1
|
+
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../api/routes.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,EAAG,OAAgB,CAAC;AAErC,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2CX,CAAC"}
|
package/build/api/routes.js
CHANGED
|
@@ -40,7 +40,6 @@ exports.REST_API = {
|
|
|
40
40
|
XRAY: {
|
|
41
41
|
START: `${exports.ROOT}/${CONTROLLERS.XRAY_CONTROLLER}/${CONTROLLERS.XRAY_ROUTES.START}`,
|
|
42
42
|
STOP: `${exports.ROOT}/${CONTROLLERS.XRAY_CONTROLLER}/${CONTROLLERS.XRAY_ROUTES.STOP}`,
|
|
43
|
-
STATUS: `${exports.ROOT}/${CONTROLLERS.XRAY_CONTROLLER}/${CONTROLLERS.XRAY_ROUTES.STATUS}`,
|
|
44
43
|
NODE_HEALTH_CHECK: `${exports.ROOT}/${CONTROLLERS.XRAY_CONTROLLER}/${CONTROLLERS.XRAY_ROUTES.NODE_HEALTH_CHECK}`,
|
|
45
44
|
},
|
|
46
45
|
STATS: {
|
|
@@ -3,69 +3,159 @@ export declare namespace GetSystemStatsCommand {
|
|
|
3
3
|
const url: "/node/stats/get-system-stats";
|
|
4
4
|
const ResponseSchema: z.ZodObject<{
|
|
5
5
|
response: z.ZodObject<{
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
6
|
+
xrayInfo: z.ZodNullable<z.ZodObject<{
|
|
7
|
+
numGoroutine: z.ZodNumber;
|
|
8
|
+
numGC: z.ZodNumber;
|
|
9
|
+
alloc: z.ZodNumber;
|
|
10
|
+
totalAlloc: z.ZodNumber;
|
|
11
|
+
sys: z.ZodNumber;
|
|
12
|
+
mallocs: z.ZodNumber;
|
|
13
|
+
frees: z.ZodNumber;
|
|
14
|
+
liveObjects: z.ZodNumber;
|
|
15
|
+
pauseTotalNs: z.ZodNumber;
|
|
16
|
+
uptime: z.ZodNumber;
|
|
17
|
+
}, "strip", z.ZodTypeAny, {
|
|
18
|
+
uptime: number;
|
|
19
|
+
numGoroutine: number;
|
|
20
|
+
numGC: number;
|
|
21
|
+
alloc: number;
|
|
22
|
+
totalAlloc: number;
|
|
23
|
+
sys: number;
|
|
24
|
+
mallocs: number;
|
|
25
|
+
frees: number;
|
|
26
|
+
liveObjects: number;
|
|
27
|
+
pauseTotalNs: number;
|
|
28
|
+
}, {
|
|
29
|
+
uptime: number;
|
|
30
|
+
numGoroutine: number;
|
|
31
|
+
numGC: number;
|
|
32
|
+
alloc: number;
|
|
33
|
+
totalAlloc: number;
|
|
34
|
+
sys: number;
|
|
35
|
+
mallocs: number;
|
|
36
|
+
frees: number;
|
|
37
|
+
liveObjects: number;
|
|
38
|
+
pauseTotalNs: number;
|
|
39
|
+
}>>;
|
|
40
|
+
plugins: z.ZodObject<{
|
|
41
|
+
torrentBlocker: z.ZodObject<{
|
|
42
|
+
reportsCount: z.ZodNumber;
|
|
43
|
+
}, "strip", z.ZodTypeAny, {
|
|
44
|
+
reportsCount: number;
|
|
45
|
+
}, {
|
|
46
|
+
reportsCount: number;
|
|
47
|
+
}>;
|
|
48
|
+
}, "strip", z.ZodTypeAny, {
|
|
49
|
+
torrentBlocker: {
|
|
50
|
+
reportsCount: number;
|
|
51
|
+
};
|
|
52
|
+
}, {
|
|
53
|
+
torrentBlocker: {
|
|
54
|
+
reportsCount: number;
|
|
55
|
+
};
|
|
56
|
+
}>;
|
|
57
|
+
hotHostInfo: z.ZodObject<{
|
|
58
|
+
memoryFree: z.ZodNumber;
|
|
59
|
+
uptime: z.ZodNumber;
|
|
60
|
+
}, "strip", z.ZodTypeAny, {
|
|
61
|
+
memoryFree: number;
|
|
62
|
+
uptime: number;
|
|
63
|
+
}, {
|
|
64
|
+
memoryFree: number;
|
|
65
|
+
uptime: number;
|
|
66
|
+
}>;
|
|
17
67
|
}, "strip", z.ZodTypeAny, {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
68
|
+
xrayInfo: {
|
|
69
|
+
uptime: number;
|
|
70
|
+
numGoroutine: number;
|
|
71
|
+
numGC: number;
|
|
72
|
+
alloc: number;
|
|
73
|
+
totalAlloc: number;
|
|
74
|
+
sys: number;
|
|
75
|
+
mallocs: number;
|
|
76
|
+
frees: number;
|
|
77
|
+
liveObjects: number;
|
|
78
|
+
pauseTotalNs: number;
|
|
79
|
+
} | null;
|
|
80
|
+
plugins: {
|
|
81
|
+
torrentBlocker: {
|
|
82
|
+
reportsCount: number;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
hotHostInfo: {
|
|
86
|
+
memoryFree: number;
|
|
87
|
+
uptime: number;
|
|
88
|
+
};
|
|
29
89
|
}, {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
90
|
+
xrayInfo: {
|
|
91
|
+
uptime: number;
|
|
92
|
+
numGoroutine: number;
|
|
93
|
+
numGC: number;
|
|
94
|
+
alloc: number;
|
|
95
|
+
totalAlloc: number;
|
|
96
|
+
sys: number;
|
|
97
|
+
mallocs: number;
|
|
98
|
+
frees: number;
|
|
99
|
+
liveObjects: number;
|
|
100
|
+
pauseTotalNs: number;
|
|
101
|
+
} | null;
|
|
102
|
+
plugins: {
|
|
103
|
+
torrentBlocker: {
|
|
104
|
+
reportsCount: number;
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
hotHostInfo: {
|
|
108
|
+
memoryFree: number;
|
|
109
|
+
uptime: number;
|
|
110
|
+
};
|
|
41
111
|
}>;
|
|
42
112
|
}, "strip", z.ZodTypeAny, {
|
|
43
113
|
response: {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
114
|
+
xrayInfo: {
|
|
115
|
+
uptime: number;
|
|
116
|
+
numGoroutine: number;
|
|
117
|
+
numGC: number;
|
|
118
|
+
alloc: number;
|
|
119
|
+
totalAlloc: number;
|
|
120
|
+
sys: number;
|
|
121
|
+
mallocs: number;
|
|
122
|
+
frees: number;
|
|
123
|
+
liveObjects: number;
|
|
124
|
+
pauseTotalNs: number;
|
|
125
|
+
} | null;
|
|
126
|
+
plugins: {
|
|
127
|
+
torrentBlocker: {
|
|
128
|
+
reportsCount: number;
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
hotHostInfo: {
|
|
132
|
+
memoryFree: number;
|
|
133
|
+
uptime: number;
|
|
134
|
+
};
|
|
55
135
|
};
|
|
56
136
|
}, {
|
|
57
137
|
response: {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
138
|
+
xrayInfo: {
|
|
139
|
+
uptime: number;
|
|
140
|
+
numGoroutine: number;
|
|
141
|
+
numGC: number;
|
|
142
|
+
alloc: number;
|
|
143
|
+
totalAlloc: number;
|
|
144
|
+
sys: number;
|
|
145
|
+
mallocs: number;
|
|
146
|
+
frees: number;
|
|
147
|
+
liveObjects: number;
|
|
148
|
+
pauseTotalNs: number;
|
|
149
|
+
} | null;
|
|
150
|
+
plugins: {
|
|
151
|
+
torrentBlocker: {
|
|
152
|
+
reportsCount: number;
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
hotHostInfo: {
|
|
156
|
+
memoryFree: number;
|
|
157
|
+
uptime: number;
|
|
158
|
+
};
|
|
69
159
|
};
|
|
70
160
|
}>;
|
|
71
161
|
type Response = z.infer<typeof ResponseSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-system-stats.command.d.ts","sourceRoot":"","sources":["../../../commands/stats/get-system-stats.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"get-system-stats.command.d.ts","sourceRoot":"","sources":["../../../commands/stats/get-system-stats.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,yBAAiB,qBAAqB,CAAC;IAC5B,MAAM,GAAG,gCAAkC,CAAC;IAE5C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAuBzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
|
|
@@ -2,23 +2,33 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GetSystemStatsCommand = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../models");
|
|
5
6
|
const api_1 = require("../../api");
|
|
6
7
|
var GetSystemStatsCommand;
|
|
7
8
|
(function (GetSystemStatsCommand) {
|
|
8
9
|
GetSystemStatsCommand.url = api_1.REST_API.STATS.GET_SYSTEM_STATS;
|
|
9
10
|
GetSystemStatsCommand.ResponseSchema = zod_1.z.object({
|
|
10
11
|
response: zod_1.z.object({
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
12
|
+
xrayInfo: zod_1.z
|
|
13
|
+
.object({
|
|
14
|
+
numGoroutine: zod_1.z.number(),
|
|
15
|
+
numGC: zod_1.z.number(),
|
|
16
|
+
alloc: zod_1.z.number(),
|
|
17
|
+
totalAlloc: zod_1.z.number(),
|
|
18
|
+
sys: zod_1.z.number(),
|
|
19
|
+
mallocs: zod_1.z.number(),
|
|
20
|
+
frees: zod_1.z.number(),
|
|
21
|
+
liveObjects: zod_1.z.number(),
|
|
22
|
+
pauseTotalNs: zod_1.z.number(),
|
|
23
|
+
uptime: zod_1.z.number(),
|
|
24
|
+
})
|
|
25
|
+
.nullable(),
|
|
26
|
+
plugins: zod_1.z.object({
|
|
27
|
+
torrentBlocker: zod_1.z.object({
|
|
28
|
+
reportsCount: zod_1.z.number(),
|
|
29
|
+
}),
|
|
30
|
+
}),
|
|
31
|
+
hotHostInfo: models_1.HotHostInfoSchema,
|
|
22
32
|
}),
|
|
23
33
|
});
|
|
24
34
|
})(GetSystemStatsCommand || (exports.GetSystemStatsCommand = GetSystemStatsCommand = {}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../commands/xray/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../commands/xray/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC"}
|
|
@@ -15,6 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./get-node-health-check.command"), exports);
|
|
18
|
-
__exportStar(require("./get-status-and-version.command"), exports);
|
|
19
18
|
__exportStar(require("./start.command"), exports);
|
|
20
19
|
__exportStar(require("./stop.command"), exports);
|
|
@@ -89,49 +89,134 @@ export declare namespace StartXrayCommand {
|
|
|
89
89
|
isStarted: z.ZodBoolean;
|
|
90
90
|
version: z.ZodNullable<z.ZodString>;
|
|
91
91
|
error: z.ZodNullable<z.ZodString>;
|
|
92
|
-
systemInformation: z.ZodNullable<z.ZodObject<{
|
|
93
|
-
cpuCores: z.ZodNumber;
|
|
94
|
-
cpuModel: z.ZodString;
|
|
95
|
-
memoryTotal: z.ZodString;
|
|
96
|
-
}, "strip", z.ZodTypeAny, {
|
|
97
|
-
cpuCores: number;
|
|
98
|
-
cpuModel: string;
|
|
99
|
-
memoryTotal: string;
|
|
100
|
-
}, {
|
|
101
|
-
cpuCores: number;
|
|
102
|
-
cpuModel: string;
|
|
103
|
-
memoryTotal: string;
|
|
104
|
-
}>>;
|
|
105
92
|
nodeInformation: z.ZodObject<{
|
|
106
93
|
version: z.ZodNullable<z.ZodString>;
|
|
94
|
+
hostInfo: z.ZodObject<{
|
|
95
|
+
arch: z.ZodString;
|
|
96
|
+
cpus: z.ZodNumber;
|
|
97
|
+
cpuModel: z.ZodString;
|
|
98
|
+
memoryTotal: z.ZodNumber;
|
|
99
|
+
hostname: z.ZodString;
|
|
100
|
+
platform: z.ZodString;
|
|
101
|
+
release: z.ZodString;
|
|
102
|
+
type: z.ZodString;
|
|
103
|
+
version: z.ZodString;
|
|
104
|
+
networkInterfaces: z.ZodArray<z.ZodString, "many">;
|
|
105
|
+
}, "strip", z.ZodTypeAny, {
|
|
106
|
+
type: string;
|
|
107
|
+
arch: string;
|
|
108
|
+
cpus: number;
|
|
109
|
+
cpuModel: string;
|
|
110
|
+
memoryTotal: number;
|
|
111
|
+
hostname: string;
|
|
112
|
+
platform: string;
|
|
113
|
+
release: string;
|
|
114
|
+
version: string;
|
|
115
|
+
networkInterfaces: string[];
|
|
116
|
+
}, {
|
|
117
|
+
type: string;
|
|
118
|
+
arch: string;
|
|
119
|
+
cpus: number;
|
|
120
|
+
cpuModel: string;
|
|
121
|
+
memoryTotal: number;
|
|
122
|
+
hostname: string;
|
|
123
|
+
platform: string;
|
|
124
|
+
release: string;
|
|
125
|
+
version: string;
|
|
126
|
+
networkInterfaces: string[];
|
|
127
|
+
}>;
|
|
128
|
+
hotHostInfo: z.ZodObject<{
|
|
129
|
+
memoryFree: z.ZodNumber;
|
|
130
|
+
uptime: z.ZodNumber;
|
|
131
|
+
}, "strip", z.ZodTypeAny, {
|
|
132
|
+
memoryFree: number;
|
|
133
|
+
uptime: number;
|
|
134
|
+
}, {
|
|
135
|
+
memoryFree: number;
|
|
136
|
+
uptime: number;
|
|
137
|
+
}>;
|
|
107
138
|
}, "strip", z.ZodTypeAny, {
|
|
108
139
|
version: string | null;
|
|
140
|
+
hotHostInfo: {
|
|
141
|
+
memoryFree: number;
|
|
142
|
+
uptime: number;
|
|
143
|
+
};
|
|
144
|
+
hostInfo: {
|
|
145
|
+
type: string;
|
|
146
|
+
arch: string;
|
|
147
|
+
cpus: number;
|
|
148
|
+
cpuModel: string;
|
|
149
|
+
memoryTotal: number;
|
|
150
|
+
hostname: string;
|
|
151
|
+
platform: string;
|
|
152
|
+
release: string;
|
|
153
|
+
version: string;
|
|
154
|
+
networkInterfaces: string[];
|
|
155
|
+
};
|
|
109
156
|
}, {
|
|
110
157
|
version: string | null;
|
|
158
|
+
hotHostInfo: {
|
|
159
|
+
memoryFree: number;
|
|
160
|
+
uptime: number;
|
|
161
|
+
};
|
|
162
|
+
hostInfo: {
|
|
163
|
+
type: string;
|
|
164
|
+
arch: string;
|
|
165
|
+
cpus: number;
|
|
166
|
+
cpuModel: string;
|
|
167
|
+
memoryTotal: number;
|
|
168
|
+
hostname: string;
|
|
169
|
+
platform: string;
|
|
170
|
+
release: string;
|
|
171
|
+
version: string;
|
|
172
|
+
networkInterfaces: string[];
|
|
173
|
+
};
|
|
111
174
|
}>;
|
|
112
175
|
}, "strip", z.ZodTypeAny, {
|
|
113
176
|
error: string | null;
|
|
114
177
|
version: string | null;
|
|
115
178
|
isStarted: boolean;
|
|
116
|
-
systemInformation: {
|
|
117
|
-
cpuCores: number;
|
|
118
|
-
cpuModel: string;
|
|
119
|
-
memoryTotal: string;
|
|
120
|
-
} | null;
|
|
121
179
|
nodeInformation: {
|
|
122
180
|
version: string | null;
|
|
181
|
+
hotHostInfo: {
|
|
182
|
+
memoryFree: number;
|
|
183
|
+
uptime: number;
|
|
184
|
+
};
|
|
185
|
+
hostInfo: {
|
|
186
|
+
type: string;
|
|
187
|
+
arch: string;
|
|
188
|
+
cpus: number;
|
|
189
|
+
cpuModel: string;
|
|
190
|
+
memoryTotal: number;
|
|
191
|
+
hostname: string;
|
|
192
|
+
platform: string;
|
|
193
|
+
release: string;
|
|
194
|
+
version: string;
|
|
195
|
+
networkInterfaces: string[];
|
|
196
|
+
};
|
|
123
197
|
};
|
|
124
198
|
}, {
|
|
125
199
|
error: string | null;
|
|
126
200
|
version: string | null;
|
|
127
201
|
isStarted: boolean;
|
|
128
|
-
systemInformation: {
|
|
129
|
-
cpuCores: number;
|
|
130
|
-
cpuModel: string;
|
|
131
|
-
memoryTotal: string;
|
|
132
|
-
} | null;
|
|
133
202
|
nodeInformation: {
|
|
134
203
|
version: string | null;
|
|
204
|
+
hotHostInfo: {
|
|
205
|
+
memoryFree: number;
|
|
206
|
+
uptime: number;
|
|
207
|
+
};
|
|
208
|
+
hostInfo: {
|
|
209
|
+
type: string;
|
|
210
|
+
arch: string;
|
|
211
|
+
cpus: number;
|
|
212
|
+
cpuModel: string;
|
|
213
|
+
memoryTotal: number;
|
|
214
|
+
hostname: string;
|
|
215
|
+
platform: string;
|
|
216
|
+
release: string;
|
|
217
|
+
version: string;
|
|
218
|
+
networkInterfaces: string[];
|
|
219
|
+
};
|
|
135
220
|
};
|
|
136
221
|
}>;
|
|
137
222
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -139,13 +224,24 @@ export declare namespace StartXrayCommand {
|
|
|
139
224
|
error: string | null;
|
|
140
225
|
version: string | null;
|
|
141
226
|
isStarted: boolean;
|
|
142
|
-
systemInformation: {
|
|
143
|
-
cpuCores: number;
|
|
144
|
-
cpuModel: string;
|
|
145
|
-
memoryTotal: string;
|
|
146
|
-
} | null;
|
|
147
227
|
nodeInformation: {
|
|
148
228
|
version: string | null;
|
|
229
|
+
hotHostInfo: {
|
|
230
|
+
memoryFree: number;
|
|
231
|
+
uptime: number;
|
|
232
|
+
};
|
|
233
|
+
hostInfo: {
|
|
234
|
+
type: string;
|
|
235
|
+
arch: string;
|
|
236
|
+
cpus: number;
|
|
237
|
+
cpuModel: string;
|
|
238
|
+
memoryTotal: number;
|
|
239
|
+
hostname: string;
|
|
240
|
+
platform: string;
|
|
241
|
+
release: string;
|
|
242
|
+
version: string;
|
|
243
|
+
networkInterfaces: string[];
|
|
244
|
+
};
|
|
149
245
|
};
|
|
150
246
|
};
|
|
151
247
|
}, {
|
|
@@ -153,13 +249,24 @@ export declare namespace StartXrayCommand {
|
|
|
153
249
|
error: string | null;
|
|
154
250
|
version: string | null;
|
|
155
251
|
isStarted: boolean;
|
|
156
|
-
systemInformation: {
|
|
157
|
-
cpuCores: number;
|
|
158
|
-
cpuModel: string;
|
|
159
|
-
memoryTotal: string;
|
|
160
|
-
} | null;
|
|
161
252
|
nodeInformation: {
|
|
162
253
|
version: string | null;
|
|
254
|
+
hotHostInfo: {
|
|
255
|
+
memoryFree: number;
|
|
256
|
+
uptime: number;
|
|
257
|
+
};
|
|
258
|
+
hostInfo: {
|
|
259
|
+
type: string;
|
|
260
|
+
arch: string;
|
|
261
|
+
cpus: number;
|
|
262
|
+
cpuModel: string;
|
|
263
|
+
memoryTotal: number;
|
|
264
|
+
hostname: string;
|
|
265
|
+
platform: string;
|
|
266
|
+
release: string;
|
|
267
|
+
version: string;
|
|
268
|
+
networkInterfaces: string[];
|
|
269
|
+
};
|
|
163
270
|
};
|
|
164
271
|
};
|
|
165
272
|
}>;
|
|
@@ -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;
|
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAWzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
|
|
@@ -2,10 +2,8 @@
|
|
|
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");
|
|
5
6
|
const api_1 = require("../../api");
|
|
6
|
-
const UNSUPPORTED_REMNAWAVE_VERSION_MESSAGE = {
|
|
7
|
-
message: 'Unsupported Remnawave version. Please, upgrade Remnawave to version v2.3.x or higher. Or downgrade Remnawave Node version to v2.2.3 (change :latest to :2.2.3 in docker-compose.yml, most likely in /opt/remnanode)',
|
|
8
|
-
};
|
|
9
7
|
var StartXrayCommand;
|
|
10
8
|
(function (StartXrayCommand) {
|
|
11
9
|
StartXrayCommand.url = api_1.REST_API.XRAY.START;
|
|
@@ -20,29 +18,18 @@ var StartXrayCommand;
|
|
|
20
18
|
tag: zod_1.z.string(),
|
|
21
19
|
})),
|
|
22
20
|
}),
|
|
23
|
-
}, {
|
|
24
|
-
errorMap: () => ({
|
|
25
|
-
...UNSUPPORTED_REMNAWAVE_VERSION_MESSAGE,
|
|
26
|
-
}),
|
|
27
|
-
}),
|
|
28
|
-
xrayConfig: zod_1.z.record(zod_1.z.unknown(), {
|
|
29
|
-
errorMap: () => ({
|
|
30
|
-
...UNSUPPORTED_REMNAWAVE_VERSION_MESSAGE,
|
|
31
|
-
}),
|
|
32
21
|
}),
|
|
22
|
+
xrayConfig: zod_1.z.record(zod_1.z.unknown()),
|
|
33
23
|
});
|
|
34
24
|
StartXrayCommand.ResponseSchema = zod_1.z.object({
|
|
35
25
|
response: zod_1.z.object({
|
|
36
26
|
isStarted: zod_1.z.boolean(),
|
|
37
27
|
version: zod_1.z.string().nullable(),
|
|
38
28
|
error: zod_1.z.string().nullable(),
|
|
39
|
-
systemInformation: zod_1.z.nullable(zod_1.z.object({
|
|
40
|
-
cpuCores: zod_1.z.number(),
|
|
41
|
-
cpuModel: zod_1.z.string(),
|
|
42
|
-
memoryTotal: zod_1.z.string(),
|
|
43
|
-
})),
|
|
44
29
|
nodeInformation: zod_1.z.object({
|
|
45
30
|
version: zod_1.z.string().nullable(),
|
|
31
|
+
hostInfo: models_1.HostInfoSchema,
|
|
32
|
+
hotHostInfo: models_1.HotHostInfoSchema,
|
|
46
33
|
}),
|
|
47
34
|
}),
|
|
48
35
|
});
|
|
@@ -74,7 +74,7 @@ const XRAY_TORRENT_BLOCKER_ROUTING_RULES_MODEL = ({ webhookUrl, }) => ({
|
|
|
74
74
|
outboundTag: 'RW_TB_OUTBOUND_BLOCK',
|
|
75
75
|
webhook: {
|
|
76
76
|
url: webhookUrl,
|
|
77
|
-
deduplication:
|
|
77
|
+
deduplication: 5,
|
|
78
78
|
},
|
|
79
79
|
});
|
|
80
80
|
exports.XRAY_TORRENT_BLOCKER_ROUTING_RULES_MODEL = XRAY_TORRENT_BLOCKER_ROUTING_RULES_MODEL;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const HostInfoSchema: z.ZodObject<{
|
|
3
|
+
arch: z.ZodString;
|
|
4
|
+
cpus: z.ZodNumber;
|
|
5
|
+
cpuModel: z.ZodString;
|
|
6
|
+
memoryTotal: z.ZodNumber;
|
|
7
|
+
hostname: z.ZodString;
|
|
8
|
+
platform: z.ZodString;
|
|
9
|
+
release: z.ZodString;
|
|
10
|
+
type: z.ZodString;
|
|
11
|
+
version: z.ZodString;
|
|
12
|
+
networkInterfaces: z.ZodArray<z.ZodString, "many">;
|
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
|
14
|
+
type: string;
|
|
15
|
+
arch: string;
|
|
16
|
+
cpus: number;
|
|
17
|
+
cpuModel: string;
|
|
18
|
+
memoryTotal: number;
|
|
19
|
+
hostname: string;
|
|
20
|
+
platform: string;
|
|
21
|
+
release: string;
|
|
22
|
+
version: string;
|
|
23
|
+
networkInterfaces: string[];
|
|
24
|
+
}, {
|
|
25
|
+
type: string;
|
|
26
|
+
arch: string;
|
|
27
|
+
cpus: number;
|
|
28
|
+
cpuModel: string;
|
|
29
|
+
memoryTotal: number;
|
|
30
|
+
hostname: string;
|
|
31
|
+
platform: string;
|
|
32
|
+
release: string;
|
|
33
|
+
version: string;
|
|
34
|
+
networkInterfaces: string[];
|
|
35
|
+
}>;
|
|
36
|
+
export type THostInfo = z.infer<typeof HostInfoSchema>;
|
|
37
|
+
export declare const HotHostInfoSchema: z.ZodObject<{
|
|
38
|
+
memoryFree: z.ZodNumber;
|
|
39
|
+
uptime: z.ZodNumber;
|
|
40
|
+
}, "strip", z.ZodTypeAny, {
|
|
41
|
+
memoryFree: number;
|
|
42
|
+
uptime: number;
|
|
43
|
+
}, {
|
|
44
|
+
memoryFree: number;
|
|
45
|
+
uptime: number;
|
|
46
|
+
}>;
|
|
47
|
+
export type THotHostInfo = z.infer<typeof HotHostInfoSchema>;
|
|
48
|
+
//# sourceMappingURL=host-info.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host-info.schema.d.ts","sourceRoot":"","sources":["../../models/host-info.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWzB,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEvD,eAAO,MAAM,iBAAiB;;;;;;;;;EAG5B,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HotHostInfoSchema = exports.HostInfoSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.HostInfoSchema = zod_1.z.object({
|
|
6
|
+
arch: zod_1.z.string(),
|
|
7
|
+
cpus: zod_1.z.number().int(),
|
|
8
|
+
cpuModel: zod_1.z.string(),
|
|
9
|
+
memoryTotal: zod_1.z.number(),
|
|
10
|
+
hostname: zod_1.z.string(),
|
|
11
|
+
platform: zod_1.z.string(),
|
|
12
|
+
release: zod_1.z.string(),
|
|
13
|
+
type: zod_1.z.string(),
|
|
14
|
+
version: zod_1.z.string(),
|
|
15
|
+
networkInterfaces: zod_1.z.array(zod_1.z.string()),
|
|
16
|
+
});
|
|
17
|
+
exports.HotHostInfoSchema = zod_1.z.object({
|
|
18
|
+
memoryFree: zod_1.z.number(),
|
|
19
|
+
uptime: zod_1.z.number(),
|
|
20
|
+
});
|
package/build/models/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../models/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../models/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,iCAAiC,CAAC;AAChD,cAAc,uBAAuB,CAAC"}
|
package/build/models/index.js
CHANGED
|
@@ -14,5 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./host-info.schema"), exports);
|
|
17
18
|
__exportStar(require("./torrent-blocker.report.schema"), exports);
|
|
18
19
|
__exportStar(require("./xray-webhook.schema"), exports);
|
package/package.json
CHANGED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare namespace GetStatusAndVersionCommand {
|
|
3
|
-
const url: "/node/xray/status";
|
|
4
|
-
const ResponseSchema: z.ZodObject<{
|
|
5
|
-
response: z.ZodObject<{
|
|
6
|
-
isRunning: z.ZodBoolean;
|
|
7
|
-
version: z.ZodNullable<z.ZodString>;
|
|
8
|
-
}, "strip", z.ZodTypeAny, {
|
|
9
|
-
isRunning: boolean;
|
|
10
|
-
version: string | null;
|
|
11
|
-
}, {
|
|
12
|
-
isRunning: boolean;
|
|
13
|
-
version: string | null;
|
|
14
|
-
}>;
|
|
15
|
-
}, "strip", z.ZodTypeAny, {
|
|
16
|
-
response: {
|
|
17
|
-
isRunning: boolean;
|
|
18
|
-
version: string | null;
|
|
19
|
-
};
|
|
20
|
-
}, {
|
|
21
|
-
response: {
|
|
22
|
-
isRunning: boolean;
|
|
23
|
-
version: string | null;
|
|
24
|
-
};
|
|
25
|
-
}>;
|
|
26
|
-
type Response = z.infer<typeof ResponseSchema>;
|
|
27
|
-
}
|
|
28
|
-
//# sourceMappingURL=get-status-and-version.command.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-status-and-version.command.d.ts","sourceRoot":"","sources":["../../../commands/xray/get-status-and-version.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,yBAAiB,0BAA0B,CAAC;IACjC,MAAM,GAAG,qBAAuB,CAAC;IAEjC,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;MAKzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GetStatusAndVersionCommand = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const api_1 = require("../../api");
|
|
6
|
-
var GetStatusAndVersionCommand;
|
|
7
|
-
(function (GetStatusAndVersionCommand) {
|
|
8
|
-
GetStatusAndVersionCommand.url = api_1.REST_API.XRAY.STATUS;
|
|
9
|
-
GetStatusAndVersionCommand.ResponseSchema = zod_1.z.object({
|
|
10
|
-
response: zod_1.z.object({
|
|
11
|
-
isRunning: zod_1.z.boolean(),
|
|
12
|
-
version: zod_1.z.string().nullable(),
|
|
13
|
-
}),
|
|
14
|
-
});
|
|
15
|
-
})(GetStatusAndVersionCommand || (exports.GetStatusAndVersionCommand = GetStatusAndVersionCommand = {}));
|