Skip to content

Commit 45f66ea

Browse files
authored
chore: release v2.7.0
Merge pull request #34 from remnawave/dev
2 parents 1da754c + 3b59d25 commit 45f66ea

118 files changed

Lines changed: 2339 additions & 349 deletions

File tree

Some content is hidden

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

.github/workflows/deploy-lib.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Checkout source code
14-
uses: actions/checkout@v2
14+
uses: actions/checkout@v6
1515

1616
- name: Send Telegram message
1717
uses: appleboy/telegram-action@master
@@ -31,12 +31,12 @@ jobs:
3131
id-token: write
3232
steps:
3333
- name: Checkout
34-
uses: actions/checkout@v2
34+
uses: actions/checkout@v6
3535

3636
- name: Setup Node
37-
uses: actions/setup-node@v4
37+
uses: actions/setup-node@v6
3838
with:
39-
node-version: '22.x'
39+
node-version: '24.x'
4040
registry-url: 'https://registry.npmjs.org'
4141

4242
- name: Update npm

Dockerfile

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
FROM node:24.13-alpine AS build
1+
FROM node:24.14-alpine AS build
22

3-
ARG XRAY_CORE_VERSION=v26.2.6
3+
ARG XRAY_CORE_VERSION=v26.3.27
44
ARG UPSTREAM_REPO=XTLS
55
ARG XRAY_CORE_INSTALL_SCRIPT=https://raw.githubusercontent.com/remnawave/scripts/main/scripts/install-xray.sh
66

@@ -23,7 +23,15 @@ RUN echo '#!/bin/sh' > /usr/local/bin/xerrors \
2323
&& chmod +x /usr/local/bin/xerrors
2424

2525

26-
FROM node:24.13-alpine
26+
FROM node:24.14-alpine
27+
28+
LABEL org.opencontainers.image.title="Remnawave Node"
29+
LABEL org.opencontainers.image.description="Remnawave Node with built-in XRay Core"
30+
LABEL org.opencontainers.image.url="https://github.com/remnawave/node"
31+
LABEL org.opencontainers.image.source="https://github.com/remnawave/node"
32+
LABEL org.opencontainers.image.vendor="Remnawave"
33+
LABEL org.opencontainers.image.licenses="AGPL-3.0"
34+
LABEL org.opencontainers.image.documentation="https://docs.rw"
2735

2836
WORKDIR /opt/app
2937

@@ -39,8 +47,7 @@ COPY docker-entrypoint.sh /usr/local/bin/
3947
COPY package*.json ./
4048
COPY ./libs ./libs
4149

42-
43-
RUN apk add --no-cache supervisor && \
50+
RUN apk add --no-cache supervisor libnftnl libmnl && \
4451
mkdir -p /var/log/supervisor && \
4552
chmod +x /usr/local/bin/docker-entrypoint.sh && \
4653
ln -s /usr/local/bin/xray /usr/local/bin/rw-core
@@ -51,6 +58,7 @@ RUN npm ci --omit=dev --legacy-peer-deps \
5158

5259
ENV NODE_ENV=production
5360
ENV NODE_OPTIONS="--max-http-header-size=65536"
61+
ENV UV_THREADPOOL_SIZE=24
5462

5563
ENV XTLS_API_PORT=61000
5664

docker-entrypoint.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,18 @@ echo "[Entrypoint] Supervisord started successfully"
3535
sleep 1
3636

3737

38+
if [ -n "$CUSTOM_CORE_URL" ]; then
39+
echo "[Entrypoint] CUSTOM_CORE_URL is set, downloading custom core from: $CUSTOM_CORE_URL"
40+
rm -f /usr/local/bin/xray
41+
if wget -q -O /usr/local/bin/xray "$CUSTOM_CORE_URL"; then
42+
chmod +x /usr/local/bin/xray
43+
echo "[Entrypoint] Custom core downloaded and installed successfully"
44+
else
45+
echo "[Entrypoint] ERROR: Failed to download custom core from: $CUSTOM_CORE_URL"
46+
exit 1
47+
fi
48+
fi
49+
3850
echo "[Entrypoint] Getting Xray version..."
3951

4052
XRAY_CORE_VERSION=$(/usr/local/bin/rw-core version | head -n 1)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
export * from './handler';
2+
export * from './plugin';
23
export * from './stats';
34
export * from './vision';
45
export * from './xray';
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
export const PLUGIN_CONTROLLER = 'plugin' as const;
2+
3+
export const TORRENT_BLOCKER_ROUTE = 'torrent-blocker' as const;
4+
export const NFTABLES_ROUTE = 'nftables' as const;
5+
6+
export const PLUGIN_ROUTES = {
7+
SYNC: 'sync',
8+
9+
TORRENT_BLOCKER: {
10+
COLLECT: `${TORRENT_BLOCKER_ROUTE}/collect`,
11+
},
12+
NFTABLES: {
13+
UNBLOCK_IPS: `${NFTABLES_ROUTE}/unblock-ips`,
14+
BLOCK_IPS: `${NFTABLES_ROUTE}/block-ips`,
15+
RECREATE_TABLES: `${NFTABLES_ROUTE}/recreate-tables`,
16+
},
17+
} as const;

libs/contract/api/controllers/stats.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ export const STATS_ROUTES = {
1414
GET_COMBINED_STATS: 'get-combined-stats',
1515

1616
GET_USER_IP_LIST: 'get-user-ip-list',
17+
GET_USERS_IP_LIST: 'get-users-ip-list',
1718
} as const;

