3x-ui/internal/web/job
mrchatam 8f1201553e
fix(ip-limit): CAS-retry inbound_client_ips merges under Postgres (#6612)
* fix(ip-limit): CAS-retry inbound_client_ips merges under Postgres

Two writers RMW the same ips JSON blob; on PostgreSQL a lost update drops
remote IPs that partitionLiveIps only sees through that blob (#6587).
Compare-and-set on the previous blob with re-merge on miss, matching the
repo's conditional Where+RowsAffected pattern.

Fixes #6587

* ci: retrigger frontend after npm registry maintenance

The frontend job failed solely on `npm audit` while registry.npmjs.org
returned 503 (Service Under Maintenance). Lint, typecheck, vitest, vite
build, and storybook all passed. Local `npm audit --omit=dev
--audit-level=high` now reports 0 vulnerabilities.

* test(ip-limit): cover the scan's CAS against a mid-scan node sync

The job-side compare-and-set had no test of its own. A write injected
between the scan's read and its update now has to keep the node's remote
IP; main's blind Save drops it. Also keeps the new comments to two lines,
as CLAUDE.md requires.

---------

Co-authored-by: mrchatam <mrchatam@users.noreply.github.com>
Co-authored-by: MHSanaei <ho3ein.sanaei@gmail.com>
2026-09-26 22:00:40 +02:00
..
amneziawg_job.go feat(amneziawg): add AmneziaWG as an outbound protocol (#6320) 2026-09-10 14:50:48 +02:00
check_client_ip_ban_commit_test.go fix(ip-limit): append fail2ban lines only after the scan commits (#6590) 2026-09-26 20:30:18 +02:00
check_client_ip_cas_test.go fix(ip-limit): CAS-retry inbound_client_ips merges under Postgres (#6612) 2026-09-26 22:00:40 +02:00
check_client_ip_frozen_ban_test.go fix(ip-limit): append fail2ban lines only after the scan commits (#6590) 2026-09-26 20:30:18 +02:00
check_client_ip_job.go fix(ip-limit): CAS-retry inbound_client_ips merges under Postgres (#6612) 2026-09-26 22:00:40 +02:00
check_client_ip_job_integration_test.go fix(ip-limit): append fail2ban lines only after the scan commits (#6590) 2026-09-26 20:30:18 +02:00
check_client_ip_job_test.go fix(clients): parse only settings.clients across protocols (#5855) 2026-07-08 20:31:00 +02:00
check_client_ip_scale_test.go refactor: modernize Go with strings.SplitSeq and maps.Copy 2026-07-08 22:10:54 +02:00
check_cpu_usage.go style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
check_hash_storage.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
check_hash_storage_test.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
check_memory_usage.go style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
check_xray_running_job.go feat(notifications): event bus architecture with Telegram and SMTP subscribers (#5326) 2026-06-15 21:03:41 +02:00
clear_logs_job.go fix(logs): limit Xray log growth (#5840) 2026-07-08 00:33:34 +03:00
clear_logs_job_test.go fix(logs): limit Xray log growth (#5840) 2026-07-08 00:33:34 +03:00
discord_notify_job.go feat(discord): add Discord notification bot service (#6486) 2026-09-13 14:04:53 +02:00
free_os_memory.go perf(memory): report real RSS and cut footprint via GOGC + periodic release 2026-06-25 22:16:38 +02:00
ip_limit_allowlist.go chore(build): bump Go toolchain to 1.27.0 2026-08-23 21:57:03 +02:00
ip_limit_allowlist_agreement_test.go fix: follow-ups from the post-merge reviews of #6221, #6227, #6230 and #6239 (#6250) 2026-08-18 15:24:59 +02:00
ip_limit_allowlist_test.go feat(limitip): let operators exempt trusted addresses from the IP limit (#6230) 2026-08-18 12:23:10 +02:00
ldap_auto_delete_guard_test.go fix(ldap): stop auto-delete from wiping every client on an empty directory 2026-08-01 15:18:50 +02:00
ldap_sync_hung_node_test.go fix(ldap): apply LDAP enable, disable and cleanup through the bulk paths 2026-09-15 21:06:32 +02:00
ldap_sync_job.go fix(ldap): apply LDAP enable, disable and cleanup through the bulk paths 2026-09-15 21:06:32 +02:00
ldap_sync_job_test.go perf(clients): apply a multi-inbound client create concurrently 2026-09-04 01:01:20 +02:00
limit_ip_disconnect_test.go fix(limit-ip): leave a reverse client out of the temporary disconnect (#6553) 2026-09-15 16:57:23 +03:00
mtproto_job.go fix(mtproto): stop dropping connections on client/inbound edits; add live updates + ad-tag (#5838) 2026-07-07 01:13:24 +02:00
node_heartbeat_descendants_test.go fix(node): drop online clients and sub-nodes of nodes no longer synced 2026-09-15 19:27:38 +02:00
node_heartbeat_job.go fix(node): send one alert for a burst of node transitions 2026-09-15 20:07:19 +02:00
node_traffic_sync_ip_push_test.go fix(node): push a node only the client IPs it hosts 2026-09-15 16:28:31 +02:00
node_traffic_sync_job.go perf(node): sync up to 32 nodes at once, like the heartbeat 2026-09-15 20:22:19 +02:00
node_traffic_sync_job_test.go fix(node): don't stamp InboundsAdoptedAt when the sync adopted nothing (#6284) 2026-08-22 20:37:55 +02:00
node_traffic_sync_online_prune_test.go chore(node): cover the sync tick's online prune from the job package 2026-09-15 20:39:32 +02:00
node_transition_burst_test.go fix(node): send one alert for a burst of node transitions 2026-09-15 20:07:19 +02:00
outbound_subscription_job.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
periodic_traffic_reset_client_test.go feat(clients): give each client its own traffic reset cycle (#6240) 2026-08-18 13:08:44 +02:00
periodic_traffic_reset_job.go fix(traffic): reset due inbounds and clients concurrently 2026-09-15 20:07:19 +02:00
periodic_traffic_reset_job_test.go inbounds: allow custom monthly traffic reset days (#6071) 2026-07-28 23:27:09 +02:00
periodic_traffic_reset_nodes_test.go fix(traffic): reset due inbounds and clients concurrently 2026-09-15 20:07:19 +02:00
reap_sync_orphans_job.go fix(node): stop the node sync from deleting clients it never meant to 2026-08-01 15:19:08 +02:00
remote_routing_job.go feat(sub): bake Happ/INCY routing profiles into the JSON subscription (#6402) 2026-09-10 17:05:54 +02:00
stats_notify_job.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
tuic_job.go Feature/tuic v5 (#6337) 2026-09-12 10:15:48 +02:00
warp_ip_job.go fix(warp): surface update-clock persistence failures (#6209) 2026-08-13 12:31:05 +02:00
warp_ip_job_test.go fix(warp): surface update-clock persistence failures (#6209) 2026-08-13 12:31:05 +02:00
xray_traffic_inform_test.go style: drop the line comments added with the triage fixes 2026-07-27 14:37:57 +02:00
xray_traffic_job.go perf(clients): make the clients page scale to large panels 2026-07-30 02:49:32 +02:00
xray_traffic_job_broadcast_test.go perf(clients): make the clients page scale to large panels 2026-07-30 02:49:32 +02:00