diff --git a/core/cli.py b/core/cli.py index dee8d67..a6b416e 100644 --- a/core/cli.py +++ b/core/cli.py @@ -130,7 +130,7 @@ def get_user(username: str): @click.option('--expiration-days', '-e', required=True, help='Expiration days for the new user', type=int) @click.option('--password', '-p', required=False, help='Password for the user', type=str) @click.option('--creation-date', '-c', required=False, help='Creation date for the user (YYYY-MM-DD)', type=str) -@click.option('--unlimited', is_flag=True, default=True, help='Exempt user from IP limit checks.') +@click.option('--unlimited', is_flag=True, default=False, help='Exempt user from IP limit checks.') def add_user(username: str, traffic_limit: int, expiration_days: int, password: str, creation_date: str, unlimited: bool): try: cli_api.add_user(username, traffic_limit, expiration_days, password, creation_date, unlimited) diff --git a/core/scripts/hysteria2/add_user.py b/core/scripts/hysteria2/add_user.py index 3cf2a31..67a041e 100644 --- a/core/scripts/hysteria2/add_user.py +++ b/core/scripts/hysteria2/add_user.py @@ -9,7 +9,7 @@ from datetime import datetime from init_paths import * from paths import * -def add_user(username, traffic_gb, expiration_days, password=None, creation_date=None, unlimited_user=True): +def add_user(username, traffic_gb, expiration_days, password=None, creation_date=None, unlimited_user=False): """ Adds a new user to the USERS_FILE. @@ -19,7 +19,7 @@ def add_user(username, traffic_gb, expiration_days, password=None, creation_date expiration_days (str): The number of days until the account expires. password (str, optional): The user's password. If None, a random one is generated. creation_date (str, optional): The account creation date in YYYY-MM-DD format. If None, the current date is used. - unlimited_user (bool, optional): If True, user is exempt from IP limits. Defaults to True. + unlimited_user (bool, optional): If True, user is exempt from IP limits. Defaults to False. Returns: int: 0 on success, 1 on failure.