mirror of
https://github.com/itdoginfo/podkop.git
synced 2025-12-20 22:48:24 +03:00
♻️ refactor(podkop): update WARP detection logic
This commit is contained in:
@@ -2234,21 +2234,18 @@ global_check() {
|
|||||||
print_global "❌ WAN configuration not found"
|
print_global "❌ WAN configuration not found"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local warp_found=0
|
|
||||||
if uci show network | grep -q endpoint_host; then
|
if uci show network | grep -q endpoint_host; then
|
||||||
uci show network | grep endpoint_host | cut -d'=' -f2 | tr -d "'\" " | while read -r host; do
|
uci show network | grep endpoint_host | cut -d'=' -f2 | tr -d "'\" " | while read -r host; do
|
||||||
if [ "$host" = "engage.cloudflareclient.com" ]; then
|
if [ "$host" = "engage.cloudflareclient.com" ]; then
|
||||||
print_global "⚠️ WARP detected: $host"
|
print_global "⚠️ WARP detected: $host"
|
||||||
warp_found=1
|
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ip_prefix=$(echo "$host" | cut -d'.' -f1,2)
|
ip_prefix=$(echo "$host" | cut -d'.' -f1,2)
|
||||||
if echo "$CLOUDFLARE_OCTETS" | grep -wq "$ip_prefix"; then
|
if echo "$CLOUDFLARE_OCTETS" | grep -wq "$ip_prefix"; then
|
||||||
print_global "━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
print_global "━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||||
print_global " ⚡ WARP DETECTION"
|
print_global " ➡️ WARP DETECTION"
|
||||||
print_global "⚠️ WARP detected: $host"
|
print_global "⚠️ WARP detected: $host"
|
||||||
warp_found=1
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user