From 38a281b0f0469bf257d657d76e516ba81235d997 Mon Sep 17 00:00:00 2001 From: folex <0xdxdy@gmail.com> Date: Mon, 2 Sep 2024 18:15:20 +0300 Subject: [PATCH] fix(vm_config): add hostSshPort and vmSshPort to Nox's vmConfig (#1016) * fix(vm_config): add hostSshPort and vmSshPort to Nox's vmConfig * Apply automatic changes * Apply suggestions from code review * Apply automatic changes --------- Co-authored-by: folex --- cli/docs/configs/provider.md | 28 ++++++++++++++----------- cli/src/lib/configs/project/provider.ts | 12 +++++++++++ 2 files changed, 28 insertions(+), 12 deletions(-) diff --git a/cli/docs/configs/provider.md b/cli/docs/configs/provider.md index 65c2ec1b2..540f5608c 100644 --- a/cli/docs/configs/provider.md +++ b/cli/docs/configs/provider.md @@ -345,12 +345,14 @@ VM Network Configuration **Properties** -| Property | Type | Required | Description | -|--------------|----------------------|----------|------------------------------------------------------------------| -| `publicIp` | string | **Yes** | Public IP address to assign the VM. Must be publicly accessible. | -| `bridgeName` | string | No | Name of the network bridge device | -| `portRange` | [object](#portrange) | No | iptables-mapped port range from Host to VM | -| `vmIp` | string | No | Internal IP address to assign the VM | +| Property | Type | Required | Description | +|---------------|----------------------|----------|------------------------------------------------------------------| +| `publicIp` | string | **Yes** | Public IP address to assign the VM. Must be publicly accessible. | +| `bridgeName` | string | No | Name of the network bridge device | +| `hostSshPort` | integer | No | Host SSH port, default is 922 | +| `portRange` | [object](#portrange) | No | iptables-mapped port range from Host to VM | +| `vmIp` | string | No | Internal IP address to assign the VM | +| `vmSshPort` | integer | No | VM SSH port, default is 22 | **portRange** @@ -534,12 +536,14 @@ VM Network Configuration ##### Properties -| Property | Type | Required | Description | -|--------------|----------------------|----------|------------------------------------------------------------------| -| `publicIp` | string | **Yes** | Public IP address to assign the VM. Must be publicly accessible. | -| `bridgeName` | string | No | Name of the network bridge device | -| `portRange` | [object](#portrange) | No | iptables-mapped port range from Host to VM | -| `vmIp` | string | No | Internal IP address to assign the VM | +| Property | Type | Required | Description | +|---------------|----------------------|----------|------------------------------------------------------------------| +| `publicIp` | string | **Yes** | Public IP address to assign the VM. Must be publicly accessible. | +| `bridgeName` | string | No | Name of the network bridge device | +| `hostSshPort` | integer | No | Host SSH port, default is 922 | +| `portRange` | [object](#portrange) | No | iptables-mapped port range from Host to VM | +| `vmIp` | string | No | Internal IP address to assign the VM | +| `vmSshPort` | integer | No | VM SSH port, default is 22 | ##### portRange diff --git a/cli/src/lib/configs/project/provider.ts b/cli/src/lib/configs/project/provider.ts index 8239f205d..285679ee0 100644 --- a/cli/src/lib/configs/project/provider.ts +++ b/cli/src/lib/configs/project/provider.ts @@ -429,6 +429,8 @@ type NoxConfigYAMLV1 = Omit & { start?: number; end?: number; }; + hostSshPort?: number; + vmSshPort?: number; }; }; }; @@ -795,6 +797,16 @@ const noxConfigYAMLSchemaV1 = { }, }, }, + hostSshPort: { + nullable: true, + type: "integer", + description: `Host SSH port, default is 922`, + }, + vmSshPort: { + nullable: true, + type: "integer", + description: `VM SSH port, default is 22`, + }, }, }, },