Compare commits

..

1 Commits

Author SHA1 Message Date
mercury bb83ab0684 warp status on menu 2024-04-18 16:10:13 +04:00
2 changed files with 11 additions and 4 deletions
+9 -4
View File
@@ -3281,7 +3281,7 @@ DNS-over-HTTPS with IP:
'callback_data' => "/menu ss",
],
[
'text' => $this->i18n('warp'),
'text' => $this->i18n('warp') . ': ' . $this->warpStatus(),
'callback_data' => "/warp",
],
],
@@ -3869,12 +3869,17 @@ DNS-over-HTTPS with IP:
$this->warp();
}
public function warpStatus()
{
$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];
}
public function warp()
{
$st = $this->ssh('curl -x socks5://127.0.0.1:40000 https://cloudflare.com/cdn-cgi/trace', 'wp');
preg_match('~warp=(\w+)~', $st, $m);
$text[] = "Menu -> " . $this->i18n('warp');
$text[] = "status: {$m['1']}";
$text[] = "status: " . $this->warpStatus();
$data[] = [
[
'text' => $this->i18n('set key'),
+2
View File
@@ -1,3 +1,5 @@
18.04.2024 v1.33
- вывод статуса warp в меню
18.04.2024 v1.32
- фиксы в названии и отображении выбранного шаблона xtls
18.04.2024 v1.31