Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 92 additions & 0 deletions .github/workflows/build-supervisord.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: Build & Push Pre-Dev Image

on:
push:
branches:
- supervisord

jobs:
send-tg-msg:
name: Send TG message
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v2

- name: Send Telegram message
uses: proDreams/actions-telegram-notifier@main
with:
token: ${{ secrets.TELEGRAM_TOKEN }}
chat_id: ${{ secrets.TELEGRAM_CHAT_ID }}
thread_id: ${{ secrets.TELEGRAM_TOPIC_ID }}
status: pending
notify_fields: 'repo_with_tag,commit,workflow'
title: 'Building docker image.'

build-docker-image:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '22.x'

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64
push: true
tags: |
remnawave/node:supervisord

send-finish-tg-msg:
name: Send TG message
needs: [build-docker-image]
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v2

- name: Send Telegram message
uses: proDreams/actions-telegram-notifier@main
with:
token: ${{ secrets.TELEGRAM_TOKEN }}
chat_id: ${{ secrets.TELEGRAM_CHAT_ID }}
thread_id: ${{ secrets.TELEGRAM_TOPIC_ID }}
status: ${{ job.status }}
notify_fields: 'repo_with_tag,commit,workflow'
title: 'Build Pre-Dev finished.'

notify-on-error:
runs-on: ubuntu-latest
needs: [build-docker-image]
if: failure()
steps:
- name: Checkout source code
uses: actions/checkout@v2

- name: Send error notification
uses: proDreams/actions-telegram-notifier@main
with:
token: ${{ secrets.TELEGRAM_TOKEN }}
chat_id: ${{ secrets.TELEGRAM_CHAT_ID }}
thread_id: ${{ secrets.TELEGRAM_TOPIC_ID }}
status: failure
notify_fields: 'repo_with_tag,commit,workflow'
title: 'Build Pre-Dev failed.'
1 change: 0 additions & 1 deletion libs/contract/commands/handler/remove-user.command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ export namespace RemoveUserCommand {
export const url = REST_API.HANDLER.REMOVE_USER;

export const RequestSchema = z.object({
tags: z.array(z.string()),
username: z.string(),
});

Expand Down
3 changes: 2 additions & 1 deletion libs/contract/constants/xray/stats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ export const XRAY_DEFAULT_STATS_MODEL = {
export const XRAY_DEFAULT_API_MODEL = {
api: {
services: ['HandlerService', 'StatsService', 'RoutingService'],
tag: 'api',
listen: '127.0.0.1:61000',
tag: 'REMNAWAVE_API',
},
} as const;

Expand Down
2 changes: 1 addition & 1 deletion libs/contract/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@remnawave/node-contract",
"version": "0.4.1",
"version": "0.5.0",
"description": "A node-contract library for Remnawave Panel",
"main": "build/index.js",
"types": "build/index.d.ts",
Expand Down
129 changes: 125 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"@nestjs/jwt": "11.0.0",
"@nestjs/passport": "11.0.5",
"@nestjs/platform-express": "11.0.12",
"@remnawave/supervisord-nestjs": "0.1.1",
"@remnawave/xtls-sdk": "0.3.0",
"@remnawave/xtls-sdk-nestjs": "0.2.2",
"enhanced-ms": "^4.1.0",
Expand All @@ -44,7 +45,9 @@
"nest-winston": "^1.10.2",
"nestjs-zod": "4.3.1",
"node-object-hash": "^3.1.1",
"node-supervisord": "^1.0.6-rc.2",
"object-hash": "^3.0.0",
"p-retry": "^6.2.1",
"passport": "0.7.0",
"passport-jwt": "4.0.1",
"pkg-types": "^2.1.0",
Expand All @@ -66,7 +69,7 @@
"@types/jsonwebtoken": "^9.0.9",
"@types/mjml": "^4.7.4",
"@types/morgan": "^1.9.9",
"@types/node": "^22.13.13",
"@types/node": "^22.13.14",
"@types/nunjucks": "^3.2.6",
"@types/object-hash": "^3.0.6",
"@types/passport-jwt": "^4.0.1",
Expand All @@ -85,4 +88,4 @@
"tsconfig-paths": "^4.2.0",
"typescript": "~5.8.2"
}
}
}
12 changes: 12 additions & 0 deletions src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { ConfigModule, ConfigService } from '@nestjs/config';
import { Module } from '@nestjs/common';
import { JwtModule } from '@nestjs/jwt';

import { SupervisordNestjsModule } from '@remnawave/supervisord-nestjs';
import { XtlsSdkNestjsModule } from '@remnawave/xtls-sdk-nestjs';

import { JwtStrategy } from '@common/guards/jwt-guards/strategies/validate-token';
Expand All @@ -28,6 +29,17 @@ import { InternalModule } from './modules/internal/internal.module';
port: configService.getOrThrow<string>('XTLS_PORT'),
}),
}),
SupervisordNestjsModule.forRootAsync({
imports: [],
inject: [],
useFactory: () => ({
host: 'http://localhost:61002',
options: {
username: 'remnawave',
password: 'glcmYQLRwPXDXIBq',
},
}),
}),
RemnawaveNodeModules,
InternalModule,
JwtModule.registerAsync(getJWTConfig()),
Expand Down
Loading