3x-ui/web
Aung Ye Zaw 430e6447e0 feat: implement 'last IP wins' policy for IP limitation
- 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.
2026-02-02 22:46:24 +06:30
..
assets Refactor TLS peer cert verification settings 2026-02-01 14:03:46 +01:00
controller Refactor code and fix linter warnings (#3627) 2026-01-05 05:54:56 +01:00
entity feat: more subscription information fields (#3701) 2026-01-26 23:06:01 +01:00
global Refactor code and fix linter warnings (#3627) 2026-01-05 05:54:56 +01:00
html Refactor TLS peer cert verification settings 2026-02-01 14:03:46 +01:00
job feat: implement 'last IP wins' policy for IP limitation 2026-02-02 22:46:24 +06:30
locale docs: add comments for all functions 2025-09-20 09:35:50 +02:00
middleware docs: add comments for all functions 2025-09-20 09:35:50 +02:00
network docs: add comments for all functions 2025-09-20 09:35:50 +02:00
service Update Xray-core to v26.1.31 and related dependencies 2026-02-01 03:30:09 +01:00
session docs: add comments for all functions 2025-09-20 09:35:50 +02:00
translation feat: more subscription information fields (#3701) 2026-01-26 23:06:01 +01:00
websocket Refactor code and fix linter warnings (#3627) 2026-01-05 05:54:56 +01:00
web.go Refactor code and fix linter warnings (#3627) 2026-01-05 05:54:56 +01:00