From bc242ab64bc6ecd5af9dff38d75da3313bfc67f0 Mon Sep 17 00:00:00 2001 From: Bot Date: Mon, 11 May 2026 17:39:41 +0800 Subject: [PATCH] feat: use self-hosted install scripts and pass dashboard URL --- src/components/install-commands.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/install-commands.tsx b/src/components/install-commands.tsx index 3df734b..b0f1be1 100644 --- a/src/components/install-commands.tsx +++ b/src/components/install-commands.tsx @@ -141,6 +141,7 @@ const generateCommand = ( `NZ_SERVER=${install_host}`, `NZ_TLS=${tls || false}`, `NZ_CLIENT_SECRET=${agent_secret}`, + `NZ_DASHBOARD_URL=${window.location.origin}`, ] if (uuid) envParts.push(`NZ_UUID=${uuid}`) const env = envParts.join(" ") @@ -156,10 +157,10 @@ const generateCommand = ( switch (type) { case OSTypes.Linux: case OSTypes.macOS: { - return `curl -L https://raw.githubusercontent.com/nezhahq/scripts/main/agent/install.sh -o agent.sh && chmod +x agent.sh && env ${env} ./agent.sh` + return `curl -L ${window.location.origin}/script/agent.sh -o agent.sh && chmod +x agent.sh && env ${env} ./agent.sh` } case OSTypes.Windows: { - return `${env_win} [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Ssl3 -bor [Net.SecurityProtocolType]::Tls -bor [Net.SecurityProtocolType]::Tls11 -bor [Net.SecurityProtocolType]::Tls12;set-ExecutionPolicy RemoteSigned;Invoke-WebRequest https://raw.githubusercontent.com/nezhahq/scripts/main/agent/install.ps1 -OutFile C:\install.ps1;powershell.exe C:\install.ps1` + return `${env_win} [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Ssl3 -bor [Net.SecurityProtocolType]::Tls -bor [Net.SecurityProtocolType]::Tls11 -bor [Net.SecurityProtocolType]::Tls12;set-ExecutionPolicy RemoteSigned;Invoke-WebRequest ${window.location.origin}/script/agent.ps1 -OutFile C:\\install.ps1;powershell.exe C:\\install.ps1` } default: { throw new Error(`Unknown OS: ${type}`)