3x-ui/.github
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
..
ISSUE_TEMPLATE chore: new templates for issues and pull requests (#2935) 2025-04-23 09:04:36 +02:00
workflows Add workflow to clean old GitHub Actions caches 2026-02-03 00:19:44 +01:00
copilot-instructions.md feat: implement 'last IP wins' policy for IP limitation (#3735) 2026-02-04 00:38:11 +01:00
FUNDING.yml donate: nowpayments 2025-09-18 20:14:10 +02:00
pull_request_template.yml chore: new templates for issues and pull requests (#2935) 2025-04-23 09:04:36 +02:00