fix empty warp status

This commit is contained in:
mercury
2025-07-11 20:55:38 +04:00
parent e7cc7b66e2
commit 8ba85164aa
+1 -1
View File
@@ -6110,7 +6110,7 @@ DNS-over-HTTPS with IP:
if (!empty($this->ssh('pgrep warp-svc', 'wp'))) {
$st = $this->ssh('curl -m 1 -x socks5://127.0.0.1:40000 https://cloudflare.com/cdn-cgi/trace', 'wp');
preg_match('~warp=(\w+)~', $st, $m);
return $m[1];
return trim($m[1]) ?: 'off';
}
return 'off';
}