Skip to content

Conversation

@kastov
Copy link
Collaborator

@kastov 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.

kastov added 8 commits March 30, 2025 01:49
- 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.
Copy link
Contributor

@greptile-apps greptile-apps bot left a 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

Comment on lines 160 to 164
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();
}
Copy link
Contributor

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'.

Suggested change
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();
}

@kastov kastov merged commit 7b1fd1a into dev Mar 30, 2025
8 checks passed
@kastov kastov deleted the supervisord branch March 30, 2025 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants