3x-ui/.github
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
..
ISSUE_TEMPLATE chore: new templates for issues and pull requests (#2935) 2025-04-23 09:04:36 +02:00
workflows Update Xray-core to v26.1.31 and related dependencies 2026-02-01 03:30:09 +01:00
copilot-instructions.md feat: implement 'last IP wins' policy for IP limitation 2026-02-02 22:46:24 +06:30
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