Commit Graph

5 Commits

Author SHA1 Message Date
5a762ad918 fix(core): allow underscores in usernames 2025-08-20 23:45:01 +03:30
5968903d0d Changes the add_user function's unlimited_user parameter to default to False. 2025-08-13 23:35:02 +03:30
85d2e8b81f feat(cli): Integrate unlimited IP option for user creation 2025-08-11 23:28:51 +03:30
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
8ba46b9878 Refactor: Implement user addition functionality in Python 2025-05-02 13:07:53 +03:30