feat(nodes): Add optional port parameter for node management

This commit is contained in:
ReturnFI
2025-10-16 19:22:49 +00:00
parent 3b58a0273f
commit db82da6e62
3 changed files with 24 additions and 10 deletions

View File

@ -331,12 +331,13 @@ def node():
@node.command('add')
@click.option('--name', required=True, type=str, help='A unique name for the node (e.g., "Node-DE").')
@click.option('--ip', required=True, type=str, help='The public IP address of the node.')
@click.option('--sni', required=False, type=str, help='Optional: The Server Name Indication (e.g., yourdomain.com).')
@click.option('--port', required=False, type=int, help='Optional: The port of the node.')
@click.option('--sni', required=False, type=str, help='Optional: The Server Name Indication.')
@click.option('--pinSHA256', required=False, type=str, help='Optional: The public key SHA256 pin.')
def add_node(name, ip, sni, pinsha256):
def add_node(name, ip, port, sni, pinsha256):
"""Add a new external node."""
try:
output = cli_api.add_node(name, ip, sni, pinSHA256=pinsha256)
output = cli_api.add_node(name, ip, sni, pinSHA256=pinsha256, port=port)
click.echo(output.strip())
except Exception as e:
click.echo(f'{e}', err=True)