mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-07-04 03:44:22 +00:00
c3cc8b4374
hasLimitIp ran settings LIKE '%limitIp%' and JSON-parsed every matching inbound's settings blob — and since clients marshal limitIp without omitempty, every inbound matched, so each 10s scan loaded and parsed every settings blob in the database (~75MB of JSON at 500k clients) just to decide whether any limit exists. It now probes the normalized clients table (limit_ip > 0, Limit(1) count like depletedCond does), which SyncInbound and the legacy seeder keep in sync with the settings JSON. Semantics note: a limitIp that exists only in settings JSON with no clients row no longer enables enforcement — the enforcement path itself already resolves clients through the same normalized tables.