Files
aleksey 83d516afa1
CI / build-gateway (push) Successful in 27s
CI / sync-config (push) Successful in 1s
feat(ift): EventHub AI Router stack for Zed
FastAPI gateway with A/B/C lane orchestration, LiteLLM proxy config,
Swarm stack (postgres, redis, VPN off-by-default), deploy/smoke/audit scripts.
2026-08-07 22:06:41 +03:00

20 lines
645 B
Bash

#!/usr/bin/env bash
# End-to-end VPN tunnel probe; restart vless-proxy on failure
set -euo pipefail
STACK_NAME="${STACK_NAME:-ai-router}"
VLESS_PROXY_URL="${VLESS_PROXY_URL:-http://vless-proxy:8080}"
CHECK_INTERVAL="${CHECK_INTERVAL:-60}"
log() { echo "[vpn-watchdog] $(date -Iseconds) $*"; }
while true; do
if curl -sf -x "${VLESS_PROXY_URL}" --max-time 15 https://www.google.com/generate_204 >/dev/null 2>&1; then
log "tunnel OK"
else
log "tunnel FAIL — force restart ${STACK_NAME}_vless-proxy"
docker service update --force "${STACK_NAME}_vless-proxy" || log "service update failed"
fi
sleep "${CHECK_INTERVAL}"
done