diff --git a/app/bot.php b/app/bot.php index 9e5c5f1..b325394 100644 --- a/app/bot.php +++ b/app/bot.php @@ -401,6 +401,9 @@ class Bot case preg_match('~^/deldomain$~', $this->input['callback'], $m): $this->delDomain(); break; + case preg_match('~^/addNipdomain$~', $this->input['callback'], $m): + $this->addNipdomain(); + break; case preg_match('~^/(?Pchange|delete)(?P\w+) (?P\d+)$~', $this->input['callback'], $m): $this->listPacChange($m['typelist'], $m['action'], $m['arg']); break; @@ -1765,6 +1768,11 @@ class Bot } } + public function addNipdomain() + { + $this->addDomain(str_replace('.', '-', $this->ip) . '.nip.io'); + } + public function addDomain($domain, $nomenu = false) { $domain = trim($domain); @@ -5598,6 +5606,10 @@ DNS-over-HTTPS with IP: 'text' => $this->i18n('+ subdomain'), 'callback_data' => '/addSubdomain', ], + [ + 'text' => $this->i18n('nip.io'), + 'callback_data' => '/addNipdomain', + ], ], ]; if ($conf['domain']) { diff --git a/version b/version index 403c075..48790cf 100644 --- a/version +++ b/version @@ -1,3 +1,5 @@ +30.10.2024 v1.91 +- кнопка nip.io для быстрой смены домена 27.10.2024 v1.90 - очередной фикс запуска warp после апдейта - правки фраз меню