Skip to content

Commit 81d64b4

Browse files
authored
chore: release v2.3.0
Merge pull request #23 from remnawave/dev
2 parents 0934329 + 598c8b7 commit 81d64b4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+829
-1151
lines changed

Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
FROM node:22-alpine AS build
1+
FROM node:24.11-alpine AS build
22
WORKDIR /opt/app
33
ADD . .
44
RUN npm ci --legacy-peer-deps
55
RUN npm run build --omit=dev
66

77

8-
FROM node:22-alpine
8+
FROM node:24.11-alpine
99

1010
ARG XRAY_CORE_VERSION=v25.10.15
1111
ARG UPSTREAM_REPO=XTLS
@@ -47,6 +47,8 @@ RUN npm ci --omit=dev --legacy-peer-deps \
4747
&& npm cache clean --force
4848

4949

50+
RUN ln -s /usr/local/bin/xray /usr/local/bin/rw-core
51+
5052
ENV NODE_ENV=production
5153
ENV NODE_OPTIONS="--max-http-header-size=65536"
5254

docker-compose-prod.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
services:
22
remnanode:
3+
image: remnawave/node:latest
34
container_name: remnanode
45
hostname: remnanode
5-
image: remnawave/node:latest
66
network_mode: host
77
restart: always
8+
ulimits:
9+
nofile:
10+
soft: 1048576
11+
hard: 1048576
812
environment:
913
- NODE_PORT=2222
1014
- SECRET_KEY=""

docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ supervisord -c /etc/supervisord.conf &
55
echo "[Entrypoint] Supervisord started successfully"
66
sleep 1
77
echo "[Entrypoint] Getting Xray version..."
8-
XRAY_CORE_VERSION=$(/usr/local/bin/xray version | head -n 1)
8+
XRAY_CORE_VERSION=$(/usr/local/bin/rw-core version | head -n 1)
99
export XRAY_CORE_VERSION
1010
echo "[Entrypoint] Xray version: $XRAY_CORE_VERSION"
1111

libs/contract/api/controllers/stats.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@ export const STATS_ROUTES = {
1010

1111
GET_ALL_OUTBOUNDS_STATS: 'get-all-outbounds-stats',
1212
GET_ALL_INBOUNDS_STATS: 'get-all-inbounds-stats',
13+
14+
GET_COMBINED_STATS: 'get-combined-stats',
1315
} as const;

libs/contract/api/routes.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export const REST_API = {
1717
GET_OUTBOUND_STATS: `${ROOT}/${CONTROLLERS.STATS_CONTROLLER}/${CONTROLLERS.STATS_ROUTES.GET_OUTBOUND_STATS}`,
1818
GET_ALL_OUTBOUNDS_STATS: `${ROOT}/${CONTROLLERS.STATS_CONTROLLER}/${CONTROLLERS.STATS_ROUTES.GET_ALL_OUTBOUNDS_STATS}`,
1919
GET_ALL_INBOUNDS_STATS: `${ROOT}/${CONTROLLERS.STATS_CONTROLLER}/${CONTROLLERS.STATS_ROUTES.GET_ALL_INBOUNDS_STATS}`,
20+
GET_COMBINED_STATS: `${ROOT}/${CONTROLLERS.STATS_CONTROLLER}/${CONTROLLERS.STATS_ROUTES.GET_COMBINED_STATS}`,
2021
},
2122
HANDLER: {
2223
ADD_USER: `${ROOT}/${CONTROLLERS.HANDLER_CONTROLLER}/${CONTROLLERS.HANDLER_ROUTES.ADD_USER}`,

libs/contract/commands/handler/add-user.command.ts

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ export namespace AddUserCommand {
2020
tag: z.string(),
2121
username: z.string(),
2222
password: z.string(),
23-
level: z.number().default(0),
2423
});
2524