libs/contract/api/routes.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ export const REST_API = {
66
XRAY: {
77
START: `${ROOT}/${CONTROLLERS.XRAY_CONTROLLER}/${CONTROLLERS.XRAY_ROUTES.START}`,
88
STOP: `${ROOT}/${CONTROLLERS.XRAY_CONTROLLER}/${CONTROLLERS.XRAY_ROUTES.STOP}`,
9-
STATUS: `${ROOT}/${CONTROLLERS.XRAY_CONTROLLER}/${CONTROLLERS.XRAY_ROUTES.STATUS}`,
109
NODE_HEALTH_CHECK: `${ROOT}/${CONTROLLERS.XRAY_CONTROLLER}/${CONTROLLERS.XRAY_ROUTES.NODE_HEALTH_CHECK}`,
1110
},
1211
STATS: {
@@ -19,6 +18,7 @@ export const REST_API = {
1918
GET_ALL_INBOUNDS_STATS: `${ROOT}/${CONTROLLERS.STATS_CONTROLLER}/${CONTROLLERS.STATS_ROUTES.GET_ALL_INBOUNDS_STATS}`,
2019
GET_COMBINED_STATS: `${ROOT}/${CONTROLLERS.STATS_CONTROLLER}/${CONTROLLERS.STATS_ROUTES.GET_COMBINED_STATS}`,
2120
GET_USER_IP_LIST: `${ROOT}/${CONTROLLERS.STATS_CONTROLLER}/${CONTROLLERS.STATS_ROUTES.GET_USER_IP_LIST}`,
21+
GET_USERS_IP_LIST: `${ROOT}/${CONTROLLERS.STATS_CONTROLLER}/${CONTROLLERS.STATS_ROUTES.GET_USERS_IP_LIST}`,
2222
},
2323
HANDLER: {
2424
ADD_USER: `${ROOT}/${CONTROLLERS.HANDLER_CONTROLLER}/${CONTROLLERS.HANDLER_ROUTES.ADD_USER}`,
@@ -34,4 +34,15 @@ export const REST_API = {
3434
UNBLOCK_IP: `${CONTROLLERS.VISION_CONTROLLER}/${CONTROLLERS.VISION_ROUTES.UNBLOCK_IP}`,
3535
BLOCK_IP: `${CONTROLLERS.VISION_CONTROLLER}/${CONTROLLERS.VISION_ROUTES.BLOCK_IP}`,
3636
},
37+
PLUGIN: {
38+
SYNC: `${ROOT}/${CONTROLLERS.PLUGIN_CONTROLLER}/${CONTROLLERS.PLUGIN_ROUTES.SYNC}`,
39+
TORRENT_BLOCKER: {
40+
COLLECT: `${ROOT}/${CONTROLLERS.PLUGIN_CONTROLLER}/${CONTROLLERS.PLUGIN_ROUTES.TORRENT_BLOCKER.COLLECT}`,
41+
},
42+
NFTABLES: {
43+
UNBLOCK_IPS: `${ROOT}/${CONTROLLERS.PLUGIN_CONTROLLER}/${CONTROLLERS.PLUGIN_ROUTES.NFTABLES.UNBLOCK_IPS}`,
44+
BLOCK_IPS: `${ROOT}/${CONTROLLERS.PLUGIN_CONTROLLER}/${CONTROLLERS.PLUGIN_ROUTES.NFTABLES.BLOCK_IPS}`,
45+
RECREATE_TABLES: `${ROOT}/${CONTROLLERS.PLUGIN_CONTROLLER}/${CONTROLLERS.PLUGIN_ROUTES.NFTABLES.RECREATE_TABLES}`,
46+
},
47+
},
3748
} as const;

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

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,29 @@ export namespace AddUserCommand {
3939
ivCheck: z.boolean(),
4040
});
4141

42+
const BaseShadowsocks22User = z.object({
43+
type: z.literal('shadowsocks22'),
44+
tag: z.string(),
45+
username: z.string(),
46+
password: z.string(),
47+
});
48+
49+
const BaseHysteriaUser = z.object({
50+
type: z.literal('hysteria'),
51+
tag: z.string(),
52+
username: z.string(),
53+
password: z.string(),
54+
});
55+
4256
export const RequestSchema = z.object({
4357
data: z.array(
44-
z.discriminatedUnion('type', [BaseTrojanUser, BaseVlessUser, BaseShadowsocksUser]),
58+
z.discriminatedUnion('type', [
59+
BaseTrojanUser,
60+
BaseVlessUser,
61+
BaseShadowsocksUser,
62+
BaseShadowsocks22User,
63+
BaseHysteriaUser,
64+
]),
4565
),
4666
hashData: z.object({
4767
vlessUuid: z.string().uuid(),

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,16 @@ export namespace AddUsersCommand {
2121
tag: z.string(),
2222
});
2323

24+
const BaseShadowsocks22User = z.object({
25+
type: z.literal('shadowsocks22'),
26+
tag: z.string(),
27+
});
28+
29+
const BaseHysteriaUser = z.object({
30+
type: z.literal('hysteria'),
31+
tag: z.string(),
32+
});
33+
2434
export const RequestSchema = z.object({
2535
affectedInboundTags: z.array(z.string()),
2636
users: z.array(
@@ -30,6 +40,8 @@ export namespace AddUsersCommand {
3040
BaseTrojanUser,
3141
BaseVlessUser,
3242
BaseShadowsocksUser,
43+
BaseShadowsocks22User,
44+
BaseHysteriaUser,
3345
]),
3446
),
3547

libs/contract/commands/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
export * from './handler';
2+
export * from './plugin';
23
export * from './stats';
34
export * from './vision';
45
export * from './xray';

0 commit comments

Comments
 (0)