-
Notifications
You must be signed in to change notification settings - Fork 25
Supervisord #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Supervisord #4
Conversation
kastov
commented
Mar 30, 2025
- Updated package version in package.json to 0.5.0.
- Removed 'tags' property from IRemoveUserRequest interface and corresponding command handler.
- Adjusted HandlerService to utilize inbound tags from XrayService instead of directly from the request.
- Added @remnawave/supervisord-nestjs package to package.json and package-lock.json. - Configured SupervisordNestjsModule in app.module.ts for process management. - Updated supervisord.conf to include inet_http_server settings for remote access. - Refactored XrayService to utilize supervisord-nestjs for process control, replacing direct supervisorctl commands. - Enhanced error handling and logging for process management operations.
- Introduced p-retry package for improved retry handling in XrayService. - Enhanced logging format in main.ts to include custom log filter and timestamp. - Updated package.json and package-lock.json to reflect new dependencies and versions. - Refactored error handling in XrayService to provide clearer feedback on process status.
- Modified XRAY_DEFAULT_API_MODEL to include a new listen address and updated the tag. - Commented out unused inbounds configuration in generate-api-config.ts. - Introduced xtlsConfigInbounds in XrayService to extract inbound tags from the generated API config.
- Added XrayModule to HandlerModule imports for dependency injection. - Enhanced HandlerService to utilize XrayService for retrieving inbound tags. - Updated addUser method to remove users from tags using XrayService.
- Updated package version in package.json to 0.5.0. - Removed 'tags' property from IRemoveUserRequest interface and corresponding command handler. - Adjusted HandlerService to utilize inbound tags from XrayService instead of directly from the request.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
This PR integrates supervisors for process management and refines user management by removing the 'tags' property from requests. It also updates package versions and adjusts logging and CI configurations.
- Updated @remnawave/node-contract version to 0.5.0, though package.json still shows 1.5.0; ensure version consistency.
- Removed 'tags' from IRemoveUserRequest and adjusted HandlerService to rely on inbound tags from XrayService.
- Added new build-supervisord.yml workflow with minor checkout version inconsistencies.
- Changed XRAY_DEFAULT_API_MODEL tag causing potential mismatches with inbound models.
- Integrated Supervisord client within XrayService with revised process management and retry logic.
18 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile
| let isStarted = await this.getXrayInternalStatus(); | ||
|
|
||
| if (!isStarted && xrayProcess.all[1] === 'xray: started') { | ||
| await new Promise((resolve) => setTimeout(resolve, 2000)); | ||
| if (!isStarted && xrayProcess.processInfo!.state === 20) { | ||
| isStarted = await this.getXrayInternalStatus(); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: Ensure processInfo is not null before checking its 'state'.
| let isStarted = await this.getXrayInternalStatus(); | |
| if (!isStarted && xrayProcess.all[1] === 'xray: started') { | |
| await new Promise((resolve) => setTimeout(resolve, 2000)); | |
| if (!isStarted && xrayProcess.processInfo!.state === 20) { | |
| isStarted = await this.getXrayInternalStatus(); | |
| } | |
| let isStarted = await this.getXrayInternalStatus(); | |
| if (!isStarted && xrayProcess.processInfo?.state === 20) { | |
| isStarted = await this.getXrayInternalStatus(); | |
| } |