Commit f6e9e280 authored by Vitaly Lipatov's avatar Vitaly Lipatov

route-health: exclude warp from iperf3 requirement

warp gateway uses Cloudflare speedtest instead of iperf3 (no iperf3 server on Cloudflare side). Skip iperf3 check for warp tag to avoid false dead status. Co-Authored-By: 's avatarClaude Opus 4.6 (1M context) <noreply@anthropic.com>
parent e61ab33a
...@@ -85,11 +85,12 @@ if [ -n "$SHOW" ] ; then ...@@ -85,11 +85,12 @@ if [ -n "$SHOW" ] ; then
echo echo
fi fi
# Check if tag is a tunnel gateway (expects VPN monitoring) # Check if tag is a tunnel gateway (expects VPN + iperf3 monitoring)
# warp excluded: no iperf3, uses VPN status + ping only
is_tunnel_gw() is_tunnel_gw()
{ {
case "$1" in case "$1" in
ikev2.*|gre.*|openconnect.*|ovpn.*|xray.*|amneziawg.*|cloak.*|warp*) return 0 ;; ikev2.*|gre.*|openconnect.*|ovpn.*|xray.*|amneziawg.*|cloak.*) return 0 ;;
*) return 1 ;; *) return 1 ;;
esac esac
} }
...@@ -118,14 +119,17 @@ get_health() ...@@ -118,14 +119,17 @@ get_health()
fi fi
# Check iperf3 — if test failed or no data for tunnel gw, dead # Check iperf3 — if test failed or no data for tunnel gw, dead
local iperf_success=$(grep "^${base_tag} " "$IPERF_DATA" 2>/dev/null | awk '{print $2}') # Skip iperf3 for warp (no iperf3 server on Cloudflare side)
if [ "$iperf_success" = "0" ] ; then if [ "$base_tag" != "warp" ] ; then
echo "dead" local iperf_success=$(grep "^${base_tag} " "$IPERF_DATA" 2>/dev/null | awk '{print $2}')
return if [ "$iperf_success" = "0" ] ; then
fi echo "dead"
if [ -z "$iperf_success" ] && is_tunnel_gw "$tag" ; then return
echo "dead" fi
return if [ -z "$iperf_success" ] && is_tunnel_gw "$tag" ; then
echo "dead"
return
fi
fi fi
# Check ping — no data or high loss = dead # Check ping — no data or high loss = dead
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment