mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-04-06 04:13:48 +00:00
update vpn service
This commit is contained in:
@@ -193,11 +193,13 @@ export function SecureGatewaySetup() {
|
||||
|
||||
// Prepare config - for "host_only" mode, set routes to just the host IP
|
||||
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] Deploy config:", JSON.stringify(deployConfig, null, 2))
|
||||
console.log("[v0] Final deploy config:", JSON.stringify(deployConfig, null, 2))
|
||||
|
||||
setDeployProgress("Creating LXC container...")
|
||||
|
||||
|
||||
@@ -248,6 +248,9 @@ def deploy_app():
|
||||
}), 400
|
||||
|
||||
logger.info(f"Deploy request: app_id={app_id}, config_keys={list(config.keys())}")
|
||||
logger.info(f"Deploy config advertise_routes: {config.get('advertise_routes')}")
|
||||
logger.info(f"Deploy config access_mode: {config.get('access_mode')}")
|
||||
logger.info(f"Full config: {config}")
|
||||
|
||||
result = oci_manager.deploy_app(app_id, config, installed_by="web")
|
||||
|
||||
|
||||
@@ -349,6 +349,9 @@ def _configure_tailscale(vmid: int, config: Dict[str, Any]) -> bool:
|
||||
return False
|
||||
|
||||
print(f"[*] Configuring Tailscale...")
|
||||
print(f"[DEBUG] Config received: {list(config.keys())}")
|
||||
print(f"[DEBUG] advertise_routes: {config.get('advertise_routes')}")
|
||||
print(f"[DEBUG] exit_node: {config.get('exit_node')}")
|
||||
|
||||
# Build tailscale up command
|
||||
ts_cmd = ["tailscale", "up", f"--authkey={auth_key}"]
|
||||
@@ -362,6 +365,7 @@ def _configure_tailscale(vmid: int, config: Dict[str, Any]) -> bool:
|
||||
if isinstance(advertise_routes, list):
|
||||
advertise_routes = ",".join(advertise_routes)
|
||||
ts_cmd.append(f"--advertise-routes={advertise_routes}")
|
||||
print(f"[DEBUG] Adding routes: {advertise_routes}")
|
||||
|
||||
if config.get("exit_node"):
|
||||
ts_cmd.append("--advertise-exit-node")
|
||||
@@ -820,6 +824,8 @@ def deploy_app(app_id: str, config: Dict[str, Any], installed_by: str = "web") -
|
||||
|
||||
# Special handling for Tailscale
|
||||
if "tailscale" in packages:
|
||||
logger.info(f"Configuring Tailscale with config keys: {list(config.keys())}")
|
||||
logger.info(f"advertise_routes value: {config.get('advertise_routes')}")
|
||||
_configure_tailscale(vmid, config)
|
||||
|
||||
# Step 8: Save instance data
|
||||
|
||||
Reference in New Issue
Block a user