3x-ui/web/job
Aung Ye Zaw d8fb09faae
Some checks failed
Release 3X-UI / build (386) (push) Has been cancelled
Release 3X-UI / build (amd64) (push) Has been cancelled
Release 3X-UI / build (arm64) (push) Has been cancelled
Release 3X-UI / build (armv5) (push) Has been cancelled
Release 3X-UI / build (armv6) (push) Has been cancelled
Release 3X-UI / build (armv7) (push) Has been cancelled
Release 3X-UI / build (s390x) (push) Has been cancelled
Release 3X-UI / Build for Windows (push) Has been cancelled
feat: implement 'last IP wins' policy for IP limitation (#3735)
- Add timestamp tracking for each client IP address
- Sort IPs by connection time (newest first) instead of alphabetically
- Automatically disconnect old connections when IP limit exceeded
- Keep only the most recent N IPs based on LimitIP setting
- Force disconnection via Xray API (RemoveUser + AddUser)
- Prevents account sharing while allowing legitimate network switching
- Log format: [LIMIT_IP] Email = user@example.com || Disconnecting OLD IP = 1.2.3.4 || Timestamp = 1738521234

This ensures users can seamlessly switch between networks (mobile/WiFi)
and the system maintains connections from their most recent IPs only.

Fixes account sharing prevention for VPN providers selling per-IP licenses.

Co-authored-by: Aung Ye Zaw <zaw.a.y@phluid.world>
2026-02-04 00:38:11 +01:00
..
check_client_ip_job.go feat: implement 'last IP wins' policy for IP limitation (#3735) 2026-02-04 00:38:11 +01:00
check_cpu_usage.go fix: handle CPU threshold error to prevent false notifications (#3603) 2025-12-12 14:29:27 +01:00
check_hash_storage.go docs: add comments for all functions 2025-09-20 09:35:50 +02:00
check_xray_running_job.go docs: add comments for all functions 2025-09-20 09:35:50 +02:00
clear_logs_job.go Refactor code and fix linter warnings (#3627) 2026-01-05 05:54:56 +01:00
ldap_sync_job.go feat: Add WebSocket support for real-time updates and enhance VLESS settings (#3605) 2026-01-03 05:26:00 +01:00
periodic_traffic_reset_job.go fix: improve error handling in periodic traffic reset job (#3572) 2025-10-01 23:12:09 +02:00
stats_notify_job.go docs: add comments for all functions 2025-09-20 09:35:50 +02:00
xray_traffic_job.go feat: Real-time Outbound Traffic, UI Improvements & Fix (#3629) 2026-01-05 05:50:40 +01:00