Commit Graph

5 Commits

Author SHA1 Message Date
eac13764e2 feat: Add per-user IP limit exemption
Introduces a new 'unlimited_user' flag for users. When set to true, the user is exempt from the concurrent IP limit enforcement by `limit.sh`.

- `core/scripts/hysteria2/add_user.py`:
  - Adds an optional `unlimited_user` argument (defaults to false).
  - Stores the `unlimited_user` boolean in the `users.json` file when adding a user.

- `core/scripts/hysteria2/limit.sh`:
  - Modifies `check_ip_limit` function to first check the `unlimited_user` flag for the connecting user in `users.json`.
  - If the flag is true, the script bypasses the IP limit check for that user.
  - Uses `jq` for reliable parsing and includes a `grep` fallback for systems without `jq`.
  - Existing users without the flag are treated as limited (default behavior).
2025-08-11 23:21:36 +03:30
c66ea43c7d fix: correct systemd service target for hysteria-ip-limit 2025-05-16 22:09:59 +03:30
20d5204a1a Ensure BLOCK_DURATION and MAX_IPS exist in CONFIG_ENV correctly 2025-03-24 11:33:10 +03:30
3c025ed5f7 feat: Add Hysteria IP limiter script 2025-03-23 12:42:45 +03:30
e2d3d91eb6 Create limit.sh 2025-03-22 15:44:16 +03:30