Skip to content

revert: Disconnect client due to exceeded IP limit#3948

Open
HamidRezaSZ wants to merge 11 commits intoMHSanaei:mainfrom
HamidRezaSZ:fix/ip-limit
Open

revert: Disconnect client due to exceeded IP limit#3948
HamidRezaSZ wants to merge 11 commits intoMHSanaei:mainfrom
HamidRezaSZ:fix/ip-limit

Conversation

@HamidRezaSZ
Copy link
Contributor

@HamidRezaSZ HamidRezaSZ commented Mar 18, 2026

What is the pull request?

I think this commit was a good idea to temporarily disconnect the client and close the old banned IPs. I reverted it and also fixed this issue with retrieving the Xray API inbound port and remove only the client of the inbounds with the supported protocols.

Which part of the application is affected by the change?

  • Frontend
  • Backend

Type of Changes

  • Bug fix
  • New feature
  • Refactoring
  • Other

Screenshots

Copilot AI review requested due to automatic review settings March 18, 2026 20:31
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the backend IP-limit enforcement job to (1) actively disconnect clients that exceed their allowed IP count and (2) more reliably determine the Xray gRPC API inbound port to avoid “connection refused” errors (as reported in #3895).

Changes:

  • Temporarily disconnects clients with excess IPs by removing and re-adding the user via Xray’s gRPC API.
  • Resolves the Xray API port by reading the running config.json, falling back to the stored xrayTemplateConfig, then a default port.

@HamidRezaSZ HamidRezaSZ changed the title Fix/ip limit revert: Disconnect client due to exceeded IP limit Mar 18, 2026
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.

IP restrictions of clients

2 participants