fix: resolve OpenClaw iframe connection refused and Docker HTTP proxy conflict

This commit is contained in:
Gan, Jimmy
2026-02-20 17:25:16 +08:00
parent ec2f60fb2f
commit 7aec5976df
4 changed files with 46 additions and 10 deletions
+1 -1
View File
@@ -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",
+1 -1
View File
@@ -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",