diff --git a/dashboard/backend/main.py b/dashboard/backend/main.py index ace0fc9..0297207 100644 --- a/dashboard/backend/main.py +++ b/dashboard/backend/main.py @@ -28,7 +28,7 @@ async def monitor_containers(): msg = f"⚠️ *Container Alert* ⚠️\nContainer `{c.name}` just stopped unexpectedly (Status: {current_status})." # Use httpx directly as system.send_notification expects a FastAPI request object usually if TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID: - proxy_url = os.environ.get("HTTP_PROXY") or os.environ.get("http_proxy") + proxy_url = os.environ.get("TELEGRAM_PROXY") async with httpx.AsyncClient(proxy=proxy_url) as hc: await hc.post( f"https://api.telegram.org/bot{TELEGRAM_BOT_TOKEN}/sendMessage", diff --git a/dashboard/backend/routers/system.py b/dashboard/backend/routers/system.py index f629054..2e5fdab 100644 --- a/dashboard/backend/routers/system.py +++ b/dashboard/backend/routers/system.py @@ -16,7 +16,7 @@ async def send_notification(body: dict): msg = body.get("message", "") if not msg or not TELEGRAM_BOT_TOKEN or not TELEGRAM_CHAT_ID: return {"ok": False, "error": "missing message or Telegram config"} - proxy_url = os.environ.get("HTTP_PROXY") or os.environ.get("http_proxy") + proxy_url = os.environ.get("TELEGRAM_PROXY") async with httpx.AsyncClient(proxy=proxy_url) as client: r = await client.post( f"https://api.telegram.org/bot{TELEGRAM_BOT_TOKEN}/sendMessage", diff --git a/dashboard/docker-compose.yml b/dashboard/docker-compose.yml index 71e5472..94e25b7 100644 --- a/dashboard/docker-compose.yml +++ b/dashboard/docker-compose.yml @@ -36,8 +36,7 @@ services: - VPS_SSH_USER=jimmyg - TELEGRAM_BOT_TOKEN=${TELEGRAM_BOT_TOKEN:-} - TELEGRAM_CHAT_ID=${TELEGRAM_CHAT_ID:-} - - HTTP_PROXY=${HTTP_PROXY:-} - - HTTPS_PROXY=${HTTPS_PROXY:-} + - TELEGRAM_PROXY=${TELEGRAM_PROXY:-} volumes: - /volume1:/volume1 - /volume1/docker/nas-dashboard/ssh/dashboard_terminal:/app/ssh/id_ed25519:ro diff --git a/dashboard/frontend/src/routes/OpenClaw.svelte b/dashboard/frontend/src/routes/OpenClaw.svelte index 6bb993b..b719e3a 100644 --- a/dashboard/frontend/src/routes/OpenClaw.svelte +++ b/dashboard/frontend/src/routes/OpenClaw.svelte @@ -1,13 +1,50 @@ + +

OpenClaw

AI Assistant

- + {#if canAccess} +
+
+ + + +
+

OpenClaw Ready

+

+ OpenClaw's security settings prevent it from being embedded inside the dashboard. Click below to launch the assistant securely in a new tab. +

+ + Launch OpenClaw + + + + +
+ {:else} +
+ + + +

Tailscale Network Required

+

+ For security reasons, OpenClaw is only accessible when connected directly to the NAS via the internal Tailscale network. +

+

+ Connect to Tailscale and visit http://100.78.131.124:4000 to use the AI Assistant. +

+
+ {/if}