2625
const BaseVlessUser = z.object({
@@ -29,7 +28,6 @@ export namespace AddUserCommand {
2928
username: z.string(),
3029
uuid: z.string(),
3130
flow: z.enum(['xtls-rprx-vision', '']),
32-
level: z.number().default(0),
3331
});
3432

3533
const BaseShadowsocksUser = z.object({
@@ -39,33 +37,13 @@ export namespace AddUserCommand {
3937
password: z.string(),
4038
cipherType: z.nativeEnum(CipherType),
4139
ivCheck: z.boolean(),
42-
level: z.number().default(0),
4340
});
4441

4542
const BaseShadowsocks2022User = z.object({
4643
type: z.literal('shadowsocks2022'),
4744
tag: z.string(),
4845
username: z.string(),
4946
key: z.string(),
50-
level: z.number().default(0),
51-
});
52-
53-
const BaseSocksUser = z.object({
54-
type: z.literal('socks'),
55-
tag: z.string(),
56-
username: z.string(),
57-
socks_username: z.string(),
58-
socks_password: z.string(),
59-
level: z.number().default(0),
60-
});
61-
62-
const BaseHttpUser = z.object({
63-
type: z.literal('http'),
64-
tag: z.string(),
65-
username: z.string(),
66-
http_username: z.string(),
67-
http_password: z.string(),
68-
level: z.number().default(0),
6947
});
7048

7149
export const RequestSchema = z.object({
@@ -75,8 +53,6 @@ export namespace AddUserCommand {
7553
BaseVlessUser,
7654
BaseShadowsocksUser,
7755
BaseShadowsocks2022User,
78-
BaseSocksUser,
79-
BaseHttpUser,
8056
]),
8157
),
8258
hashData: z.object({
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import { z } from 'zod';
2+
3+
import { REST_API } from '../../api';
4+
export namespace GetCombinedStatsCommand {
5+
export const url = REST_API.STATS.GET_COMBINED_STATS;
6+
7+
export const RequestSchema = z.object({
8+
reset: z.boolean(),
9+
});
10+
11+
export type Request = z.infer<typeof RequestSchema>;
12+
13+
export const ResponseSchema = z.object({
14+
response: z.object({
15+
inbounds: z.array(
16+
z.object({
17+
inbound: z.string(),
18+
downlink: z.number(),
19+
uplink: z.number(),
20+
}),
21+
),
22+
outbounds: z.array(
23+
z.object({
24+
outbound: z.string(),
25+
downlink: z.number(),
26+
uplink: z.number(),
27+
}),
28+
),
29+
}),
30+
});
31+
32+
export type Response = z.infer<typeof ResponseSchema>;
33+
}

libs/contract/commands/stats/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
export * from './get-all-inbounds-stats.command';
22
export * from './get-all-outbounds-stats.command';
3+
export * from './get-combined-stats.command';
34
export * from './get-inbound-stats.command';
45
export * from './get-outbound-stats.command';
56
export * from './get-system-stats.command';

libs/contract/commands/xray/get-node-health-check.command.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export namespace GetNodeHealthCheckCommand {
1010
isAlive: z.boolean(),
1111
xrayInternalStatusCached: z.boolean(),
1212
xrayVersion: z.string().nullable(),
13+
nodeVersion: z.string(),
1314
}),
1415
});
1516

libs/contract/commands/xray/start.command.ts

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,22 @@ import { z } from 'zod';
33
import { REST_API } from '../../api';
44
export namespace StartXrayCommand {
55
export const url = REST_API.XRAY.START;
6-
export const RequestSchema = z.record(z.unknown());
6+
export const RequestSchema = z.object({
7+
internals: z.object({
8+
forceRestart: z.boolean().default(false),
9+
hashes: z.object({
10+
emptyConfig: z.string(),
11+
inbounds: z.array(
12+
z.object({
13+
usersCount: z.number(),
14+
hash: z.string(),
15+
tag: z.string(),
16+
}),
17+
),
18+
}),
19+
}),
20+
xrayConfig: z.record(z.unknown()),
21+
});
722

823
export type Request = z.infer<typeof RequestSchema>;
924

0 commit comments

Comments
 (0)