From 70a9a0879c7abe66d258bc8207f340c8526d85df Mon Sep 17 00:00:00 2001 From: alimpo Date: Mon, 16 Mar 2026 22:47:09 +0330 Subject: [PATCH] fix: stop overwriting client_traffics.enable with JSON enable in GetClientTrafficByEmail When a client hit traffic/expiry limit, disableInvalidClients sets client_traffics.enable=false and removes the user from Xray. GetClientTrafficByEmail was overwriting that with settings.clients[].enable (admin config), so ResetClientTraffic never saw the client as disabled and did not re-add the user. Clients could not connect until manually disabled/re-enabled. Now the DB runtime enable flag is preserved; reset correctly re-adds the user to Xray. --- web/service/inbound.go | 1 - 1 file changed, 1 deletion(-) diff --git a/web/service/inbound.go b/web/service/inbound.go index 101c79d9..8a3a4ae2 100644 --- a/web/service/inbound.go +++ b/web/service/inbound.go @@ -2032,7 +2032,6 @@ func (s *InboundService) GetClientTrafficByEmail(email string) (traffic *xray.Cl return nil, err } if t != nil && client != nil { - t.Enable = client.Enable t.UUID = client.ID t.SubId = client.SubID return t, nil