diff --git a/AppImage/components/secure-gateway-setup.tsx b/AppImage/components/secure-gateway-setup.tsx
index 6cfac000..ae200b36 100644
--- a/AppImage/components/secure-gateway-setup.tsx
+++ b/AppImage/components/secure-gateway-setup.tsx
@@ -154,7 +154,6 @@ export function SecureGatewaySetup() {
// Remove CIDR notation if present (e.g., "192.168.0.55/24" -> "192.168.0.55")
const ip = hostIpValue.split("/")[0]
setHostIp(ip)
- console.log("[v0] Host IP for Host Only mode:", ip)
}
}
} catch (err) {
@@ -194,15 +193,22 @@ export function SecureGatewaySetup() {
}
}
- // Prepare config - for "host_only" mode, set routes to just the host IP
+ // Prepare config based on access_mode
const deployConfig = { ...config }
- console.log("[v0] access_mode:", config.access_mode, "hostIp:", hostIp)
- if (config.access_mode === "host_only" && hostIp) {
- deployConfig.advertise_routes = [`${hostIp}/32`]
- console.log("[v0] Set advertise_routes for host_only:", deployConfig.advertise_routes)
- }
- console.log("[v0] Final deploy config:", JSON.stringify(deployConfig, null, 2))
+ if (config.access_mode === "host_only" && hostIp) {
+ // Host only: just the host IP
+ deployConfig.advertise_routes = [`${hostIp}/32`]
+ } else if (config.access_mode === "proxmox_network") {
+ // Proxmox network: use the recommended network (should already be set)
+ if (!deployConfig.advertise_routes?.length) {
+ const recommendedNetwork = networks.find((n) => n.recommended) || networks[0]
+ if (recommendedNetwork) {
+ deployConfig.advertise_routes = [recommendedNetwork.subnet]
+ }
+ }
+ }
+ // For "custom", the user has already selected networks manually
setDeployProgress("Creating LXC container...")
@@ -419,6 +425,29 @@ export function SecureGatewaySetup() {
)
case "select":
+ // Special handling for access_mode to auto-select networks
+ const handleSelectChange = (value: string) => {
+ const newConfig = { ...config, [fieldName]: value }
+
+ // When access_mode changes to proxmox_network, auto-select the recommended network
+ if (fieldName === "access_mode" && value === "proxmox_network") {
+ const recommendedNetwork = networks.find((n) => n.recommended) || networks[0]
+ if (recommendedNetwork) {
+ newConfig.advertise_routes = [recommendedNetwork.subnet]
+ }
+ }
+ // Clear routes when switching to host_only
+ if (fieldName === "access_mode" && value === "host_only") {
+ newConfig.advertise_routes = []
+ }
+ // Clear routes when switching to custom (user will select manually)
+ if (fieldName === "access_mode" && value === "custom") {
+ newConfig.advertise_routes = []
+ }
+
+ setConfig(newConfig)
+ }
+
return (
@@ -527,8 +563,8 @@ export function SecureGatewaySetup() {
{field.label}
{field.description}
{field.warning && config[fieldName] && (
-
-
+
+
{field.warning}
)}
@@ -1115,18 +1151,27 @@ export function SecureGatewaySetup() {
- {/* Progress indicator */}
+ {/* Progress indicator - filter out "advanced" step if using Proxmox Only */}
- {wizardSteps.map((step, idx) => (
-
- ))}
+ {wizardSteps
+ .filter((step) => !(config.access_mode === "host_only" && step.id === "advanced"))
+ .map((step, idx) => {
+ // Recalculate the actual step index accounting for skipped steps
+ const actualIdx = wizardSteps.findIndex((s) => s.id === step.id)
+ const adjustedCurrentStep = config.access_mode === "host_only"
+ ? (currentStep > wizardSteps.findIndex((s) => s.id === "advanced") ? currentStep - 1 : currentStep)
+ : currentStep
+ return (
+
+ )
+ })}
{renderWizardContent()}
@@ -1135,7 +1180,14 @@ export function SecureGatewaySetup() {