3x-ui/web
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
..
assets Finalmask: Add XICMP 2026-02-02 17:50:30 +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 fix: trim whitespace from comma-separated list values in routing rules (#3734) 2026-02-02 23:19:30 +01:00
job feat: implement 'last IP wins' policy for IP limitation (#3735) 2026-02-04 00:38:11 +01:00
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 Add workflow to clean old GitHub Actions caches 2026-02-03 00:19:44 +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