diff --git a/scripts/agent_canary.sh b/scripts/agent_canary.sh index 1cac689..77e801d 100644 --- a/scripts/agent_canary.sh +++ b/scripts/agent_canary.sh @@ -74,7 +74,8 @@ send_tg() { # $1=text if [ -z "${ALERT_TG_BOT_TOKEN:-}" ] || [ -z "${ALERT_TG_CHAT_ID:-}" ]; then echo "$TS ALERT-UNSENT (TG не настроен) $1" >> "$LOG"; return 0 fi - if curl -s --max-time 10 "https://api.telegram.org/bot${ALERT_TG_BOT_TOKEN}/sendMessage" \ + # --noproxy: xray (HTTPS_PROXY) телегу НЕ роутит (даёт 000); слать напрямую. + if curl -s --noproxy "*" --max-time 10 "https://api.telegram.org/bot${ALERT_TG_BOT_TOKEN}/sendMessage" \ --data-urlencode "chat_id=${ALERT_TG_CHAT_ID}" \ --data-urlencode "text=$1" | grep -q '"ok":true'; then echo "$TS ALERT-SENT tg" >> "$LOG"